bootloader dont't work

Firmware/software/electronics/mechanics
Post Reply
sunmeric
Beginner
Posts: 5
Joined: Sat Mar 29, 2014 9:39 am

bootloader dont't work

Post by sunmeric »

hi all,
i'm trying reflash stm32 bootloader and nrf bootloader with my CF2.but it doesn't work after i flash them. no leds light up
flash bootloader in bitcraze vm like this:
first of all flash stm32 bootloader use stlink/v2
1,make
2,make flash
second,enter into crazyflie2-nrf-bootloader folder
1,make(have download softdevice and s110)
2,make flash

did i do something wrong or missing some steps?
i have already tried to flash .bin file at this url https://github.com/bitcraze/crazyflie-release/releases in windows enviroment by STM32 ST-LINK Utility.but it also doesn't work.
looking forward to your reply.thanks!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: bootloader dont't work

Post by arnaud »

Hi,

A couple of questions:
- Which bootloader are you using for stm32, the project crazyflie2-stm-bootloader ?
- Are you sure you are using the NRF programming port on the side of the Crazyflie to flash the nrf?

For the NRF you should use the factory-reset target from make in the crazyflie2-nrf-firmware repos since there is more than just the bootloader involve in the boot sequence. See the readme: https://github.com/bitcraze/crazyflie2- ... chitecture

Best,
Arnaud
sunmeric
Beginner
Posts: 5
Joined: Sat Mar 29, 2014 9:39 am

Re: bootloader dont't work

Post by sunmeric »

hi aruand,
thank you for your reply.
my steps are:
i use bitcraze_VM_2016-06 ,in crazyflie2-nrf-firmware open a terminal and use this cmd
1.make BLE=0 S110=0
2.make factory_reset
terminal likes this:
Info : STLINK v2 JTAG v25 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.899476
Info : nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* nrf51.cpu hla_target little nrf51.cpu running
in procedure 'reset'
in procedure 'ocd_bouncer'


make[1]: *** [flash_cload] Error 1
make[1]: Leaving directory `/home/bitcraze/projects/crazyflie2-nrf-firmware'
make: *** [factory_reset] Error 2
bitcraze@bitcraze-vm:~/projects/crazyflie2-nrf-firmware$

its shown two errors,why?but after this step the blue led have blinked.
then enter to ''crazyflie2-stm-bootloader'' folder open a terminal run two cmds like this:
1.make
2.make flash
the led3 bule led have blinked.Is that right? ''crazyflie2-nrf-bootloader'' this folder still not used.does it unuseful?
I do not know whether these operations are correct?
Could you please tell me the details of the steps and command to flash both stm32 and NRF51822?
Thank you for everything!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: bootloader dont't work

Post by arnaud »

What you are doing seems correct but are you using the NRF programming port to program the NRF? https://wiki.bitcraze.io/projects:crazy ... x#assembly

Also make sure one battery is connected when reflashing both CPUs (since the nRF is handling power management we have seen some problem with that and we always have VBat active when flashing the system in factory).
kekeller
Beginner
Posts: 27
Joined: Wed Oct 05, 2016 3:44 pm

Re: bootloader dont't work

Post by kekeller »

What happens if you hold down the power button while connecting power? Can be tricky to connect the battery one handed so I use a power supply with a button.

1. Disconnect battery
2. Hold power button
3. Connect battery/power

If the bootloader is working the blue led(s) should start to blink and then you can use cfload to flash new firmware onto the system.

If that is not working then yes, the bootloader(s) are broken. I have had good luck using gdb to load and then flash the software components starting with the NRF bootloader and working up the chain. Upon reboot the system should work.

NOTE: Try using make clean to reset the build. I had some issues with the NRF bootloader based on the softdevice and a make clean fixed it.
Post Reply