cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible for TouchGFX to generate the text file and images into a binary/hex file separately when generating code? I have a custom bootloader that i want to use to put the resources on an external QSPI flash during firmware update.

cleonb322
Associate III
 
7 REPLIES 7
MM..1
Chief II

Yes but, little correction in your ask, not generate code create bin/hex. This is linker role and you need change linker file setup in used IDE.

thanks. I was hoping that TouchGFX like Microchip Resource Converter/GDDX would convert all resources into a binary file. I recently added a QSPI external memory section to my linker and during development and I used the external loader option on the debugger to load the images into the external flash. Does anyone have an example on adapting the external flash loader to a custom bootloader (I already have a custom bootloader to loads the application)? I can write one (add it to my custom bootloader), but it would be helpful if someone has an example.

If you already have an external Loader and BSP code it should be a pretty short walk to pull the code into your own loader.

T​he .HEX should provide the addressing of content, or you might want to use the .DFU format for a more compact binary object file standard.

The linker should be able to export binaries for each section.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
SGasp.1
Senior

Hi Cleonb322.. .at the end were you able to modify the bootloader for updating the qspi flash? Can you provide the steps for doing the dame??' I have the ame task and any help would be appreciated... Thanks a lot.. Regards

cleonb322
Associate III

For development and debugging, I used their example to load the external resources into the QSPI Flash. For the finished product, I created a hex to bin c# cmd line application to split the hex into two bin files. since the external resources start at 0x9000000, it was simple to split into two bin files. then I added the cmd line application to the post-build step. then I can load my application bin file with the bootloader, in the application I checked a flag to determine if I need to reload the resource. This is an SD-Card bootloader, but this can be accomplished with any bootloader.

Hi cleonb, can you share this command line applications? can be very useful for comunity...

thanks.

I have my own app, but I cannot share it for free. however, you can use the below in the post-build steps to separate the binaries:

arm-none-eabi-objcopy.exe -O binary --only-section=FontFlashSection --only-section=TextFlashSection --only-section=ExtFlashSection "${BuildArtifactFileBaseName}.elf" ExternalFlash.bin;
arm-none-eabi-objcopy.exe -O binary --remove-section=ExtFlashSection --remove-section=FontFlashSection --remove-section=TextFlashSection "${BuildArtifactFileBaseName}.elf" InternalFlash.bin