[SOLVED] Flashing new firmware does not actually flash?

Post here to get support
Post Reply
mnjn
Beginner
Posts: 4
Joined: Sun May 17, 2020 1:06 am

[SOLVED] Flashing new firmware does not actually flash?

Post by mnjn »

I was messing around with custom firmware and flashed a simple program that just lit up the right green LED. Well, now if I try to flash the original firmware, my LED program keeps on running. I've tried it with the ST-Link, and it says it flashed and everything, but it clearly doesn't. My LED program clearly still runs.

If I try using

Code: Select all

make cload
then it can't find my Crazyflie even though I can put it in bootloader mode (right blue LED blinking). The interesting thing is, if I simply have my LED program running, and I use

Code: Select all

make cload
with

Code: Select all

CLOAD_CMDS ?= -w radio://0/80/2M
set in the Makefile, it's able to find and connect to the Crazyflie and put it in bootloader mode! Except that it isn't able to flash anything to it, and exits with:

Code: Select all

Failed to warmboot
make: *** [cload] Error 255
Anyone have any idea what could be going on?

Thanks.
Last edited by mnjn on Wed May 20, 2020 4:55 am, edited 1 time in total.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Flashing new firmware does not actually flash?

Post by kimberly »

If your LED program was not based on the crazyflie firmware, then I'm afraid that the original bootloader have been overwritten by your custom firmware.

You would need follow the instructions to reflash the bootloader on the STM through this forum thread through dfu: viewtopic.php?f=5&t=3225&p=15771&hilit= ... der#p15771
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Flashing new firmware does not actually flash?

Post by kimberly »

You can also use your debugger btw. If you clone this repo: https://github.com/bitcraze/crazyflie2-stm-bootloader and do

Code: Select all

make clean
make all
make flash
This will also reflash the bootloader, and then you are able to flash crazyflie firmware code again.
mnjn
Beginner
Posts: 4
Joined: Sun May 17, 2020 1:06 am

Re: Flashing new firmware does not actually flash?

Post by mnjn »

Ah, that makes sense! I was actually able to get the Crazyflie firmware to flash onto the board again by using st-link instead of OpenOCD, but remote flashing with cload wouldn't work. Now I see why, thank you!
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: [SOLVED] Flashing new firmware does not actually flash?

Post by kimberly »

Ah great. I guess it would also help if you know the address of the bootloader so that you can flash the custom firmware on the same spot as the CF firmware without affecting the bootloader. That might be easier for developing your own code

Let us know if you having any more problems!
Post Reply