lpcware

Placing Flash ROM code from C using gcc

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by robin48gx on Tue Sep 30 09:05:42 MST 2014
I wish to place a signature series of bytes in high flash ROM, so that a post build script can find them and
overwrite them with new values.
How do I tell the linker to place a const array of bytes into a given high flash location.

Ideally I would like something like

static const unsigned char []={ 0x31, 0x41 } = 0x17800;

to put the data into flash rom at 0x17800;

Do I need to define a custom section in the C code and add to the linker scripts? If so
does anyone know the syntax?

Outcomes