• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Development Tools » TI C/C++ Compiler » TI C/C++ Compiler - Forum » Increase stack size - CCSv5.1
Share
TI C/C++ Compiler
  • Forum
Options
  • Subscribe via RSS

Increase stack size - CCSv5.1

Increase stack size - CCSv5.1

This question is answered
Yael Oz
Posted by Yael Oz
on Apr 04 2012 04:14 AM
Expert4165 points

Hi,

I'm trying to increase the stack size in my code to 500 but with no success.

I receive this massage error:

"available memory. run placement with alignment fails for section ".stack"

size 0x15e . Available memory ranges:

RAM size: 0x400 unused: 0x13e max hole: 0x13e

error #10010: errors encountered during linking; "Hci Tester Application.out"

>> Compilation failure

not built"

I understand that the maximum stack size I'm currently aloud is 0x13e.

I set the heep size to 0 but still no change.

Please find attached my linker file.

What should I configure in order to increase the stack size?

Thanks,

Yael 

 7181.lnk_msp430fr5739.cmd

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • George Mock
    Posted by George Mock
    on Apr 04 2012 08:23 AM
    Guru52605 points

    Please see the wiki article http://processors.wiki.ti.com/index.php/Compiler/diagnostic_messages/10099 .

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click Verify Answer on the best reply to your question.
    The Compiler Wiki answers most common questions.
    Track an issue with SDOWP. Enter your bug id in the "Find Record ID" box.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Yael Oz
    Posted by Yael Oz
    on Apr 04 2012 08:35 AM
    Expert4165 points

    Hi,

    Thanks for the link; I read it but my question still remains open.

    The RAM size is 0x400 according the the linker file.

    This is the massage I received:

    RAM size: 0x400 unused: 0x13e max hole: 0x13e

    The hip size is set to 0, and therefore I can't understanf why the stack size is limit to 0x13e.

    I tried turning on optimization but there was no change.

    I'm compiling the same code with identical RAM mapping with IAR and I can define the stack size as 500.

    Is there any diffrent confiruration required?

    How can I defined my stack size as 500?

    Please note that I attached my linker file on the previous post.

    Also, is possible to move this thread to the internal  E2E?

    Thanks,

    Yael

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • George Mock
    Posted by George Mock
    on Apr 04 2012 14:43 PM
    Guru52605 points

    The RAM memory range has 0x13e bytes left unused.  You say the .stack section 500 byte big.  That's 0x1F4 in hex.  So, the size of the .stack section is too big to fit in the space left available in RAM.  Either move something out of RAM, or make the stack section smaller.  There are no other choices.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click Verify Answer on the best reply to your question.
    The Compiler Wiki answers most common questions.
    Track an issue with SDOWP. Enter your bug id in the "Find Record ID" box.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Yael Oz
    Posted by Yael Oz
    on Apr 15 2012 10:44 AM
    Expert4165 points

    Hi George,

    I took your advice and moved 2 buffers from the RAM and allocate them manually to the FRAM using the linker file.

    Now I have enough room from my stack, so thanks.

    But now I have a different issue with the FRAM size.

    As I can see from the .map file the code (.text + .cinit) consumption is 0x3370  (.cio .system .pinit  .const are all 0 ).

    According the MSP430 datashit there are 16k FRAM.

    I have 4 buffers mapped to the FRAM - total size for all of them is 1.6k,

    The code (0x3370) according to the map file is 13.1k.

    Theoretically looks ok but when trying to compile I receive this error:

    "../lnk_msp430fr5739.cmd", line 105: error #10099-D: program will not fit into

    available memory. placement with alignment fails for section "ALL_FRAM"

    size 0x396d . Available memory ranges:

    FRAM size: 0x3420 unused: 0x3420 max hole: 0x3420

    error #10010: errors encountered during linking; "Hci Tester Application.out"

    not built

    >> Compilation failure

    How can it be that the place needed in the FRAM is 0x396d? As I can see from the map file I will need 0x3370 for the code and 0x960 for the buffer.

    Are there any other addones that I'm not aware at during compilation that might increase the FRAM consumption?

    Thanks,

    Yael

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Yael Oz
    Posted by Yael Oz
    on Apr 16 2012 02:45 AM
    Expert4165 points

    Hi George,

    I just realized that the sizes conflict actually results from the alignment there is in the FRAM groups sections:

    SECTIONS

    {

    GROUP(ALL_FRAM)

    {

    GROUP(READ_WRITE_MEMORY): ALIGN(0x0200) RUN_START(fram_rw_start)

    {

    .cio : {} /* C I/O BUFFER */

    .sysmem : {} /* DYNAMIC MEMORY ALLOCATION AREA */

    }

    GROUP(READ_ONLY_MEMORY): ALIGN(0x0200) RUN_START(fram_ro_start)

    {

    .cinit : {} /* INITIALIZATION TABLES */

    .pinit : {} /* C++ CONSTRUCTOR TABLES */

    .const : {} /* CONSTANT DATA */

    }

    GROUP(EXECUTABLE_MEMORY): ALIGN(0x0200) RUN_START(fram_rx_start)

    {

    .text : {} /* CODE */

    }

    } > FRAM

     

    Since the groups are align to 0x200 holes are created and the FRAM space is not enough for my code.

    Is there any requirement by MSP-EXP430FR5739 to align these groups to 0x200? I didn't see any comment regarding this in the data shit.

    Also, I'm working in parallel with IAR IDE and there is no alignment for these sections.

    Can you please explain this alignment? Can I remove it? What is the correct syntax for that?

    Thanks,

    Yael

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • George Mock
    Posted by George Mock
    on Apr 16 2012 13:44 PM
    Verified Answer
    Verified by Yael Oz
    Guru52605 points

    There is no reason the compiler requires those sections be on a 0x200 byte boundary.  There could be a hardware reason.  For that, I recommend you post a query to the MSP430 forum.

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click Verify Answer on the best reply to your question.
    The Compiler Wiki answers most common questions.
    Track an issue with SDOWP. Enter your bug id in the "Find Record ID" box.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use