» S
h
o
w
 
M
e
n
u
» S
h
o
w
 
M
e
n
u
Page Content

Debugging Firmware

The AutoQuad is equipped with a SWD connector. SWD or Serial Wire Debug provides a debug port to interface with the development suite (IDE). Connected to the SWD port, the Crossworks IDE can execute realtime debugging, in program change or monitor values, parameters or even code. You can set breakpoints in the code.
To use the SWD port, an USB to SWD interface is needed. A LOT of interfaces are available but a frequently used is the STLink (v2) interface. The following section will explain how to attach the STLink, connect to the crossworks studio and a small debugging session.
This is not meant as a complete tutorial, experience users already know this vital part of developing code and for starters the AutoQuad is probably not the best starting point.

References:
Rowley (crosswork studio) has a number of tutorials online

A great command for displaying realtime debugging information, is the insert of the ‘debug_printf‘ command in your code. For example to debug the number of loaded waypoints:

    debug_printf("Mission leg loaded no#: %x\n", leg);
This page was created on 17-Oct-14 by MaxP.