I'm trying to create a BCH file and I'm running into the error Error - The Load Image Header was not found for this application.
Ultimately I want the bootloader to pull a file from the USB thumbdrive and load it into flash. I'm looking over the example from this thread https://renesasrulz.com/synergy/f/synergy---forum/7103/bootloader-from-usb-for-s7/32283#32283 and in preparation I'm trying to get a couple of application images I can upload to verify I'm actually pushing the files into flash.
I started with the downloader from the Flashloader examples (USB CDC non_blocking), I'm using an SK-SG7 dev. kit so I commented out the code inside the Downloader_entry function so it's not trying to check for the presence of an SD card. I'm using IAR and generating an srec, but when I try and run the python script c:\python27\python.exe r_fl_mot_converter.py -i downloader_usb_cdc_non_blocking.srec -o downloader_slow.bch -m 1024 -f 256 -e 0x100000 -l 0x100800 -s 0x300000 I'm running into the error "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"
Given this is the Flashloader example and it already has the downloader threads, I thought this information should have already been present. I'd prefer not to have any of the Flashloader stuff loaded in my application code though, so I thought this post https://renesasrulz.com/synergy/f/synergy---forum/8553/flashloader-r_fl_mot_converter-py-question/27893#27893 would be promising to solve both my current problem, and let me move to my actual application without having to add in the Flashloader. However, with that added custom array into blinky_thead_entry.c at the top, and <version>, <image_id>, replaced with 1, 1, I'm still getting the error.
Any ideas on what I'm missing? Thanks.
Have you already solved this issue? If not yet, please wait a little bit more until Synergy experts respond to your issue. Thank you for understanding.
JBRenesasRulz Forum Moderator
Have you inserted the correct section into your linker script at 0x800 offset?
In reply to Renesas Karol:
I'm using the downloader example from the USB CDC non-blocking.
Yes, that's in my linker script, at the 0x800 offset, as below. (I was hoping it was just a variable typo, so I've gone over that a couple times and didn't see anything)
/* Hardware lock lookup array. */
__Lock_Lookup_Start = .;
__Lock_Lookup_End = .;
__Lock_Lookup_Size = __Lock_Lookup_End - __Lock_Lookup_Start;
/* Flash Loader App Header at 0x800. This offset is fixed in sf_firmware_image.h and in XML */
. = __ROM_Start + 0x800; KEEP(*(.sf_firmware_image_file_header*))
In reply to Mike:
1073872976 in hex is 0x40020050 and this becomes 0x40120050 once you add application start address. This is the address at which the ID bytes are inserted and such data seems to be confusing the BCH converter. Flashloader Framework doesn't perform programming of the ID bytes anyway so you can remove following highlighted elements from the .icf file and rebuild the project: