Error messages doesn't represent root cause #203

dethoter opened this Issue Jan 15, 2014 · 1 comment


None yet
2 participants

Environment: STM32VLDISCOVERY board, Sourcery CodeBench toolchain

Compiler generates 2 binary files: project.elf and project.bin.
It's OK if I try to flash the chip by st-flash with project.bin. But if I try to flash the chip with project.elf, I get next error:

$ ./st-flash write v1 project.elf 0x08000000 2013-12-30T19:28:23 INFO src/stlink-common.c: Loading device parameters.... 2013-12-30T19:28:23 INFO src/stlink-common.c: Device connected is: F1 Medium-density Value Line device, id 0x10016420 2013-12-30T19:28:23 INFO src/stlink-common.c: SRAM size: 0x2000 bytes (8 KiB), Flash: 0x20000 bytes (128 KiB) in pages of 1024 bytes 2013-12-30T19:28:23 INFO src/stlink-sg.c: Successfully opened a stlink v1 debugger 2013-12-30T19:28:23 INFO src/stlink-common.c: Attempting to write 717947 (0xaf47b) bytes to stm32 address: 134217728 (0x8000000) 2013-12-30T19:28:23 ERROR src/stlink-common.c: addr too high stlink_fwrite_flash() == -1

It would be more informative if the error messages would told about invalid file format.


texane commented Jan 15, 2014

No, this is non sense. Files to be written are not formatted, thus we can not check for the absence of a 'right' format.

texane closed this Jan 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment