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 5.4.1.1, S7G2-DK
Any inputs on this is much appreciated.
Thanks,
Sam
Hello Sam,
Flashloader Framework seems to be a decent fit to your requirements: https://renesasrulz.com/synergy/f/synergy---forum/9884/flashloader_pack1-x-0-exe/40081#40081
For actual bootloader portion, you can refer to my old "USB host boot nano" example: 0243.s7_sk_ux_mass_host_boot_nano_1_3_0.zip. 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.
Regards
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 ? Thanks, Sam
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. Thanks, Sam
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.