Flashing the Firmware

Firmware/software/electronics/mechanics
Post Reply
Involved
Beginner
Posts: 2
Joined: Sat Sep 21, 2013 10:31 pm

Flashing the Firmware

Post by Involved »

Hi!

Due to some projects I was doing, I ended by flashing other codes in my quadcopter. However, I was able to reflash the .elf(using make flash) that was already created in my VM (I haven't recompiled this one), but now I need to make some changes in the firmware but I'm not being able to correctly reflash.

Doing: make, and then make flash, I get no errors and it seems to flash the .elf in the quadcopter, however it doesn't work as it should. Only the Blue LED is on and there are no tests.
I also get these in the make flash:

Code: Select all

Error: stm32f1x.cpu -- clearing lockup after double fault
target state: halted
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0x00000003 pc: 00000000 msp: 0x464c4554
Polling target failed, GDB will be halted. Polling again in 100ms
shutdown command invoked
Polling succeeded again
After that, I tried to flash first the bootloader, what seems to work, but then, when I try to flash the firmware, using make cload, I get this error

Code: Select all

python ../pc_util/crazyclient/crazyload.py flash cflie.bin
python: can't open file '../pc_util/crazyclient/crazyload.py': [Errno 2] No such file or directory
make: *** [cload] Error 2
I'm using the Bitcraze VM and busblaster.

Someone has some idea about what I'm doing wrong or what I should do to be able to correct flash the crazyflie-firmware?

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

Re: Flashing the Firmware

Post by tobias »

If you flash it with a JTAG you need to flash it with CLOAD=0. When doing this it will erase the bootloader but you can put it back later if you want.

Code: Select all

make CLOAD=0 DEBUG=1
make flash
Involved
Beginner
Posts: 2
Joined: Sat Sep 21, 2013 10:31 pm

Re: Flashing the Firmware

Post by Involved »

Thank you for your reply. I was able to flash and make the firmware to work.

I don't understand what is the purpose of the bootloader. I will use it only to flash using the crazyradio?

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

Re: Flashing the Firmware

Post by tobias »

When you have a JTAG programmer and are doing development I think that is the best option, but since you only need the Crazyradio to flash it with the bootloader it is a great option for those that don't have a JTAG.
Post Reply