Debugging Arduino Due
I have received a small ftdi board for my projects and I'm very pleased with its capabilities. One of the meany usage for this little board is the ability to debug ARM micro controllers like the one used in the Arduino Due.
Hardware connection is described in one of OpenOCD config files. One small rezistor is necessary for the debugging cable (I have chosen a 330 Ohm).
# FTDI Target # ---- ------ # 1 - Vref ----------------- Vcc # 3 - nTRST - # 4 - GND ----------------- GND # 5 - TDI ---/\470 Ohm/\--- SWDIO # 7 - TMS - # 9 - TCK ----------------- SWCLK # 11 - RTCK - # 13 - TDO ----------------- SWDIO # 15 - nSRST - - - - - - - - - nRESET
The connection to the arduino board is made simple by the exposure of the 4 SWD debug pins.
After some minor tweeks I did managed to find a stable configuration. Some things are somehow not working as expected but this I belive are mainly SW issues. The FreeRTOS integration is not 100% and I did add some changes to make-it work:
FreeRTOS port.cconst int __attribute__((used)) uxTopUsedPriority = configMAX_PRIORITIES - 1;Arduino GCC platform.txt
compiler.c.elf.flags=-Os -Wl,--gc-sections -Wl,--undefined=uxTopUsedPriority