SKS7G2 USB bootloader - HMI app

Hello Synergy community,
I am trying to use the program "A very basic USB Bootloader that uses MMF" on S7SK board.
I am able to custom and run the led blinking SSP110 HAL app and the Time & Temp HMI SSP110 app provided in the package.
I am able to run my own led blinking HAL SSP121 app (directly generate a .bin not a .srec with srec_cat)
I can't get my HMI (SSP121 or SSP110, based on S7SK bsp) app running and at this point I have no idea why.
The screen is switched ON but stay black.

- The file runs well. bootloader_flash_qspi.bat (srec_cat.exe) runs well too.
- I have changed in the linker script FLASH ORIGINE from 0x00000000 to 0x02000000
- I have removed DTC from the SPI driver as Karol suggested in March in an other thread.
- Finally I have tried to copy the linker script from the provided HMI app to my HMI app, (I had to add some sections in the SSP121 version), it compiles but it doesn't work = black screen.

Any idea ?


  • Hello,

    I am also working on a different way to make this usb stick bootloader.
    I am trying to implement the Karol's wip project using Flashloader framework.
    I have the bootloader running on my SKS7G2 board, green led blinking.
    I am stuck whith the BCH maker :

    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

    I have taken a look to linker file S7G2.ld and I didn't find the header information to fill the form of the srec to BCH conversion.


  • In reply to TLHQ:


    About the second method with flashloader :
    I have found how to create the header on the topic "Question about the Synergy Flash Loader Add-on".
    I added :

    . = __ROM_Start + 0x800;

    In my S7G2.ld file. But i am still confused about how to found the executable adress (and the header location : executable_adress + 0x800).

    EDIT : In the bootloader HAL module starting adress of the first flash area is 0x40000 and size of the first flash area is 0x3c0000, but when I fill the srec to bch form with header location 0x40800 , executable adress 0x40000 and valid flash size 0x3c0000 I got an error

    Error - Valid mask in Application Header did not match the value it was supposed to be.
    Expected Value = 0xaf Actual Value = 0x80


  • In reply to TLHQ:

    good news, I have something working with flashloader framework !
    I had forgotten some important steps :
    in the app :
    1/ Add HAL module Firmware Image Internal Framework and configure it (start adress, size of flash, address/pointer to firmware, image identifier != 0)
    2/ in the linker file change the flash start address to match the internal firmware start adress, add the section sf_firmware_image_file_header (+ 0x800 must match pointer to firmware) before *(.text*)
  • In reply to TLHQ:

    Hello TLHQ,

    Please refer to the following post for details about client application: (this link also includes a simple bootloader using USB mass storage). If your client application doesn't perform self-programming, you can leave the sf_firmware_image_mcu framework out and simply include a header structure as recommended in the following post: .

  • In reply to Renesas Karol:

    Hello Karol,

    I have managed to run the bootloader on my custom board : I can read the usb key on USB_HS port and the .bch file is written at the defined address.

    I have an other issue now, I can't boot on my application, in bsp_warmstart g_sf_bootloader_mcu.p_api->appStart(g_sf_bootloader_mcu.p_ctrl) returns ssp_err_t 0x2C9 (=713) so the bootloader go to the load from usb key mode and never start the app.

    This error seems not a normal error. What can cause this error and how to fix it ?



  • In reply to TLHQ:

    Hello TLHQ,

    Since SF_BOOTLOADER (and other flashloader components) are add-ons to SSP, they define error codes outside of ssp_err_t enum. You'll find these in sf_firmware_image_api.h:

    After programming the board, if you start the bootloader app using the debugger, block of data with firmware records will be overwritten (since debugger will re-programm the project with firmware records empty). If the app fails to boot after simple reset (not reprogramming), then please verify that you've inserted .bootloader_record section at 0x500 and before .text:


  • In reply to Renesas Karol:

    Thanks you for the quick answer,

    So my error 713 is no image found in internal mcu flash.

    My custom board has no debuger, it happens on power on or on software reset.

    As you suggested I've added the missing entry  

    /* Bootloader records */

    in the bootloader .ld file.

    No change, I still have the error 713.


  • In reply to TLHQ:

    Hi TLHQ,

    Do you know if programming ends successfully and your application fits the slot and start address requirements set by the bootloader? Does newImageComplete return success?

  • In reply to Renesas Karol:

    I think every steps of the loader thread work well because I check all the returns and if status != SSP_SUCCESS. I had an issue with my module setup and error with newImagePrepare was successfully caught and displayed.
    I checked the addresses setup :
    in the bootloader :
    - FLASH start 0x00000000 length 0x0400000
    - g_sf_firmware start : 0x78AE0 size 0x387520
    in the application :
    - FLASH start 0x78AE0 length 0x0387520
    - g_sf_firmware_image_internal start 0x78AE0 size 0x387520
    'Invoking: Cross ARM GNU Print Size'
    arm-none-eabi-size --format=berkeley "Helloworld.elf"
    text data
    747868 3008
  • In reply to TLHQ:

    Hi TLHQ,

    Can you clarify where did you set these values? Are you using the example projects attached with the Flashloader Framework?

  • In reply to adboc:

    Hello adboc,

    sorry for the late answer I was very busy last week.
    My project is based on the Karol's project :
    "questions about the synergy flash loader add-on (this link also includes a simple bootloader using USB mass storage)"

    There is a bootloader project loaded on the board over serial programming. It can read a USB storage and write the .bch file in the defined address.

    I have an application SSP121 created with e²studio, the .srec is converted into a .bch with the tool provided with Flashloader addon.

    I have taken some screenshot to show you the configuration :

  • In reply to TLHQ:

    Hi TLHQ,

    Could you check what g_sf_firmware.p_api->imageValidate(g_sf_firmware.p_ctrl, 0); does return in the bootloader?

  • In reply to TLHQ:

    Hello TLHQ,

    The setup you're using is unlikely to work for several reasons:
    * Vector table on Synergy has to be aligned on 512-byte boundary (if I recall correctly - ) and it's placed at the start of the image. Your image is only 64-byte aligned.
    * Starting from 0x10000 flash blocks are 32kB each - your image will need to be aligned on this boundary or else the flashloader won't be able to program it in correctly

  • In reply to Renesas Karol:

    Hi adboc & Karol,
    I have changed address configuration and the prototype works now with start adress at 0x78A00 and size 0x387600.
    thanks a lot for the help !
  • In reply to TLHQ:

    Hi again,
    I have an other question about this topic :
    What would be the steps to generate file for the QSPI and write it ?
    I think I have to use the script from the "A very basic USB Bootloader that uses MMF" to split the .srec between MCU and QSPI .srec then I create the MCU .bch the normal way. But then what would be the setup to create the QSPI .bch ? Maybe I can just use the QSPI .bin like what was done in "A very basic USB Bootloader that uses MMF" ?