User Tools

Site Tools


projects:virtualmachine:jtag_debug

Prerequisites

Crazyflie 1.0

To be able to debug the Crazyflie 1.0 using JTAG you will need to solder the extra connector that is packaged with the Crazyflie on pins 1-10 on the EXT connector <insert image>. You will also need a JTAG debugger. The virtual machine is pre-configured to use the STLink v2 but can be set-up with any JTAG device that openOCD supports.

Crazyflie 2.0

The debug adapter is needed (or a cable could be made) to convert the ARM 20pin JTAG connector to the 6pin JST connector used on the Crazyflie 2.0. You will also need a JTAG/SWD debugger. The virtual machine is pre-configured to use the STLink v2 but can be set-up with any JTAG/SWD device that openOCD supports.

The STM32F405 debug connector is located under the micro USB connector.

The nRF51 connector on the other hand needs to be soldered as part of the debug adapter kit. However you can probably do with just updating this using the radio bootloader as most of the development is done on the STM32F405.

Debugging

In order to start debugging do the followning:

  • In the “Make Targets” view double-click Make DEBUG to build the firmware and then double-click Flash using debugger to flash it. Flashing the debug build will overwrite radio bootloader which will have to be put back if flashing over radio is wanted again.
  • Start the debugging by selecting “Run → Debug Configuration…” dialog.
  • Then select “GDB OpenOCD debugging → Crazyflie 2.0”
  • Press the debug button in the bottom right corner to start debugging.
  • When the above is done one time you can use the quick menu instead which is the icon looking like a litte bug and select “Crazyflie 2.0” from there.
  • The debugger is set to break at main which you can change if you like in the debug configuration settings for Crazyflie 2.0.
projects/virtualmachine/jtag_debug.txt · Last modified: 2016-10-10 11:41 by tobias