cancel
Showing results for 
Search instead for 
Did you mean: 

How to upload a software to STM32H745I-DISCO board from PC using ST-Link USB disk feature.

HTD
Senior III

The project is made with STM32CubeIDE. Uploading from it is simple and works.

Then I used CubeProgrammer to upload .hex file. Also works.

But both require installation and configuration on the target PC.

However, the device is seen as an USB disk.

0693W00000WLLiJQAX.png0693W00000WLLiOQAX.pngThe problem is - the HEX file is too big to fit in there. Is there a workaround for it?

I tried to generate a BIN file, but it's 2GB - why? My whole project doesn't use that much data.

Here:

0693W00000WLLinQAH.pngI need to send the update to someone that has the device, but no ST software installed. What are the options?

My plan B is to send them CubeProgrammer and HEX file.

BTW, HEX file is not the optimal in size. It stores the binary data as text, that use at least 3 times as many bytes as raw data. Why is BIN 2GB? It should be smaller than HEX. Is there any other format that could be used to flash the chip by just copying the file to that special "UBS disk"?

11 REPLIES 11

From makefile ... arm-none-eabi-objcopy -O ihex $(EXECUTABLES) "out.hex"

[-j sectionpattern|--only-section=sectionpattern]

[-R sectionpattern|--remove-section=sectionpattern]

Pavel A.
Evangelist III

> So now - how can I remove the QSPI part from the HEX file? 

Objcopy and other tools can do this, but IMHO it's easier to make a separate project configuration that does not contain initialized ext. flash data. Only refers to already initialized data.