The compiled code size can be checked by examining the map file generated by the project. To generate map file, go to:
- Project Properties ->
- C/C++ Build ->
- Linker ->
- Linker Ouput ->
- Produce listing of input and output sections in <file> (--map_file)
- Specify the path and file name for the map file.
The code size of the project will be the length of the .text section in the map file (this is the code section which goes in flash memory). Note: The map file tells where all the sections (such as .text, .bss, .const etc) are placed into target memory. The placement follows the specification described in the linker command file. In general, uninitialized global and static variables are placed into .bss sections, these should be allocated into RAM. Code goes into .text sections which would normally be allocated to FLASH. Constants are placed into .const sections which are also allocated into FLASH. For more details on link map files, please refer to the MSP430 Assembly Language Tools Users Guide, Chapter 7, (http://www.ti.com/litv/pdf/slau131b).
