We are also experiencing a similiar issue.
Is the Code Generation Tool 3.3.3 the current workaround suggested?
If so, would you mind pointing us to a resource that we can ensure we are using the correct version?
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.
Hi,
I have imported a project which builds successfully under CCS4 (map file below)
However when I try to build it from CCS5.1 it fails as it seems to try to allocate an additional 1234 bytes to RAM. (This is on a MSP430 with 2K ram)
The project is in release mode, and I am a little stuck as to where to look next. As far as I can tell debug options are disabled, but I am unsure how to check this properly.
Thanks,
James.
The actual error message is;
"../lnk_msp430f4783.cmd", line 56: error #10099-D: program will not fit into
available memory. run placement with alignment fails for section ".bss"
size 0x92c . Available memory ranges:
RAM size: 0x800 unused: 0x640 max hole: 0x640
The original V4 map file;
name origin length used unused attr fill ---------------------- -------- --------- -------- -------- ---- -------- SFR 00000000 00000010 00000000 00000010 RWIX PERIPHERALS_8BIT 00000010 000000f0 00000000 000000f0 RWIX PERIPHERALS_16BIT 00000100 00000100 00000000 00000100 RWIX RAM 00000200 00000800 0000061e 000001e2 RWIX INFOD 00001000 00000040 00000000 00000040 RWIX INFOC 00001040 00000040 00000000 00000040 RWIX INFOB 00001080 00000040 00000000 00000040 RWIX INFOA 000010c0 00000040 00000000 00000040 RWIX FLASH 00004000 0000bfe0 0000b132 00000eae RWIX INT00 0000ffe0 00000002 00000002 00000000 RWIX INT01 0000ffe2 00000002 00000002 00000000 RWIX INT02 0000ffe4 00000002 00000002 00000000 RWIX INT03 0000ffe6 00000002 00000002 00000000 RWIX INT04 0000ffe8 00000002 00000002 00000000 RWIX INT05 0000ffea 00000002 00000002 00000000 RWIX INT06 0000ffec 00000002 00000002 00000000 RWIX INT07 0000ffee 00000002 00000002 00000000 RWIX INT08 0000fff0 00000002 00000002 00000000 RWIX INT09 0000fff2 00000002 00000002 00000000 RWIX INT10 0000fff4 00000002 00000000 00000002 RWIX INT11 0000fff6 00000002 00000000 00000002 RWIX INT12 0000fff8 00000002 00000000 00000002 RWIX INT13 0000fffa 00000002 00000002 00000000 RWIX INT14 0000fffc 00000002 00000000 00000002 RWIX RESET 0000fffe 00000002 00000002 00000000 RWIX SECTION ALLOCATION MAP output attributes/ section page origin length input sections -------- ---- ---------- ---------- ---------------- .pinit 0 00004000 00000000 UNINITIALIZED .bss 0 00000200 000005ce UNINITIALIZED etc.
The new map file;
SFR 00000000 00000010 00000000 00000010 RWIX PERIPHERALS_8BIT 00000010 000000f0 00000000 000000f0 RWIX PERIPHERALS_16BIT 00000100 00000100 00000000 00000100 RWIX RAM 00000200 00000800 000001c0 00000640 RWIX INFOD 00001000 00000040 00000000 00000040 RWIX INFOC 00001040 00000040 00000000 00000040 RWIX INFOB 00001080 00000040 00000000 00000040 RWIX INFOA 000010c0 00000040 00000000 00000040 RWIX FLASH 00004000 0000bfe0 0000bd5a 00000286 RWIX INT00 0000ffe0 00000002 00000002 00000000 RWIX INT01 0000ffe2 00000002 00000002 00000000 RWIX INT02 0000ffe4 00000002 00000002 00000000 RWIX INT03 0000ffe6 00000002 00000002 00000000 RWIX INT04 0000ffe8 00000002 00000002 00000000 RWIX INT05 0000ffea 00000002 00000002 00000000 RWIX INT06 0000ffec 00000002 00000002 00000000 RWIX INT07 0000ffee 00000002 00000002 00000000 RWIX INT08 0000fff0 00000002 00000002 00000000 RWIX INT09 0000fff2 00000002 00000002 00000000 RWIX INT10 0000fff4 00000002 00000000 00000002 RWIX INT11 0000fff6 00000002 00000000 00000002 RWIX INT12 0000fff8 00000002 00000000 00000002 RWIX INT13 0000fffa 00000002 00000002 00000000 RWIX INT14 0000fffc 00000002 00000000 00000002 RWIX RESET 0000fffe 00000002 00000002 00000000 RWIX SECTION ALLOCATION MAP output attributes/ section page origin length input sections -------- ---- ---------- ---------- ---------------- .bss 0 00000000 00000930 FAILED TO ALLOCATE .pinit 0 00004000 00000000 UNINITIALIZED .cio 0 00000200 00000120 UNINITIALIZED 00000200 00000120 rts430.lib : trgmsg.obj (.cio) .sysmem 0 00000320 00000050 UNINITIALIZED 00000320 00000004 rts430.lib : memory.obj (.sysmem) 00000324 0000004c --HOLE-- etc.
Hi James,
have you checked that the project settings are the same/equivalent after import? It seems like something is triggering use of the .bss section which was uninitialized in your v4 working version.
Is a different linker command file being used?
Please keep us informed.
Best Regards,
Lisa
Hi James,
CCSv5.1 uses a different version of the MSP430 compiler tools(v4.0.0) than CCSv4 (3.3.x), so it may be possible that it generating a different sized .bss section. According to the map files, the .bss is going from a size of 0x5ce to 0x930, which no longer fits in the available RAM space.
What device are you working with? In order to understand the extent and reason for the size difference, we may need your project, but let me first see if I can reproduce this with some examples.
Update:
I changed the memory map to an imaginary variant to allow the linker to display what it is trying to allocate. The difference between the two is the 5.1 has the following;
00000754 0000011a rts430.lib : defs.obj (.bss) 0000086e 00000088 : trgdrv.obj (.bss) 000008f6 00000078 : lowlev.obj (.bss) 0000096e 00000078 : xvalues.obj (.bss) 000009e6 00000068 : xfvalues.obj (.bss) 00000a4e 00000058 : signal.obj (.bss) 00000b14 00000008 rts430.lib : memory.obj (.bss) 00000b1c 00000006 : feraiseexcept.obj (.bss) 00000b2c 00000002 : fopen.obj (.bss)
I understand this to be from C IO functions etc. but calls to these from the code has not changed. Is there a setting to chan
Can you attach your project here (as a zip file) or if you wish to share it privately we can start a private conversation and you can send it that way. It will help us reproduce the issue quickly and figure out why the differences are there. There may just be changes in the runtime library causing the differences but if we have a test case we can get confirmation from the compiler team.
For now, you could have your project build with the the older version of codegen tools that you were using with CCSv4. Please see this page for information on how to tell CCS to use a different compiler version (procedure for CCSv4 applies to CCSv5 also): http://processors.wiki.ti.com/index.php/Compiler_Installation_and_Selection
Thomas Kern said:I have the same problem with an CCSv4 project in CCSv5.
Did you resolve the problem in the meantime?
Tom,
We made some changes in the runtime library in MSP430 compiler version 4.0.0 which could be contributing to increased size of certain sections. However, in order to really isolate and address the issue quickly, it would really help the compiler team if we have a reproducible test case. Would you be willing to share the project where you see the increased code size? If you do not wish to post it here on the public forum, let me know and we can arrange to share it via private conversation.
Tom,
I sent you a friend request. When you accept the request you or I can initiate a private conversation and you can attach your project and send it that way.
Tom,
Thanks for sending the project and I can reproduce the issue. In codegen tools 4.0.x the C runtime library is pulling in feraiseexcept (C99 float exception raise exception), which in turn is pulling in fputs and malloc, thereby causing section sizes to increase, as well as newly creating sections .cio and .sysmem which the earlier versions did not do. Because of the increased section sizes, some of them are no longer able to fit in the available FLASH and RAM.
I have submitted bug # SDSCM00042892 to track this issue so it can be fixed for a future MSP430 CGT release. Feel free to track it using the SDOWP link in my signature.
As a workaround, if you are comfortable with rebuilding the runtime library, you should be able to modify math.h in \ccsv5\tools\compiler\msp430\include to remove calls to feraiseexcept. The process should be similar to what is described in this thread. The procedure for rebuilding runtime library is described here: http://processors.wiki.ti.com/index.php/Mklib#Invoking_mklib_manually
If you are not comfortable with the above workaround, you could simply use CGT 3.3.3 to build the project until this issue is fixed.
We are also experiencing a similiar issue.
Is the Code Generation Tool 3.3.3 the current workaround suggested?
If so, would you mind pointing us to a resource that we can ensure we are using the correct version?
Larissa,
This wiki article describes how to tell CCS to use a different version of the compiler tools than what it comes with. So if the customer already has CCSv4 with MSP codegen tools 3.3.3, they can point CCS 5.1 to that version of CGT.
http://processors.wiki.ti.com/index.php/Compiler_Installation_and_Selection#CCStudio_5.1