Hi! I want to design SWD-CAN bridge to program and debug STM32 devices via CAN. The bootloader is not suitable because it can upgrade firmware to CPU, but not allow tracking. I need something like ST-LINK, but with CAN interface.
My idea: the board have, simplifying, 2 CPU: 1 - main CPU, which do base program, and 2 - CPU, which can reprogram main CPU and wath for additional information (safety function). CPU#2 receive frames via CAN bus by predefined protocol, hold its in memory , check for errors, and then (if no errors found), load it to CPU#1 via SWD. User can look for program using STM Studio or something else. There are no need in printf (something).
But I did not find nor description of SWD for Cortex M3, nor code examples of making SWD master.