2 years, 8 months ago.

How to add a Section with GCC-ARM (mbed 5 CLI)

In CLI ,GCC linker file [ .link_script.ld ] is automatically updated by command [ mbed compile ] So, user cant touch it. How to user add a section (e.g. SDRAM ) to linker directive ? ( mbed 5 ) Thanks for reading.

Comment on this question

2 Answers

2 weeks, 3 days ago.

mbed-cli accepts an undocumented -l your_linker_script command line argument that lets you supply your own linker script.

2 years, 8 months ago.

You can edit the linker script file in mbed-os of your local copy. For example:

mbed-os\targets\TARGET_NXP\TARGET_LPC408X\device\TOOLCHAIN_GCC_ARM\LPC4088.ld

Well, that would obviusly work, alright. What I'd like to know, and can't seem to find an answer for, would be, if it is possible to write a *.json file like mbed_lib.json or mbed_app.json that when a new project is exported, sufficiently modifies the scatter-file / linker-script or with the help of .mbedignore replaces it by a user-defined script.

posted by Christian B*** 12 Jan 2018

You need to log in to post a question