cancel
Showing results for 
Search instead for 
Did you mean: 

Firmware upgrade with USB stick for microcontroller STM32F7 with quadspi for storing images in external memory

SGasp.1
Senior

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 0693W00000CztNjQAJ.jpg

1 ACCEPTED SOLUTION

Accepted Solutions

>>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.

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

View solution in original post

3 REPLIES 3

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

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

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

>>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.

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