@Stefan,
Thanks, I'm not familiar with inline assembly, the gcc reference manual
was pretty cryptic and did not provide examples that explained things
clearly (unfortunately I didn't come across the HOWTO before this).
I tried your suggestion, only change was to use the #defines (but it
does not make any difference to the generated output).
1 | inline void dbg_breakpoint_arm(void)
|
2 | {
|
3 | asm volatile (".word %0"
|
4 | : /* Output (empty) */
|
5 | : "i" /* (0xE127FF7F) */ (BKPT32_INSTR | BKPT32_MANUAL_BKPT)
|
6 | );
|
7 | }
|
The assembly output file had:
which results in "Error: bad expression."
If I remove the '#' manually from the assembly file it passes assembly
stage without any syntax errors. It seems like the compiler expects
operands to be passed to instructions (and hence prepends the '#'
symbol) instead of being used as data values?