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."
In reply to Renesas Karol:
In reply to HN66:
Thank you for your help.
Can you please share me the example which you mention in your last answer for
downloading from external source into the file system on SDMMC.
But i still have problems to get the pure examples from the Flashloader Add-on to work.
When i Import the projects from the Flashloader Add-on the stack section in the
thread tab of the configuration.xml is not populated. The demo projects are throwing
errors when i try to compile them.
Any suggestions what I'm making wrong ?
The missing pack was the problem and now i can compile all the projects.
When i use the USB CDC Blocking Example it's working as expected, all fine.
But the USB CDC Non-Blocking Example is crashing when i connect a USB cable.
I start the program with a reset and it's running but at the moment i plugin the cable
the programm stops in the Downloader_entry function. It get's the error value
SSP_ERR_INTERNAL from the g_sf_downloader0.p_api->open function call.
I inserted an formatted SD Card in the DK-S7G2 and made all the required
settings for the switches on the board.
Am I still missing something ?
I debugged my USB CDC Non-Blocking problem a little bit deeper.
The problem arises in the call SF_FIRMWARE_IMAGE_open
The macro SF_FIRMWARE_IMAGE_ERROR_RETURN in the slot loop throws
the error SSP_ERR_ASSERTION. The variable values are:
slot = 0
p_cfg->p_record->image_addresses[slot] = 1048576
p_cfg->p_memory_instances.start_address = 0
p_cfg->p_memory_instances.slot_size = 4194304
So the comparision can't be true.
I hope this helps.
I think the address 0x500 is already provided in the bootloader linker script.
In the downloader linker script i can't see anything special about address 0x500.
But as I mentioned before I'm just importing the projects provided in the gallery
and want to use them with the development kit DK-S7G2 and I did not change anything
in the projects, just use them as they are.
It seem's to work until I plug in a USB cable and it stops executing because of the error in the SF_FIRMWARE_IMAGE_open call. I'm far away from downloading/flashing something because
the downloader already stops at the plugin of the cable.
Is there somthing wrong with the examples ?
Nevertheless can you please provide me an example for downloading from external source into
the file system on SDMMC as you mentioned in a previous post:
My best recommendation would be to abandon downloader module and instead work with sf_firmware_image directly to program image from the file system into the code flash (downloading from external source into the file system on SDMMC should be possible without using any of the flashloader components). I can share an example of how this is done (programming from the file system - in my case it's USB drive), however you will not be able to use the flashloader GUI on the PC and will have to find another way of pushing program images to your board.
What error value do you see in SF_FIRMWARE_IMAGE_open? I recommend that you build all of the bootloader examples using O0 optimization.
I'm attaching a project that implements integrated bootloader/download solution with USB mass storage. The project is work in progress, so you'll notice that it looks for file to program into QSPI but doesn't do anything with it - my plan was to write a fail-safe copy into QSPI you can restore from later. Currently, when S4 or S5 is held on reset, the programmer will look for USB mass storage device (blinking green) with "img#mcu.bch" file that will be used to program the microcontroller. After this is done, the device will reset and boot into your application.
I'm testing your demo now but i run into some problems with the BCH file generation.
I build a little test_blinky program and change the linker script so that the flash origin is at
0x40000 as it is needed for your demo.
But when i run the python script r_fl_mot_convert.py it throws me errors.
Can you explain me what is going wrong?I also don't how to set parameter -l HEADERLOC, what offset should i set to this ?In the examples of the bootloader/downloader application it's set to flash origin + 0x800but why ?