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
  • Hey Robert, thanks for the reply. I attempted to use the newer version of "FillSystemStacks.s", but got a whole string of errors when assembling the new file (below). I believe I had come across this newer version before but ran into this at that point as well.

    *** Using Compiler 'V5.06 update 1 (build 61)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
    Build target 'testProj'
    assembling FillSystemStack.s...
    FillSystemStack.s(1): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(3): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(4): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(6): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(7): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(8): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(9): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(10): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(11): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(12): error: A1167E: Invalid line start 
    FillSystemStack.s(13): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(14): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(15): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(16): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(17): error: A1105E: Area directive missing
    FillSystemStack.s(17): warning: A1088W: Faking declaration of area AREA |$$$$$$$|
    FillSystemStack.s(23): error: A1167E: Invalid line start 
    FillSystemStack.s(26): error: A1167E: Invalid line start 
    FillSystemStack.s(32): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(33): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(34): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(35): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(37): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(38): warning: A1313W: Missing END directive at end of file
    ".\BlueVoice-BlueNRG1\testProj.axf" - 22 Error(s), 2 Warning(s).
    Target not created.
    Build Time Elapsed:  00:00:03

    Also, the processor I am using is the BlueNRG-2. I ran into a different thread elsewhere that mentioned this processor was missing the CMSIS Driver Startup files and this might cause issues. Could that be relevant?

    Ethan

Reply
  • Hey Robert, thanks for the reply. I attempted to use the newer version of "FillSystemStacks.s", but got a whole string of errors when assembling the new file (below). I believe I had come across this newer version before but ran into this at that point as well.

    *** Using Compiler 'V5.06 update 1 (build 61)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
    Build target 'testProj'
    assembling FillSystemStack.s...
    FillSystemStack.s(1): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(3): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(4): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(6): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(7): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(8): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(9): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(10): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(11): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(12): error: A1167E: Invalid line start 
    FillSystemStack.s(13): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(14): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(15): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(16): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(17): error: A1105E: Area directive missing
    FillSystemStack.s(17): warning: A1088W: Faking declaration of area AREA |$$$$$$$|
    FillSystemStack.s(23): error: A1167E: Invalid line start 
    FillSystemStack.s(26): error: A1167E: Invalid line start 
    FillSystemStack.s(32): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(33): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(34): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(35): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(37): error: A1137E: Unexpected characters at end of line
    FillSystemStack.s(38): warning: A1313W: Missing END directive at end of file
    ".\BlueVoice-BlueNRG1\testProj.axf" - 22 Error(s), 2 Warning(s).
    Target not created.
    Build Time Elapsed:  00:00:03

    Also, the processor I am using is the BlueNRG-2. I ran into a different thread elsewhere that mentioned this processor was missing the CMSIS Driver Startup files and this might cause issues. Could that be relevant?

    Ethan

Children
  • 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)'.

  • 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