We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Good day. I try to create asm bit bannding macro. it's only macro and invocation code:
MACRO ;macro definition sram_bit_band_set $p1,$p2 LDR R4,=0x22000000+p1*32+4*p2 MOV R5,#1 STR R5,[R4] MEND
sram_bit_band_set 0x300,3 ;macro invocation
the compiler generates an error and refers to invocation:
bb.s(26): error: A1821E: Expected constant or register expression
Even simply example doesn't work:
MACRO ;macro definition test $p1 MOV R0,#p1 ;or LDR R0,=p1 - no difference MEND
test 5 ;or test #5, or test =5 - nothing
the same error
How can i put const as an argument?
Thanks!