This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Stack Watermarking AN316 Assembly Trouble

I'm trying to run the Main Stack Watermarking procedure as described in Application Note 316, page 7. (https://www.keil.com/appnotes/files/apnt_316.pdf)

However, when I try to build the assembler file "FillSystemStacks.s" in with the project I get two errors.
Error 1: (on both MOV R2 and MOV R3)
  • FillSystemStack.s(12): error: A1492E: Immediate 0xCBCBCBCB out of range for this operation.  Permitted values are 0x00000000 to 0x000000FF
  • FillSystemStack.s(13): error: A1492E: Immediate 0xABABABAB out of range for this operation.  Permitted values are 0x00000000 to 0x000000FF
When I try to fix this by changing the constants to 0xCB and 0xAB I get a new error.
Error 2:  (on both MOV R2 and MOV R3)
  • FillSystemStack.s(12): error: A1859E: Flag preserving form of this instruction not available
  • FillSystemStack.s(13): error: A1859E: Flag preserving form of this instruction not available

 

Pre-compile there's a message "*** Using Compiler 'V5.06 update 1 (build 61)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'", which is probably important to know. I am a newbie at this so please let me know if there's any other information you'd need.

Thanks,

Ethan

Parents
  • You have selected the armasm assembler with ARM syntax, which is wrong in this case. The assembly source file FillSystemStacks.s is written in GNU syntax and requires the armclang assembler. Please select either 'armclang (GNU Syntax) or - what I recomment - 'armclang (Auto Select)'.

Reply
  • You have selected the armasm assembler with ARM syntax, which is wrong in this case. The assembly source file FillSystemStacks.s is written in GNU syntax and requires the armclang assembler. Please select either 'armclang (GNU Syntax) or - what I recomment - 'armclang (Auto Select)'.

Children
  • This seems like it might be it!

    Unfortunately the "Assembler Option" isn't visible on my system, but after some searching around I found I need to have the Arm Compiler Version 6, which requires a Keil update for me. I'm doing that now and if everything works out I'll accept your answer.

    Thanks!

    Ethan