8 years, 9 months ago.

How to use LPC4088 32MB external memory as heap

HI expert,

I am trying to use LPC4088 external 32MB memory for heap to support large malloc(), how can i achieve it? Should i need to change the ld file and any others. I have redirect the heap section to sdram region, however, the system hang up。

Btw: I am using offline gcc arm

Thanks,

Question relating to:

A library with drivers for different peripherals on the LPC4088 QuickStart Board or related add-on boards. LPC4088

Personally, I'd like to be able to statically-allocate specific non-initialized variables to memory. Looks like that still requires messing with linker files - and that's kind of brittle if you're exporting your mbed-os-based projects, IMO. Anyway, relevant discussion:

https://community.nxp.com/thread/462953

Meanwhile, I was able to use the external RAM as dynamically-allocated memory with this patch:

https://os.mbed.com/teams/IONX/code/EALib/rev/aba394685794/

and by making this change

https://github.com/ARMmbed/mbed-os/issues/5638

Hopefully mbed-os will integrate the fix in that issue report.

posted by Brendan McDonnell 04 Dec 2017

2 Answers

8 years, 9 months ago.

May be do you find how to change the linker file in http://www.atmel.com/Images/doc32121.pdf ?

Hi Robert,

Thanks for your pointer, however i was frustrated by referring to the doc since it is specific for AVR32 tool chain. I am using gcc arm tool chain, and was hold by where to put the sdram_init() function and how to modified the ld mapping.

posted by kuang xf 05 Aug 2015
6 years, 5 months ago.

I was able to use the external RAM as dynamically-allocated memory with this patch:

https://os.mbed.com/teams/IONX/code/EALib/rev/aba394685794/

and by making this change

https://github.com/ARMmbed/mbed-os/issues/5638

Hopefully mbed-os will integrate the fix in that issue report.