Bitcraze VM Firmware loading

Firmware/software/electronics/mechanics
Post Reply
Triplevvv
Beginner
Posts: 12
Joined: Sun Aug 03, 2014 4:09 pm

Bitcraze VM Firmware loading

Post by Triplevvv »

Hello,

I was trying to load firmware onto my crazyflie via the vm, but after I bootload (With no errors that are shown) It renders my crazyflie into some sort of state where it does not respond. I have to fix it by reloading the original firmware through the desktop PC client. It does the same with unmodified code through the VM, also. I am using Windows 8, if that helps.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Bitcraze VM Firmware loading

Post by arnaud »

Hi,

Which file are you bootloading and how?
Triplevvv
Beginner
Posts: 12
Joined: Sun Aug 03, 2014 4:09 pm

Re: Bitcraze VM Firmware loading

Post by Triplevvv »

Hi, Thanks for replying

Using Eclipse in the Bitcraze VM, I 'make for radio bootloader' build and then 'flash via radio' just like shown in the 'logging and parameters youtube video' on bitcraze video channel. I have made no changes to the code in Eclipse through the bitcraze virtual machine. It also flashes to the crazyflie with no errors shown, so I am assuming that it is successfully loaded on the crazyflie. But in the video, once the firmware is loaded, I see the crazyflie restart and the motors turn briefly (POST). In my case this does not happen.

I am using Windows 8 as my base machine.

Any advise will be much appreciated.

PS. Ran another test. It seems that inside the oracle VMbox bitcraze vm, Whether I bootload using eclipse or cf client, it does not seem to restart in firmware mode.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Bitcraze VM Firmware loading

Post by arnaud »

Hi,

I just tested and 'for me it works' which is not really helpful.

I openned the vitual maching 0.5, update to latest revision of the repos, and make:

Code: Select all

bitcraze@bitcraze-vm:~$ cd projects/crazyflie-firmware/
bitcraze@bitcraze-vm:~/projects/crazyflie-firmware$ make
 (... everything compiles ....)
Build gead7f60b5ce1:ead7f60b5ce1 (2014.01.0-11) CLEAN
CrazyLoader build!
   text	   data	    bss	    dec	    hex	filename
  57144	    504	  19560	  77208	  12d98	cflie.elf
bitcraze@bitcraze-vm:~/projects/crazyflie-firmware$ make cload
../crazyflie-clients-python/bin/cfloader flash cflie.bin
Restart the CrazyFlie you want to bootload in the next  10 seconds ...
Connection established!
Flash pages: 128 | Page size: 1024 | Buffer pages: 10 | Start page: 10
118 KBytes of flash avaliable for firmware image.

Flashing 57651 bytes (57 pages) ..........10..........10..........10..........10..........10.......7
Reset in firmware mode ...
Done!
bitcraze@bitcraze-vm:~/projects/crazyflie-firmware$
Do you have printouts that looks different? Do you have a config.mk file in the firmware folder? (it is possible to build a firmware with no bootloader support by writing CLOAD=0 in config.mk, then it would behave as you described).
Triplevvv
Beginner
Posts: 12
Joined: Sun Aug 03, 2014 4:09 pm

Re: Bitcraze VM Firmware loading

Post by Triplevvv »

Thanks. I would try to look into my firmware code, but when I tried to start the VM, It gave me an error message , and when I tried to re-import the vm it gives me this message:


Failed to import appliance C:/Users/Vik/Downloads/Bitcraze_VM_0.5 (1).ova.

Could not create the imported medium 'C:\Users\Vik\VirtualBox VMs\Bitcraze VM 0.5\Bitcraze VM 0.5-disk1_1.vmdk'.

VMDK: Compressed image is corrupted 'C:\Users\Vik\Bitcraze VM 0.5-disk1.vmdk' (VERR_ZIP_CORRUPTED).

Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: Appliance
Interface: IAppliance {3059cf9e-25c7-4f0b-9fa5-3c42e441670b}

Any help? Thanks
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Bitcraze VM Firmware loading

Post by arnaud »

I would guess that you somehow have a corrupted ova. Did you try to re-downloading it? If you download it with torrent you can be sure that the file is not corrupted.
steven
Beginner
Posts: 1
Joined: Thu Aug 28, 2014 8:41 am

Re: Bitcraze VM Firmware loading

Post by steven »

I also got this error,
Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: Appliance
Interface: IAppliance {3059cf9e-25c7-4f0b-9fa5-3c42e441670b}

By google search, I find it because I use google chrome to download, but chrome not support downloading file large than 2G, so the ova file I get is only 2GB(a complete one is 2.49GB).
Try to use IE or torrent file download again.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Bitcraze VM Firmware loading

Post by arnaud »

Thanks for the tips!

Overall torrent is the 'safest' way to download as it guarantee the file integrity. Even when downloading with the direct link the torrent can be used to check the file: just open the torrent and ask the torrent client to download in the same folder it is already saved. First thing the torrent client will do is to check the file integrity and tell you if the file is complete or not.
Post Reply