Skip to main content
Visitor II
January 25, 2024
Question

how do I get the '.ld' link file for Flash

  • January 25, 2024
  • 2 replies
  • 3296 views

I have a question, how do I get the '.ld' link file for Flash, compared to the cmsis_device_f1 library cmsis_device_f4/Source/Templates/gcc/ directory that doesn't contain a `linker/` folder.

    This topic has been closed for replies.

    2 replies

    Super User
    January 25, 2024

    If you make a CubeMX project, it will be in the top-level project directory. Something like STM32F411RETx_FLASH.ld.

    You can also find it in any example projects. For example:

    https://github.com/STMicroelectronics/STM32CubeF4/blob/master/Projects/STM32446E-Nucleo/Examples/I2C/I2C_TwoBoards_ComPolling/STM32CubeIDE/STM32F446RETX_FLASH.ld

     

    zhbi98Author
    Visitor II
    January 25, 2024

    Thanks for your explanation. I used CMake to build the project, so I needed to specifically look for this file

    Super User
    January 25, 2024

    I mean, there are probably other ways, but it takes less than 5 minutes to make a cubemx project for the chip you have and generate code. Is it worth searching for other methods?

    I searched the CubeMX repository and it came back with all the ld files in example projects. There may be another folder in there with them all but my brief search didn't turn it up.

    zhbi98Author
    Visitor II
    January 25, 2024

    Thank you. I see