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.

MSP430G2001 Memory Usage



Hi

I'm using the g2001 controller which has 0.5KB program memory. But around 120 B are used for something I don't know what:

.text      0    0000fe00    00000098     
                  0000fe00    0000005e     rts430_eabi.lib : autoinit.obj (.text:_auto_init)
                  0000fe5e    0000001a                     : boot.obj (.text:_c_int00_noexit)
                  0000fe78    00000010                     : epilog.obj (.text)
                  0000fe88    00000008     main.obj (.text:main)
                  0000fe90    00000004     rts430_eabi.lib : pre_init.obj (.text:_system_pre_init)
                  0000fe94    00000004   

So my question is what are those "autoinit.obj", "boot.obj", etc and are they essential? I really could use that space :/

Thanks

  • You are probably using c under CCS. I think IAR may be a little better in this respect, But they both include things you do not need. I always use assembly for chip with limited Flash.

  • autoinit.obj (.text:_auto_init)
    boot.obj (.text:_c_int00_noexit)
    pre_init.obj (.text:_system_pre_init)

    Are executed before your code is executed. Part of them may be needed (such as initialize the Stack pointer). Other parts may be an overkill.

    --------------------------

    epilog.obj (.text)

    Is executed after your code is terminated (if ever). It does nothing. Who cares?

    ----------------------------

    "Optimization" has no effect on these things. But you may be able to use "pragma" to eliminate part of them.

  • old_cow_yellow said:
    Part of them may be needed (such as initialize the Stack pointer).

    or initialize global or static variables :)

    old_cow_yellow said:
    Other parts may be an overkill.

    If oyu knwo what you're doing, you can write your own version of these funcitons. If the linker finds them in your object files, it will not link the versions from the library.
    Your versions might be as short as 'return 0;'.
    However, this kind of tweaking is 100% compiler/linker dependent and not portable. And you really need to know what you're doing (analyze the original assembly code for what it does and whether it is needed for your project).

  • Hi,

    Thank you for your answers, I`ll see what I can do.

**Attention** This is a public forum