2021-07-17 10:09 AM
Hi folks... I did a bootloader for STM32F7 able to load an hex file from USB stick .. erase the previous flash memory starting at address 0x0810000 (the starting address of the app to delete) and update correctly the new app. The problem is that the final application has an external memory for storing some pictures and we need a quadspi for communicating with such external memory.. The app with graphics and communication is already done and working... My task is to change the bootloader for erasing the external memory and upgrading with the new code /pictures.. How should i Change the bootloader project for erasing the address starting from 0x90000000 and updating the new data ? Is there some examples of code ?? Thanks a lot guys
Solved! Go to Solution.
2021-07-18 10:06 AM
>>Are you saying to import the external loader in the bootloader project and then ?
Saying to use it as an example of interfacing and initializing the CSP wrapped code.
You should be able to integrate the external flash code in a similar way to how the internal flash code works now, basically recognizing the address range of each. Perhaps have the upper level code managing the file, and lower level code handling the different memories.
.HEX files are a little messier as the data can be mixed, might want to do two passes to figure out the regions involved. I tend to prefer packaged binary files, like .DFU or custom. For commercial stuff you might want something more secure and encrypted.
2021-07-17 04:36 PM
Dupe / Common theme https://community.st.com/s/question/0D53W00000xt2QkSAI/update-external-flash-memory-via-usb-stick
Generally there is BSP code
Should be some examples for External Loaders, I think Tilen,et al, has a github with an STLDR / CSP, not sure I'm a huge fan of using such a heavy abstraction and Interrupts in a loader, but whatever works for y'all..
The things should be under 8KB, not several 100KB
Also I'd really avoid memory mapped mode, do all the program/verify in direct mode it will be a lot more stable / reliable.
https://github.com/STMicroelectronics/stm32-external-loader
2021-07-18 12:37 AM
Thanks Tesla Delorean.. .. very kind I am already using the externel loader in the application that i want to update with the usb stick... Are you saying to import the external loader in the bootloader project and then ? Maybe I can share the repo for better understanding ... I really need a help
2021-07-18 10:06 AM
>>Are you saying to import the external loader in the bootloader project and then ?
Saying to use it as an example of interfacing and initializing the CSP wrapped code.
You should be able to integrate the external flash code in a similar way to how the internal flash code works now, basically recognizing the address range of each. Perhaps have the upper level code managing the file, and lower level code handling the different memories.
.HEX files are a little messier as the data can be mixed, might want to do two passes to figure out the regions involved. I tend to prefer packaged binary files, like .DFU or custom. For commercial stuff you might want something more secure and encrypted.