Failed upload to STM8S103F3 board

I am using Arduino ide 2.3.6 to program stm32 blue pill using a st link v2. And everything works great!
Now when I replace the blue pill with a STM8S103F3 breakout board and got this -
Failed uploading: uploading error: exit status 0xc0000005

I think the STLink needs to have some jumpers moved to program an STM8 device.

STLink doesnt seem to have any jumpers. I finally managed to flash it using ST Visual Studio (Cosmic compiler) and ST Visual Programmer.

It seems the issue was with the read out protection not allowing the ST Link to be discoverable/accessible. I could set this off using the ST Visual Programmer and then flash the STM8 board.

Will try with Arduino IDE now and update here.

I am sure you can program this with Arduino IDE now.
I had the same issue.
Ordered 20 pieces of this from China, and for some unknown reason these guys send these very cheap PCB's out with read protection enabled.
That also means you can't upload a new code to it.
You do not need to do any settings on a STLink /v2, just connect the correct pins (which are next to each other, but in a different order between STLink and your PCB).
After painstakingly searching for a solution for this and finding out about this read protection and how to solve that, i can now upload code through Arduino IDE to all 4 boards i tested so far.
Resetting the read protection, should also clear the code memory so it's impossible to find out what was in the thing that needed protecting it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.