notice the "# reset_config srst_only" line - I disabled RESET handling. Then I created stm8s001.cfg file, being direct top-level entry for openocd, utilizing the newly created stm8nr.cfg:
Side note:
The STM8S001J3 can get OTP easily, just stop bering careful when configuring IO pins, citation from datasheet.
As the NRST pin is not available on this device, if the SWIM pin should be used with the I/O pin functionality, it is recommended to add a ~5 seconds delay in the firmware before changing the functionality on the pin with SWIM functions. This action allows the user to set the device into SWIM mode after the device power on and to be able to reprogram the device. If the pin with SWIM functionality is set to I/O mode immediately after the device reset, the device is unable to connect through the SWIM interface and it gets locked forever. This initial delay can be removed in the final (locked) code.
As SWIM pin is shared with PD1, PD3, PD5 abd PC6 pins (this is apparently chip intended for larger package, looks like chip for STM8S0003), chances of screwing up the GPIO configuration are somewhat higher.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wasn't aware I can "reconfigure" the reset config so easily. I tested your setup, works as well and unlike my two attempts, it's simple and elegant, thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I tested new 8-pin STM8S001J3 devices with STM8 GDB project. Since those devices lack NRST pin, I had to create stm8nr.cfg file
notice the "# reset_config srst_only" line - I disabled RESET handling. Then I created stm8s001.cfg file, being direct top-level entry for openocd, utilizing the newly created stm8nr.cfg:
And everything works as expected.
Side note:
The STM8S001J3 can get OTP easily, just stop bering careful when configuring IO pins, citation from datasheet.
As SWIM pin is shared with PD1, PD3, PD5 abd PC6 pins (this is apparently chip intended for larger package, looks like chip for STM8S0003), chances of screwing up the GPIO configuration are somewhat higher.
Now I created new config file for STM8S001J3, not needing stm8nr.cfg file anymore
It doesn't utilize universal stm8.cfg, it has everything in single file.
Thanks for your good work,
what about just call the stm8.cfg then on the next line add "reset_config none" ?
I wasn't aware I can "reconfigure" the reset config so easily. I tested your setup, works as well and unlike my two attempts, it's simple and elegant, thanks.