0

I'm writing Assembly using Thumb for a Cortex-M7.

it eq                       
eoreq r1, r0, r7
pop {r0}

I'm using arm-gcc to and it throws two errors.

Error: Thumb does not support conditional execution

Error: instruction not allowed in IT block -- `pop {r0}'

I'm not seeing what is going wrong here, if someone could help me I'd appreciate it.

DiogoJDO
  • 19
  • 6

1 Answers1

2

This occurs because you haven't set up unified syntax in the assembler and the old divided syntax does not support condition codes on general instructions (or so I think). Supply the directive

.syntax unified

right at the beginning of the file to switch from divided syntax to unified syntax. This should fix the problem you observe.

fuz
  • 88,405
  • 25
  • 200
  • 352
  • This partly solve the problem. I had some problems with the stack management which was solved by utilizing the board startup file generated by CubeMX (but that was not part of the question, just pointing for clarity) – DiogoJDO Jun 02 '21 at 14:29
  • @DiogoJDO Next time, please answer follow up questions immediately. You got lucky that I was able to diagnose the issue without you providing the extra details, but often this is not the case. Questions get closed very quickly if the asker is unresponsive. – fuz Jun 09 '21 at 12:30