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

Problem compiling a .s

Hi, I have downloaded a example of a bootloader for the board A2F500M3G.

The example contains two .s files, but uvision can't compilate them.

File 1:

.text
.global bx_3rd_eNVM_Image
.code 16
.syntax unified
.type bx_3rd_eNVM_Image, function

.equ VECTOR_TABLE_ADDR, 0x00020000

.align 4

bx_3rd_eNVM_Image:
ldr r0,=VECTOR_TABLE_ADDR
ldr r1,[r0,#0x0]
movw r2,#0xED08
movt r2,#0xE000
str r0, [r2, #0]
ldr lr,[r0,#0x4]
msr msp,r1
bx lr
.end

File 2 is very similar to File 1.

I obtain several errors like:
bx_3rd_eNVM_Image.s(9): error: A1137E: Unexpected characters at end of line
bx_3rd_eNVM_Image.s(50): error: A1167E: Invalid line start
bx_3rd_eNVM_Image.s(51): error: A1517E: Unexpected operator equal to or equivalent to *

I think the format of this files aren't the correct to compile or it is possible that I am missing some option.

I am a bit lost, can you help me?

Thanks you very much.

  • Hello! I have a similar problem.

    I am trying to compile a Demo Blinky programm
    and created an empty project and imported
    all the files, and all the c-files compile
    but the .s file won't.

    I am using

    * uVison MDK-Lite 5.23
    * STM32F103R6

    The error message is: (50 Errors all similar)

      assembling startup_stm32f103x6.s...
      startup_stm32f103x6.s(46): error: A1137E: Unexpected characters at end of line
      ....
    

    I asked Dr. Google, but all I found out is that it may have to do with

    --cpreproc

    or

    a Legacy Problem

    I tried both (using the option --cpreproc and installing the legacy addon)

    but still there are 50 Errors ...

    Can anyone help?

    Best regards, Max