SSP 1.5.2 and GUIX Bootloader Options S7G2-DK

I would like to see if there is a way/framework or an example to get this started:

I am looking for something very basic like the below sequence:

1. On every power cycle the bootloader looks into USB or SD Card for a valid hex file and starts flashing right away.

2. If there is not a valid hex file or no USB detected, the bootloader times out in 2-3 secs and jumps to actual application.


We use SSP 1.5.2 and GUIX, S7G2-DK

Any inputs on this is much appreciated.



  • Hello Sam,

    Flashloader Framework seems to be a decent fit to your requirements:

    For actual bootloader portion, you can refer to my old "USB host boot nano" example: Decision on whether to perform programming or jump to application is made in bsp_warmstart.c and currently checks if the button is pressed. You can modify this portion to always jump to the programmer and let it proceed to the main application if USB is not inserted or file is not valid.


  • Thanks Karol, Let me try this and see.
  • Is there a Flashloader example software that I can open on SSP 1.5.2 ? The existing one does not show the bootloader/downloader stack in config.xml.
  • The post I linked has a download link to Flashloader for 1.5.x so it should work with 1.5.2 also.
  • I followed that link and got the flashloader framework installed and it shows up on SSP 1.5.2 but when I open the sample flashloader project "bootloader_usb_cdc_blocking" and open the configuration.xml, there is warning pop-up from e2studio that says "Pack Missing for projects current selected SSP version of 1.3.0, Would you like to switch to latest available SSP version? If I say  "no", I dont see any flashloader stacks in the config and if i say "yes" I get "Failed to create the part's controls error" Please see the image below.

    Pressing "Yes"below



    Pressing "no" below brings up the screen without the flashloader stack.

  • Another question on playing with FlashLoader framework - Non blocking bootloader looks into SD/MMC for the new image. Can i manually copy the .BCH files into SD Card on windows machine and plugin to S7G2-DK board and the bootloader will start flashing the new code from SD Card ?


  • Hi,
    I was able to convert the S-Rec file to .BCH and but stuck at bootloader non-blocking.
    I have the .BCH file copied to SDMMC Card and the bootloader errors out with Error 712 from the below line:

    /** Check to see if there is a newer image available */
    ssp_err = g_sf_bootloader_mcu0.p_api->newImageCheck(p_ctrl, &update_info);

    ERROR 712 ? Can someone help me with this error?
    ERROR 713 is SSP_ERR_NO_FLASH_IMAGES but not sure what 712 is.
    Any help on this is much appreciated.

  • Hi Sam,

    The flashloader framework uses unformatted SD/MMC media directly to download data into it and later use it in the bootloader for flashing. Your media is formatted so function call returns SSP_ERR_NO_STORED_IMAGES:

    To use file system in the bootloader you will need to refer to the example I provided in my earlier post. It uses USB Mass Storage device but modifying it to use SD card instead will be simple.


  • Hi. I recently built Karol's "USB host boot nano" project and I have an SREC image. I would now like to make a .BCH file of this using the Python script: (as provided in one of the other bootloader sample projects).

    However, I am not yet invoking the script correctly, and am getting an exception as shown in the console excerpt below:

    $ pipenv run python ./ -i S7_SK_ux_mass_host_boot_nano_1_3_0.srec -o S7_SK_ux_mass_host_boot_nano_1_3_0.bch -m 1024 -f 256 -e 0x0 -l 0x40000 -s 0x3c0000
    Error - The Load Image Header was not found for this application.
    Look at structure of Load Image Header for what is supposed to be found
    Traceback (most recent call last):
    File "./", line 812, in <module>
    File "./", line 457, in Process
    raise Exception("Error - The Load Image Header was not found for this application.")
    Exception: Error - The Load Image Header was not found for this application.

    I chose the -l and -s arguments according to the way I configured my "g_sf_firmware Bootloader Firmware Image Internal Framework" block:

    Starting address of the first flash area: 0x40000
    Size of the first flash area: 0x3C0000

    However, I think I am misunderstanding the relationship between the mapping of my bootloader image and what the Pyrhon script is expecting.

    Any assistance will be welcomed!
  • To whom it may concern:

    I am having some trouble reconciling Karol’s “USB host boot nano” project provided above with the flashloader description provided in the application note R11AN0073EU0112. The flash loading sequence I am trying to implement is:

    1. A USB mass storage device is inserted at runtime and the user initiates a copy of the new application image from it onto the local SDMMC card.
    2. At next system init, the bootloader sees the new application image on the SDMMC card and validates it (process TBD).
    3. If validation succeeds, the bootloader writes the new application image into processor flash.
    4. The bootloader then jumps into the new application image (and does so at each system init until the next upgrade).
    5. Given the size of our application image and the amount of processor flash in the S7G2, I anticipate I will use one application slot, say from 0x10.0000 to 0x3F.FFFF, with the bootloader residing initially from 0x00.0000 through 0x0F.FFFF.

    Karol’s “USB host boot nano” project appears to match my requirements more closely than the configurations described in the app note. This said, I am currently puzzled by some aspects of Synergy’s bootloader architecture and I will appreciate any help in understanding these:

    1. I have succeeded in building Karol’s project in E2 Studio and downloading it to my PE-HMI1 board. Starting it under the debugger, the software recognizes the attached USB mass storage device. I previously populated this device with a sample .bch file provided in the sample project an-r11an0073eu0112, and the software successfully opens this file.
    2. I can also step through the software’s R_BSP_WarmStart function, seeing how it allows the user to either force an application image update or jump directly into the existing application image.
    3. Now I would like to build my current application code in a way that will allow me to update it via this bootloader:
    o Note that my current application code is running on SSP 1.5.0 and I normally build it in IAR. Will this be compatible with the “USB host boot nano” bootloader?
    o I have configured my build to automatically generate an SREC file and I have set up a Python environment to run the script. I have run this script on the SREC file generated from my build but I do not yet have the sf_firmware_image_file_header_t header built into my application. I presume this is needed for the bootloader to recognize my application image, correct?
    o Is it intended that the bootloader and the application initially be built as a single monolithic image? If so, can the application subsequently be built and upgraded without needing to upgrade the bootloader?

    Thank you for any assistance in answering these questions!
    Erik Forsberg