cancel
Showing results for 
Search instead for 
Did you mean: 

I want to discard unused sections using -gc-sections and -ldo, but I can't find where to do that in the environment. The version of STM32cubeIDE I'm working with is 1.12.1, Any help would be greatly appreciated.

JNava.3
Associate
 
1 REPLY 1
Semer CHERNI
ST Employee

Hello @jose Navarrete Pineda​ 

First let me thank you for posting.

The option you are asking for is already activated by default in CubeIDE. Under "Properties / C/C++ Build / MCU GCC Linker / General" you will find a check box associated to the "-l--enable-non-contiguous-regions" option.


_legacyfs_online_stmicro_images_0693W00000bVhNDQA0.png 

I just want to add that in case you need to add any GCC Linker command, which is not already embedded in the tool, go under "Properties / C/C++ Build / MCU GCC Linker / Miscellaneous" and add the command in the "Other flags" section.


_legacyfs_online_stmicro_images_0693W00000bVhNrQAK.png 

I hope my response is helpful for you. If that's the case don't hesitate to mark it as best answer.

KR,

Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.