Questions about the Synergy Flash Loader Add-on

Hello,

 

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."

 

 

Best regards

Heinz

 

  

  • In reply to JasonP:

    Hi DJervis11, JasonP,

    Please find a project:

    S7_SK_bootloader_app_image_1_3_0.zip

    Regards,
    adboc

  • In reply to adboc:

    Thank you!
  • In reply to adboc:

    Thanks!

    I was able to get the example up and running, and convert it to be used with the the PK-S5D9.

    Thank you for the support!
  • In reply to adboc:

    Hi
    How the USB bootloader will jump from bootloader to this image app ?
  • In reply to Renesas Karol:

    So maybe a stupid question, but how would one go about using Standby SRAM in the bootloader?
  • In reply to Mike:

    Hi 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:

    bsp_warmstart.txt
    #include "hal_data.h"
    
    #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' */
                bsp_init_hardware_locks();
    
                ssp_err_t status;
    
                status = g_sf_bootloader_mcu.p_api->open(g_sf_bootloader_mcu.p_ctrl, g_sf_bootloader_mcu.p_cfg);
                if (!status)
                {
                    status = g_sf_bootloader_mcu.p_api->appStart(g_sf_bootloader_mcu.p_ctrl);
                    if (status)
                    {
                        g_sf_bootloader_mcu.p_api->close(g_sf_bootloader_mcu.p_ctrl);
                    }
                }
    
                else
                {
                    /* Do nothing */
                }
            }
    
            /* Clear boot flag for this (and future) boots */
            * p_boot_key = 0;
        }
    
        else
        {
            /* 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.

    Regards

  • In reply to Renesas Karol:

    Yes that was exactly what I was looking for, thank you. Little embarrassing but I was trying to use 0x200FE0000 as the address instead of 0x200FE000.