debug configuration

Discussions about all things Bitcraze
Post Reply
liuyuzhen
Beginner
Posts: 14
Joined: Sun Sep 24, 2017 4:07 am

debug configuration

Post by liuyuzhen »

Hello,

I recently ran into a problem while debugging crazyflie with stlink. I followed the procedure: “To start debugging go into the "Run -> Debug configurations..." dialog and under "GDB OpenOCD Debugging" I find "Crazyflie 2.0". Press the debug button”.
It should start the debug and hit a breakpoint at main, but it didn't. The eclipse interface is shown below Fig. 1 and Fig. 2. I don't know what the problem is. But I've done it before, and it stops at the break point of the main function.
Attachments
2.png
1.png
liuyuzhen
Beginner
Posts: 14
Joined: Sun Sep 24, 2017 4:07 am

Re: debug configuration

Post by liuyuzhen »

Looking forward to your reply. Thank you very much.

Jackie
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: debug configuration

Post by tobias »

You entered the Hard fault handler before reaching main. Probably because you flashed a bad FW.
josbat
Beginner
Posts: 2
Joined: Mon Nov 05, 2018 8:39 pm

Re: debug configuration

Post by josbat »

Hi, Im a beginner,
Why can't i debug the crazyfile 2.0 with Crazyradio PA 2.4 GHz USB dongle other than the Debugger kit, can you please explain in briefly.

Thank you
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: debug configuration

Post by arnaud »

Hi josbat, are you having the same problem as the original poster in this topic? if not please create a new topic with a bit of context.

A quick answer: if you want to set breakpoint and look into the CPU state you need a debug adapter since this is the only way to connect to the STM32 debug port. Crazyflie has many development subsystem like log and param that allows to work with the firmware without having to use a debugger, basically as long as you are not doing low lever driver work you should not need a debug adapter (we very rarely use one).
Post Reply