Main Site Documentation

BrainPad Arduino Code Programming via the serial SWD Interface


#1

In his Video tutorial Gus pointed out, how the BrainPad can run native code developed with the Arduino IDE.


The procedure of getting the code to the board however was a little bit inconvenient.
The binary code file was exported by the Arduino IDE, then converted into a .dfu file with the DfuFileMgr and at last the .dfu file deployed to the board with the DfuSeDemo Program.
Using a ST-Link Adapter the BrainPad can be programmed with Arduino Code similar to regular Arduino boards.
I used the Waveshare ST-LINK/V2 (mini) adapter.
On the BrainPad the pins that have to be used (SWDIO and SWCLK) are connected to two solder points on the board near the CPU.
The SWCLK is near the CPU, the SWDIO a little bit more in direction to the USB Connector. These two pins and GND have to be connected to the corresponding pins of the ST-LINK Adapter. In the Arduino IDE under Tools --> Upload Method select STLinks and off we go.


Running Arduino on the BrainPad
Running C/C++ using Mbed on the BrainPad TechTalk - 046