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.
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.