I have questions about the Flash Loader Add-on provided in the galllery.
When i use the blocking Bootloader/Downloader combination then the
maximal size for the user application is approximately :
(Flash size of the chip - bootloader section) / 2
Because the Downloader need's space in internal Flash to store the
transfered app Image, which the Bootlaoder after the next reset
then can store in the desired destination and start it.
If i want to use the nearly the whole Flash size of the chip for my
application (with some reserved space for bugfixing/changes of course)
i need to use a external memory device like qspi chip / SD card etc. with
the nonblocking Bootloader/Downloader combination.
Am i right with my assumption or have i overlooked something ?
We are already using an SD-card in our application but this is holding
app specific data like language- and json-files and is FAT32 formatted.
Is it possible to change the nonblocking Bootloader/Downloader combi
so that it is usable with a FAT formatted SD card ?
Text of the Application note:
"The application data is stored directly onto the SD card and does
NOT use a file system. A developer could store images anywhere on an SD card but the logical place to begin
storing images is at address location 0x0."
In reply to JasonP:
Hi DJervis11, JasonP,
Please find a project:
In reply to adboc:
In reply to Renesas Karol:
In reply to Mike:
If you're referring to my suggestion from 30 Jun 2017 then it was regarding setting a flag from the main application that would then be recognised after device is reset:
#define LOADER_BOOT_KEY (0x44414f4c) // ASCII: "LOAD"
void R_BSP_WarmStart (bsp_warm_start_event_t event);
void R_BSP_WarmStart (bsp_warm_start_event_t event)
if (BSP_WARM_START_PRE_C == event)
/* C runtime environment has not been setup so you cannot use globals. System clocks and pins are not setup. */
else if (BSP_WARM_START_POST_C == event)
ULONG * p_boot_key = (ULONG *) 0x200FE000;
/* If boot flag is not intact */
if (LOADER_BOOT_KEY != * p_boot_key)
/* Initialize the Hardware locks to 'Unlocked' */
status = g_sf_bootloader_mcu.p_api->open(g_sf_bootloader_mcu.p_ctrl, g_sf_bootloader_mcu.p_cfg);
status = g_sf_bootloader_mcu.p_api->appStart(g_sf_bootloader_mcu.p_ctrl);
/* Do nothing */
/* Clear boot flag for this (and future) boots */
* p_boot_key = 0;
/* Do nothing */
On cold start the standby SRAM is uninitialized and contains random data. The likelihood of first 4 bytes matching my boot flag is minimal so this approach should work quite well.