This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MCU-PLUS-SDK-AM243X: Append/ Modify compiler options for SDK build

Part Number: MCU-PLUS-SDK-AM243X

Hello,

we would like to modify/ append some compiler options for the SDK build.

I am intereted in adding the flag for Link time optimization to the SDK build (-lto). since it is recommended to add the flag during linking and compiliation (Compiler Docu chapter 11.3.1.1).

Is there anyway to append additional compiler options to the SDK build? 

I tried using the environment variable CFLAGS like so:

Fullscreen
1
CFLAGS="-flto" make -f makefile.am243x nortos_r5f.ti-arm-clang PROFILE=Release -n
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

But this replaces the CFLAGS and does not append.

It would only be possible to append to CFLAGS if the makefiles are modified like this:

 

Is there any other way I am not aware of which I can use to append the compiler flag without modifying the SDK makefiles? 

Thanks Fabian

  • Hello Fabian,

    Modifying the makefile is the method I am aware of.

    You can find a makefile example of how to use LTO in a project like those under C:\ti\mcu_plus_sdk_am243x_09_00_00_35\examples\networking\enet_loopback

    Best Regards,

    Ralph Jacobi