cancel
Showing results for 
Search instead for 
Did you mean: 

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

zhbi98
Associate II

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.

5 REPLIES 5
TDK
Guru

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

 

If you feel a post has answered your question, please click "Accept as Solution".
zhbi98
Associate II

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

zhbi98
Associate II

However, the sample project does not appear to be complete, and some models of MCU do not have matching files here,Is there any other way to get these documents.

TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".
zhbi98
Associate II

Thank you. I see