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