Skip to main content
saccrue
Associate III
May 22, 2012
Question

Build issues with startup_stm32f10x_ld_vl.s

  • May 22, 2012
  • 2 replies
  • 2115 views
Posted on May 22, 2012 at 20:34

I'm trying to build a project using startup_stm32f10x_ld_vl.s and I am getting the following errors and warnings:

Error[40]:Bad instruction

Warning[410]:DC or DS directive while in CODE area

Can someone help me with why there would be warnings with the stock assembler file? The errors and warnings are on the following lines...

                AREA    HEAP, NOINIT, READWRITE, ALIGN=3

_Vectors       DCD     __initial_sp                    ; Top of Stack

                DCD     Reset_Handler                   ; Reset Handler

                DCD     NMI_Handler                     ; NMI Handler

                DCD     HardFault_Handler               ; Hard Fault Handler

 

Edit: What I am trying to do is create a ''skeleton'' project for my part. So, I started with a Discovery Sample file which used an app specific .c file with the vector table in it and I wanted to switch over to using the .s file that comes with the CMSIS library. But, just adding the .s file isn't enough. What am I missing?

    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    May 22, 2012
    Posted on May 22, 2012 at 22:21

    What am I missing?

     

    The right assembler? There are at least three variants of the .s file each tailored to a specific tool chain. The file you cite works with Keil / Realview compilers. If you're using GCC you'd need to start with a different one.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    saccrue
    saccrueAuthor
    Associate III
    May 23, 2012
    Posted on May 23, 2012 at 13:25

    Thank you for your reply. You are correct. I am using IAR and needed a different version. This is a bit confusing for newbies. :)

    Thanks.