Heap size in MCUXpresso

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Heap size in MCUXpresso

2,479 Views
martinkoehler
Contributor II

Hi

I'm working with a LPC43S30 (Cortex-M4) bare metal. I used redlib until now, now newlib (hoping to get better debugging as redlib is not open source sadly). I noticed I can't set the heap size to more than 64k. Is there a specific reason for that value like lib not supporting higher sizes? Is there a walkaround for this issue without using manual generated linkerscrips?

Regards

Tags (1)
0 Kudos
2 Replies

1,434 Views
lpcxpresso_supp
NXP Employee
NXP Employee

I assume that you have configured "Heap and stack placement" to "MCUXpresso Style" in the Managed Linker Script page for you LPC43 project (which is not the default) and have both Heap and Stack placed in Region "Default" (which is normally RamLoc128 for the LPC4330).

In this case, I can replicate your issue and it looks like there is something slightly odd about the validation the IDE is doing regarding the heap and stack sizes when they are both is the same memory region and you try to allocate more than half the memory region. We'll investigate this.

However there appears to be a simple workaround....

  • First change the Region the stack is allocated in to a different region (e.g. RamLoc72).
  • Now change the size of the heap to the required size. With the heap and stack in different regions, this should now work.
  • Finally change the region the stack is allocated to back to "Default" ("RamLoc128).

Let us know if this works for you.

Regards,

MCUXpresso IDE Support

0 Kudos

1,434 Views
martinkoehler
Contributor II

It worked. Thanks a lot

Am 26.04.2018 um 09:29 schrieb lpcxpresso_support:

>

NXP Community

<https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg>

>

Re: Heap size in MCUXpresso

reply from LPCX support

<https://community.nxp.com/people/lpcxpresso_support?et=watches.email.thread>

in /MCUXpresso IDE/ - View the full discussion

<https://community.nxp.com/message/1009266?commentID=1009266&et=watches.email.thread#comment-1009266>

>

0 Kudos