This is a OpenMower mainboard firmware replacement to work with OpenMowerROS2 alternative ROS software. More details about this firmware can be found in documentation.
By default, Raspberry Pi SWD on a remote Raspberry Pi is configured as the upload & debug protocol.
To use it, you need to install on a target Raspberry Pi an openocd with support for the Raspberry Pi SWD interface. Please refer to the RaspberryPi documentation for more information.
On the hardware side, you need to connect the Raspberry Pi SWD interface to the target SWD interface. Luckily, on the OpenMower mainboard there is are circuits to do so. All you have to do is to use 4 jumpers on J22.
When executing build/debug target, along with firmware, the bash script will be deployed to target Raspberry Pi and executed.
platformio run -t upload
(note: you can use pio run
as well, so it doesn't upload to target)
Since I haven't managed PlatformIO to run my command beforehand, you need to run it manually:
scp ./utils/remote-openocd.sh openmower.local:/tmp/remote-openocd.sh && ssh openmower.local /tmp/remote-openocd.sh debug
Then you can run debugging session in your IDE. (VSCode or CLion)