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.

What do these linked files in CCS v6.1 do?

Other Parts Discussed in Thread: MSP-FET, MSP430F2001

Hi,

after being absent for a while in this topic I wanted to start some new microcontroller projects with the MSP430.

So I got me an MSP-FET and was surprised how well it goes together with my Ubuntu 15.10 and CCS 6.1.1.00022!

But now it's time to write some code... and there are some difficulties whose reasons I can't work out.

After building a Release configuration (Compiler: TI v4.4.6 and v4.4.4), there are two rather big .obj files linked:

One of them 100 bytes and the other 88 bytes. What are they used for? Also the other ones...

As I am trying to fit all this code into an MSP430F2001 with only 1kB Flash, these 188 bytes (and more...) are pretty valuable...

While my program for itself is about 500bytes, the flash is almost full.

So, is there anybody willing to enlighten me what these files do or how to exclude them from building if not necessarily needed?

Thanks!

Best regards,

Stephan

  • autoinit.obj and copy_decompress_rle.obj are used to initialise global variables, before main is called.

    To avoid the run time library code which initializes global variables from being linked in, one option is to write your C code so that there are no initialized global variables.

    Also, by default the initializers for global variables are compressed in an attempt to save flash space. This is on the assumption that the compression of the initializers will save more flash space than that taken for the decompression code (e.g. in copy_decompress_rle.obj). Depending upon the size of the global variables to be initialized, disabling the compression by setting the the linker options --copy_compression and --cinit_compression to off (under CCS project properties -> Build -> MSP430 Linker -> Advanced Options -> Linktime Optimization) may reduce the flash space used. 

  • Hi Chester,

    avoiding global variables is quite hard I think, so the maximum isn't achieved yet, but your hint to disable compression did work!
    Now it built even with all optimization turned off and there's still a lot of bytes unused.
    Is there any documentation to what these linked files do? For example I cannot imagine why I would need "boot_special.obj" linked to my project... Maybe I'll just have a look into the rts430_eabi.lib.

    Best regards,
    Stephan
  • The file boot_special.obj contains the variant of the boot routine used in your build.  It is described in the section titled System Initialization in the MSP430 compiler manual.  All of the compiler RTS source code, including boot_special.c, is available in the lib/src directory of the compiler installation.

    Thanks and regards,

    -George

  • Hi George,

    ah OK, this is exactly what I wanted to know!

    Thank you very much.

    I wish all the best for 2016 to both of you and the rest of the TI E2E community!

    Best regards,

    Stephan