1

I want to build code for my STM32F030F4 using arm-gcc-none-eabi. The STM32CubeF0 is already downloaded, and inside the repository, I found the location of the startup file.

However, I haven't found where the linker script is located. There is some internet tutorial explaining how to write the linker script, but I would like to use the official STM32 version.

Where can I find the file?

JYelton
  • 32,302
  • 33
  • 134
  • 249
andre.hre
  • 107
  • 7

2 Answers2

0

If you create an stm32cube project with this micro the linker command line and be found in the settings. Page 61 of the stmcube manual details the linker settings, which includes the command line that specifies the .ld file to be used: manual linker snip

https://www.st.com/resource/en/user_manual/um2609-stm32cubeide-user-guide-stmicroelectronics.pdf

Bryan
  • 2,156
  • 1
  • 6
  • 11
  • 1
    But OP still needs that file to use it. And likely is not using CubeIDE, or not a project generated with CubeMX which would generate the linker script. – Justme Jan 17 '23 at 05:30
  • @Justme I see that now. Op would have to create a project using the desired chip and then investigate the settings. Not the most straightforward option for sure. – Bryan Jan 17 '23 at 05:50
0

ST linker scripts are almost identical between devices in the series. You can take this file and change the memory sizes to suit your device.

Alternatively, download STM32CubeMX, generate a project for your device and copy the linker script from there.

Armandas
  • 7,845
  • 1
  • 32
  • 56