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.

MSP430 and "error #more bytes needed segment DATA16_Z, CSTACK

Other Parts Discussed in Thread: MSP430F123
When I use a small array of Packets =8, unsigned char  Bdata1[(Packets*20+8)];
my code runs fine with DMC.map file results as following:
  574 bytes of CODE  memory
  252 bytes of DATA  memory (+ 12 absolute )
   8 bytes of CONST memory
Errors: none
Warnings: none:
Packets =15 I got following errors 
Inline image 1
I am not sure where else I can fit my variables and how to decide that its device limitation or coding issue.
Please help
Device Name- MSP 430 F123
Thanks
  • Your image isn't visible for some reason.

    None of this looks familiar to me.  Are you using Code Composer Studio and the TI MSP430 compiler?

    Thanks and regards,

    -George

  • Thanks for reply George. Apologies for pasting image, I am attaching now. Please see if you have some pointers. I am using TI MSP 430 compiler.

    Thanks

  •  I am using IAR embedded workbench.

    Thanks

  • In this forum, we only support compilers released by TI.  Thus we are unable to help you with this problem.

    Thanks and regards,

    -George

  • Hi George

    I tried running the same code with code composer studio and getting following errors:

    error #10099-D: program will not fit into available memory. run placement with alignment fails for section "BSS_GROUP" size 0x138 . Available memory ranges:
    RAM size: 0x100 unused: 0xb0 max hole: 0xb0
    error #10010: errors encountered during linking; "DCM_CCS.out" not built

    Please correct me if I am wrong: as per my knowledge with MSP430F123 I have only 256 bytes of ram memory where all my global variables, local variables and stack implementation get stored. I am using port1 and timer interrupt. I am not sure how to fit this code any help will be appreciated. 

    Thanks

  • Please post the linker command file your project uses.  Note you will probably have to change the extension from .cmd to something like .txt.

    Thanks and regards,

    -George

  • You are correct that MSP430F123 has only 256 bytes of RAM.  You are attempting to place an array of size (15*20+8) = 308, so it cannot possibly fit in RAM.  Can any part of the array go in FLASH?  Must the array be that large?

  • Hi George,

    I am not sure about overlapping but I think yes as the RAM is not sufficient. Please find attached linker cmd file and the DCM_CCS.map file. 

    If you need I can send you the code as well. I am not able to add multiple files so may be in next post you will find map file and code. Thanks for your help.

  • Please find attached Map file.

    Thanks!

  • Please find attached code for transmitter using Timer interrupt.

  • Your problem starts with this C source line ...

    unsigned char  Bdata1[340];
    

    That array goes in the .bss section.  The linker command file allocates the .bss section into RAM memory.  But your device only has 256 bytes of RAM.

    You have to change your code to use less RAM.  If you aren't sure of the best way to do that, then I suggest you start a new thread in the MSP430 forum.

    Thanks and regards,

    -George

  • Thanks for the reply. I already changed the device due to limited RAM with F123.