7 years, 6 months ago.

Store a binary file within the FLASH

I'm using mbed OS 5.0 and I want to store a binary file within the FLASH, The thing is I want to add a section in the linker script that includes the data so I can choose where exactly I want it to be. Can you tell how can I do this?

1 Answer

7 years, 6 months ago.

You can edit the linker script if you build locally, but we do not recommend it, as you'll essentially be forking mbed OS at that point. Better options could be filesystem, pragma, or just referencing variables that hold the data.

Thanks for your answer; actually I did change the linker script to do so, because I needed to store the file within a specific place in the FLASH, and to make it work I changed the gcc.py script to add arm-none-eabi-objcopy update-section ... while compiling. It would be good to add an option in mbed cli to add some building commands if needed instead of changing the Building script.

posted by abdou sen 10 Oct 2016