Page 1 of 1

loader Callback

Posted: Tue Jan 31, 2017 4:36 pm
by Sebastian
Hello every one,

is it possible to write into flash inside the bootloader callbacks?
Something like the opposite of:

Code: Select all

extern void * readFlashDataPage(unsigned addr);
I have tried:

Code: Select all

extern void writeFlashDataPage(unsigned addr, unsigned char data[]);
also:

Code: Select all

fl_connect(..);
fl_writeDataPage(....);
But nothing of them did work.

Regards,
Sebastian

Re: loader Callback

Posted: Fri Feb 03, 2017 9:37 am
by colin
Hi Sebatian,

There are currently no callbacks in the loader for writing back to flash memory. You can use the data partition when you flash the factory image (see xflash option --data) to store some custom data at this time.

Colin

Re: loader Callback

Posted: Fri Feb 03, 2017 10:23 am
by Sebastian
Hello Colin,

thanks for your answer.

The idea behind this is, that the bootloader could tell something to the "user" without the use of gdb.
So xflash --data is too early :)

Regards,
Sebastian