2022-07-21 11:21 PM
Hi every one
I'm developing a project on STM32F746BGT6 custom board which will use USB port for store Data on USB key AND firmware updating purposes (In the Field updating), cause I am newbie on USB things, I am googling about firmware update through USB key but there is dozens of articles and videos about updating via SD card.
My questions is:
Any help would be appreciated friends:smiling_face_with_smiling_eyes:
Solved! Go to Solution.
2022-07-22 01:29 AM
@Community member "A .DFU file is an object file format better suited to describing sparse binary data, that ST defines/supports."
+1 :thumbs_up:
And it's not ST-specific - it's a standard USB thing:
So definitely sounds like the way to go!
Seems ST have some videos on it:
2022-07-21 11:53 PM
Hi Milad,
at 1 your idea about USB key is waste of space and time, because your updater person need PC where load file to key and then move key into device and device need big bootloader complicated with full usb and fatfs. Instead this your person can connect usb cable from pc to device and do update simpler.
at 2 yes your code can extend or use only external flash, but is slower and block bus and DMA use.
at 3 ... try first AN2606
2022-07-22 12:17 AM
At a FATFS level both approaches would be similar.
A loader could presumably be staged and executed from RAM.
The USB example should be in the Cube F7 trees as FWupgrade, or something similar, I'll look for a.specific cite later.
2022-07-22 12:18 AM
@MM..1 Thanks for your fast reply, I will read the AN2606, In my opinion the IOT things change the way we looked to MCU capabilities forever, easy to use in the field programming using just USB stick is more convenient that other professional ways which we used to programming MCUs. For the End Users, It is more simple to download a piece of file from Web to the USB Key then plug and update the device. By the way I will use TouchGFX GUI for my project and based on my previous projects, the .bin file for project will be in GB size ranges. I am looking for more efficient ways for updating firmware (I don't know why the .hex files in 50~80 MB ranges but .bin is in ~2 GB sizes).
2022-07-22 01:08 AM
@MM..1 "your idea about USB key is waste of space and time"
I disagree:
"because your updater person need PC where load file to key"
True, but then they can just take the key away to do the update(s) - they don't then need to take a PC with them.
I think that makes a lot of sense, and is a common approach.
2022-07-22 01:14 AM
@MiladChalipa "(I don't know why the .hex files in 50~80 MB ranges but .bin is in ~2 GB sizes"
Probably because the image is sparse; ie, it contains gaps.
An Intel Hex file has addressing, so it can specify where the programmed sections are to go - without having to fill the gaps;
A .bin file is just a byte-by-byte representation of the image - including the bytes for any gaps in the useful data.
Recent thread on the difference between .hex, .bin, and .elf:
https://community.st.com/s/question/0D53W00001fSBMySAO/difference-between-bin-hex-and-elf-file-and-their-sizes - with links to details of the .hex and .elf formats
2022-07-22 01:24 AM
A .DFU file is an object file format better suited to describing sparse binary data, that ST defines/supports.
2022-07-22 01:29 AM
@Community member "A .DFU file is an object file format better suited to describing sparse binary data, that ST defines/supports."
+1 :thumbs_up:
And it's not ST-specific - it's a standard USB thing:
So definitely sounds like the way to go!
Seems ST have some videos on it:
2022-07-22 02:13 AM
I disagree too, PC is too ultrabook and one simple cmd file and usb cable is more controllable update as blackboxed custom USB key loader.