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.

Binary size Increase in CCS compilation

Other Parts Discussed in Thread: CC3200

Hi,

Am using CCS Version: 6.0.1.00040 ,

Am using CC3200 SDK 1.0.0

When I was compiling my application , just Adding One line of code UART print , Increased my binary size to 1 Kb . Why it is happening like this ? Can A single line of code can be 1 K  and also if I remove some unused variables and functions Image size is not reducing much .

Image Size is very critical factor in my Application , How can I use efficiently my CCS ?

I tried all the optimisation levels in CCS , that didnt hel much ?

Thanks A Lot in Advance,

~Thanga Raj

  • Hi Thanga,
    This is certainly possible if adding that one line of call requires additional code from a library to be pulled in. For example, it is well known that standard c i/o like printf is very costly in terms of increasing code size (a single printf call will do this) and that is why most microcontroller example applications do not use it at all.

    All CCS can do is let you optimize for code size and tell you what is the best tradeoff of code size and performance. You will need to decide how best to work with this.

    Thanks
    ki
  • Hi Ki-Soo,

    Thanks for your reply.

    I just have this doubt . Suppose am using printf already in my function (i.e, this library is already included), will adding another printf will increase the code size to 1K?
    Moreover am not using any library calls , Message() function in uart_if.c for CC32200,

    Thanks
  • the first printf can add 10-20K to your code size. If it is already being used, then adding an additional call would add much less (much less than 1K). You will have to see what the cost of using UART print is.
  • Hi Ki-Soo,

    But what I observed is if I add two UART prints Image size is not increasing much and if I add a single UART print (third) Image size is increasing suddenly to 1 K.

    I cant Imagine why this is happening and in no way that UART print can be 1K.

    Thanks,

    ~Thangaraj