2025-11-20 6:28 AM - last edited on 2025-11-20 6:35 AM by Andrew Neil
when trying to program our hex file in the microcontroller with the actual version 2.21 of programmer, I get following error:
failed to download Sector[0].
in hex file the sector 0 starting from address 0x0 is used.
wondering, that this could not be programmed with stm tools.
| sw tool | hw tool | result |
| stm programmer | st-link | error |
| stm programmer | j-link | error |
| j-flash pro | j-link | error |
| j-flash light | j-link | good |
in my opinion, the definition file for programmer isn't correct.
the sector 0 is missing. why?
shall it be corrected?
thanks for fast help.
Stefan
2025-11-20 7:12 AM
> in hex file the sector 0 starting from address 0x0 is used.
Address 0 is not always a valid flash address. Your hex file should write to 0x08000000. Perhaps your linker file has mistakes.
2025-11-20 7:51 AM
thanks for the answer. what I now better understand:
- the memory at address 0 is mapped from sram, system memory or main flash memory.
- we have set nBOOT1 to one. so we use system memory to boot-up from.
- to flash, we want to reprogram the system memory area to write our own bootloader and startup
- there is no "normal" way to program this system memory area.
- so now I think the system area shall be added into the definition file?
- or does stm don't want to let user write into this area?
Thanks for responding
Stefan