bitcraze / crazyflie-firmware

The main firmware for the Crazyflie Nano Quadcopter, Crazyflie Bolt Quadcopter and Roadrunner Positioning Tag.
GNU General Public License v3.0
1.14k stars 1.03k forks source link

"make cload" error in WSL2 #1390

Open Yuhang-Yohoo opened 5 days ago

Yuhang-Yohoo commented 5 days ago

Hello devs! I had some problems when I was trying to upload the firmware via Crazyradio and debug in Vscode, WSL2, Windows. The instruction I followed is this. I am not sure if this is caused by WSL or my configuration.

The first problem happened when I tried to make cload:

image

The second when I tried to connect to the drone through emulator: image image image

Any suggestions will be appreciated!

Yuhang-Yohoo commented 4 days ago

I solved both of them.

for the first problem

I finally realized it was caused by the Python fault in Windows. To make it work, be sure:

The last step is omitted by the "on-chip debugging" instruction but can be found in other documents.

for the second problem

My emulator is Jlink12 from SEEGER, I tried to reach the cortex via Jlink console and found the Crazyfile chip can only be visited in SWD mode. So the solution is :

And then I can enter the breakpoint in main.c.

Aslo another suggestion is this tutor includes some deprecated expressions, an updation will be helpful for new beginners.

ataffanel commented 2 days ago

Thanks a lot for posting the answer! I started looking at the documentation and indeed it is not up to date with the latest WSL development. I have started working on updating it.