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.
I'm using the MSP430F6638 chip and a licensed version of CCS. I have a 63 KB main.c file. I just got an error in CCS while compiling telling me that the code size limit has been exceeded. It was working fine just a minute ago before I added a few lines of code. So I commented those lines of code out and re-compiled and the error is gone. So, it seems it seems the compiler is counting the lines of code to be executed and throwing an error if a threshold is exceeded. My code is just ~1800 lines or so (with comments). I checked the datasheet and the flash is 256 KB on this MCU. So...I'm wondering why I'm getting this error?
They do not count the number of source code lines. They count the total number of object code bytes. This include the library functions you used (and they supplied). Things like printf(), floating-point, etc, are very big. Inefficient compilation also generates larger than necessary object code. All these add up and are counted against you. The "few lines of code" you added broke the camel's back.
This error message usually comes when you use the free/trial version and you code exceeds the allowed maximum size. However, with 1800 lines of code, i don't think this is the case.
If the code is too large for the target device, you usually get a linker error about segment placement, but not about code size limit.
cyn you post the EXACT error message? And its surroundings?
And you're usign large cod emodel? If not, only the portion below 64k can be used, as all funciton calls are 16 bit addresses only (but the code is smaller and faster)Krutarth Trivedi said:the flash is 256 KB on this MCU
This error message usually comes when you use the free/trial version and you code exceeds the allowed maximum size. However, with 1800 lines of code, i don't think this is the case.
If the code is too large for the target device, you usually get a linker error about segment placement, but not about code size limit.
cyn you post the EXACT error message? And its surroundings?
And you're usign large cod emodel? If not, only the portion below 64k can be used, as all funciton calls are 16 bit addresses only (but the code is smaller and faster)Krutarth Trivedi said:the flash is 256 KB on this MCU
**Attention** This is a public forum