Thanks, due to all the comments I can now do the equivalent of `program {}
verify reset`. Should this issue be kept open until `program` works "normally"
in openOCD or do we close it? Technically the original question is answered.
You decide, since I don't seem to be able to change the status
This fixes it. Now I can upload code and verify it with OpenOCD :)
---
** [tickets:#293] STM8 program command fails with "invalid subcommand
write_image erase.."**
**Status:** new
**Milestone:** 0.10.0
**Labels:** stm8 flashing
**Created:** Sat Jan 16, 2021 05:37 PM UTC by Maximilian Gerhardt
On Sat, Jan 16, 2021 at 09:28:12PM -, Maximilian Gerhardt wrote:
> openocd -f interface\stlink-dap.cfg -f target\stm8s103.cfg -c "load_image
> {C:\Users\Max\Documents\PlatformIO\Projects\stm8_testing\.pio\build\stm8sblue\firmware.bin}
> 0x8000"
Just add "init; reset halt; " before load_image
Openocd has an initial 'configuration' mode where you setup adapter and
device, then an 'exec' mode to run the other commands.
You need to use `-c init` to switch from 'configuration' to 'exec'.
This below should work
~~~
openocd -f interface\stlink-dap.cfg -f target\stm8s103.cfg -c "init;load_im
Ha, indeed!
If I open openOCD with just `openocd -f interface\stlink-dap.cfg -f
target\stm8s103.cfg` and use telnet to connect to localhost: and then do
~~~
> load_image
> {C:\Users\Max\Documents\PlatformIO\Projects\stm8_testing\.pio\build\stm8sblue\firmware.bin}
> 0x8000
2576 bytes writt
I don't have an stm8 board with me to verify, but I went reading back the
source code of openocd.
The current implementation of stm8 in openocd does not define a flash, so the
normal commands for flashing should not work.
The flash is managed as part of the global memory.
My understanding is th
Addendunm since I can't apparently update the existing ticket (?).
The used chip is a STM8S103F3, connected to an ST-Link V2 clone with the SWIM
interface. The target board is powered via USB. The STLink has the latest
firmware according to the STM32CubeProgrammer firmware upgrader.
Link to bo
---
** [tickets:#293] STM8 program command fails with "invalid subcommand
write_image erase.."**
**Status:** new
**Milestone:** 0.10.0
**Labels:** stm8 flashing
**Created:** Sat Jan 16, 2021 05:37 PM UTC by Maximilian Gerhardt
**Last Updated:** Sat Jan 16, 2021 05:37 PM UTC
**Owner:** nobody