build your own cross-compiler !!!

There is actually a missing step :slight_smile: We do not have anything that wraps the compiled binary into a dfuse file. However, if you have my latest dfu-util code, you can download the raw binary file “dso.bin” as long as you know the address where it should be loaded:

src/dfu-util --dfuse $((0x0800c000)) -a 0 -D dso.bin

In general, to see where the code should be loaded if you don’t know the source code, you can find it in the hex file:

:10C000000050002021150108611501086115010883[/code]
the first :02 line is an address offset directive, the 0800 in there is the MSB (and the last byte on a line is always a checksum). On the normal
:10 data lines, the first two bytes form the address LSB, C000. Or look at the s19 file, which have the whole address on each line:

codeS00A000064736F2E733139A4
S3150800C0000050002021150108611501086115010875[/code]
The data line S3 starts with the number of bytes, 15, then the address, before the data.

Or simply run “objdump -s dso.hex” which will list all addresses. You can also use a tool like srec_info to decrypt the s19 file.

Notice also that the first bytes in a STM32 binary is almost always the interrupt vector, starting with stack address and the reset address. So in the example above, the stack pointer is 0x20005000 (in RAM) and the code starts running at 0x08011521.