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.

CCSTUDIO: How to decrease binary image size via compilier options?

Part Number: CCSTUDIO


Hello,

I'm testing the OAD feature on CC2642 and CC2340 chips. On the BLE connection parameter side, I have a set of 

And here is my testing environment:

========================================

EVM: LANCHXL-CC26x2

SDK: simplelink_cc13xx_cc26xx_sdk_6_30_00_84

CCS Version: 12.1

RTOS: TI-RTOS7

Compiler Version: TI Clang V2.1.2 LTS

========================================

I find some options in ARM Compiler > Optimization part, like s/z/g and two other Enable/Disable options.

After a thourough test, when I choose z optimization, enabling -ffsat-math, selecting -flto. The binaray size is the smallest, but I'm not sure about whether it lead the same result for other projects.

So, my question is how to reduce the binary size in CCS. What else I can do from the compiler side?

Thanks.

  • With regard to the source code you compile, you are already doing everything you can.  

    If you link many libraries into your application, then encourage the providers of those libraries to build them with -flto, so the code from those libraries is better optimized into the overall system.

    Thanks and regards,

    -George