Cant remove klipper or flash

I upgraded from octoprint and stock firmware to use Klipper.

Built and flashed. Printer error “cannot connect to MCU”. Did something wrong and tried to revert back to stock firmware.

Using the SD card to flash no longer works. Just ignores the file. Have tried different file names, a marlin community build etc.

Ok.

Read the guide here about resetting a v3. My mainboard does not have tbe boot and reset buttons, or pads. Found the reset, not the boot.

Ok.

Got a STMcube programmer. Soldered on the header pins to the board.

Great. Stm recognises the board and lets me flash. Flashed the stock firmware. Reboot. Nothng.

If I minicom to the named pipe, the printer response is its stil running Klipper.

Ok.

Flash again using stmcube. All.logs say success.

Minicom to the device still says Klipper.

What is going on?

Can anyone pleae help guide me to get my printer back to stock fw?

I worked it out and leave this post here in case it save some other poor soul in the future…

  1. Full chip erase with stm3cube
  2. Built the creality source from scratch adding this section. The env name came from the default_envs section

[env:stm32f103ret6_creality]
upload_protocol = stlink

  1. Found the offset of my compiled firmware by running

arm-none-eabi-objdump -h firmware.bin

This was 0x08007000

5 flashed to this offset. The default is 0x08000000 and doesnt work

And boom, printer up and runnning

I found after this, stm3cube couldnt see the SWD port, unless i pulled thr reset line to ground while pressing “connect” and disconnecting within half a sec

Apparently this is normal.process when its in app mode and the cheap clone stm programmer reset line doesnt work.

So yeah. Got it working and have the dongle hanging out of the case and can now flash it, even if it gets bricked.

If anyone ever gets stuck, send me a message and Ill try to help.

The most painful part of the process was soldering the contacts on the motherboard, as it was thick and the pin hole was full of solder. I’d suggest using the clip of debug header rather than soldering on a pin header like I did, althouh I didnt have one to hand, and did have an iron, solder sucker and pin header handy.

If you reading this and are in the same position as I was, good luck. You could also buy a replacement board online cheap if this process isnt sounding like fun. As it was not