Jump to content
43oh

Big code size bug fixed in TI C compiler 4.4.x series


Recommended Posts

Hi all:

 

I just wanted to point out to everyone here that there was a big bug (at least in my opinion) fixed just recently in the 4.4.x series of the TI C compiler that was causing code to bloat by ~100-some bytes or so (and slowing down time from power-on to main by probably ~40 microseconds in many cases). Might not seem like a lot with the larger MSP430s but if you're working with one of the really small chips, that could be a big loss.

 

The linker wasn't able to select the boot routine that doesn't bother initializing anything (_c_int00_noinit and equivalents) so the autoinit routine was always included even in the simplest projects.

 

With 4.4.1, if there are no uninitialized variables and no constant-initialized variables (i.e. all variables are marked with #pragma NOINIT(x) - replace 'x' with the variable name - before their declaration, and not initialized to anything) then the compiler uses the simplest boot routine, and you only lose as little as 32 bytes of flash to the runtime, rather than 151. (Of course assembly would do better, but 32 bytes or so overhead isn't that bad to work in C).

 

Code Composer Studio doesn't seem to be pushing that update so for me and I didn't see anyone mentioning this elsewhere, so I thought it might be useful to note here. I had to do "check for updates" and then update the MSP430 code generation tools, and then all of my projects needed to have the compiler switched from "TI 4.3.5" to "TI 4.4.1", since the IDE doesn't switch to the most recent compiler by default.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...