Hello,
I'm aiming for flashing the nrf52832 via SWD via my own SWD implementation.
I'm good so far with the init phase, reading IDCODE writing registers. Long stort short: communication is fine (DP/AP, parity, read/write, addresses, ..).
After looking at Logic Analyzer dumps, OpenOCD- as well as blackmagicprobe code for hours now, I didn't manage yet, though, to fully understand how to flash arbitrary images (as in: nrf52 hex firmware images).
Apparently OpenOCD uploads and runs some ASM code needed to actually program the flash[1].
While the black magic probe code looks cleaner, I still don't manage to map, bytes from the hex file I'm about to flash, to SWD DP/AP commands and - in case of write commands - 32bit values.
Is there any documentation about those SoC specific features (programming the flash)?
Or is anybody willing to guide me a bit for better understanding? I'm more than happy to write down and publish some documentation myself after I got the missing pieces.