cancel
Showing results for 
Search instead for 
Did you mean: 

Where can I get GCC linker scripts and register files?

hugo1
Associate II

Hi all,

I am looking for Gnu C linker scripts. I found linker scripts inside the Cube bloatware after waiting 2 hours for the download to finish (yes, not everybody has Gigabit internet) but:

  1. they don't work with GCC. For example __data_start is not defined (STM32L151XC).
  2. They have an Atollic copyright inside !?! Use is only permitted with the Atollic TrulyCreepingStudio software which is an absolute no-go area for me.

So where can I find just the register files and linker scripts for a specific CPU?

Any help would be appreciated.

Kind Regards,

1 ACCEPTED SOLUTION

Accepted Solutions

OK, in ARM world it's called the CMSIS library. ARM itself provides the standard and a part of the library, and the vendors add there their MCU headers and startup code.

In ST's case the library is (again) provided with the Cube package, under Drivers/CMSIS directory. If you can't download the package let me know the MCU family and I'll send you the files from that directory.

View solution in original post

5 REPLIES 5
hugo1
Associate II

Hi,

ok, wrote my own linker script; that works now.

But where do I find the processor register files? Surely ST must provide them somewhere...

Kind Regards,

> Cube bloatware

> TrulyCreepingStudio

With that attitude towards others' work (and freely provided software) and still can't Google or read docs. [Click Show More]

In STM32Cube select the Makefile project generator and generate a project for your MCU. The generated project will have the linker script. It doesn't have Atollic copyright in my case.

For the "register file", do you mean the SVD (System View Description) file? Visit your MCU's page (for example https://www.st.com/en/microcontrollers/stm32l4r5zg.html ) and download it from there. Or you can find it in an aggregated place like this one - https://github.com/posborne/cmsis-svd

I hope it helps.

Hi,

forgot to mention that I cannot run STMCube (I could have also called it "slaveware"; as in slave of the mouse). Cannot be integrated into an automated system build procedure, ST proprietary, not suitable for what we are doing. And the Atollic copyright is in the linker files included in the Cube archive. But the linker files are solved anyway.

I probably did not explain properly what I am looking for:

I am looking for the C header files containing the peripheral register structures and register bit #defines.

Kind Regards,

OK, in ARM world it's called the CMSIS library. ARM itself provides the standard and a part of the library, and the vendors add there their MCU headers and startup code.

In ST's case the library is (again) provided with the Cube package, under Drivers/CMSIS directory. If you can't download the package let me know the MCU family and I'll send you the files from that directory.

hugo1
Associate II

Hi,

well I can download the Cube archive and I found the files but the archives are huge. The F7 archive for example is 1253733296 bytes ! That takes half a day to download. I had hoped the header files would be somewhere separately because that's pretty much all you need to get a system up and running.

For the moment I have everything I need but for future projects I may come back to your offer.

Thank you very much!

Kind Regards,