How to generate the zip file for upgrade?

Discussions about all things Bitcraze
Post Reply
bnblzq
Beginner
Posts: 15
Joined: Wed Jul 24, 2019 3:07 am

How to generate the zip file for upgrade?

Post by bnblzq »

HI,

I just wonder about how to generate the zip file for upgrade ?

I have tried "tools/build/build" in crazyflie-firmware ,with the suffix "platform" , but finally I got the file "platform",which doesn't seem like a zip format. and some other files like "cf2.bin" "cf2.dfu" ,which are used under dfu mode.
3.png
any body can help me that the way to generate the zip file ? many thanks
bnblzq
Beginner
Posts: 15
Joined: Wed Jul 24, 2019 3:07 am

Re: How to generate the zip file for upgrade?

Post by bnblzq »

I can use make cload to update the firmware in stm32, but I still want to figure out how to generate the complete zip file.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: How to generate the zip file for upgrade?

Post by kimberly »

There is no function to create the entire zipfile automatically, but have you found this wiki page yet? https://wiki.bitcraze.io/doc:crazyflie: ... der:client.

Also you could download the latest release zipfile and replace the .bin files in that file with the ones you made locally on your machine.
bnblzq
Beginner
Posts: 15
Joined: Wed Jul 24, 2019 3:07 am

Re: How to generate the zip file for upgrade?

Post by bnblzq »

replace bin file seems like a good solution, just with a little time costing :D
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: How to generate the zip file for upgrade?

Post by kristoffer »

Hi!

The zip file is the top level of our releases, bundling binaries from multiple repositories, so this is done in the https://github.com/bitcraze/crazyflie-release repo.
The actual ziping is done in https://github.com/bitcraze/crazyflie-r ... ackage#L50. This script pulls down binaries from the appropriate github repos and bakes the zip from those.
bnblzq
Beginner
Posts: 15
Joined: Wed Jul 24, 2019 3:07 am

Re: How to generate the zip file for upgrade?

Post by bnblzq »

thanks for replying.

Actually I have read the code about packing the separate files into one zip. And I realised that the python file download the existing file from github according to json file. So now I am trying to modify the packge.py, redirecting the source to the firmware directory in my local ubuntu.

The question is that ,as I said above the python downloads the bin file according to the json, if I really force the package.py to copy the file to the zip, the contents inside json file does not correspond to the bin file name ( e.g. cf2.bin in firmware directory but cf2-2019.02.bin) . I wonder whether the mismatch of the file names will effect the behavoir of pc client when unpacking the zip file for flashing ?

Thank you ~
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: How to generate the zip file for upgrade?

Post by kimberly »

the names in the .json file ofcourse needs to match the file name. So either change the bin files to be similar or change the .json file to match the .bin files name?
bnblzq
Beginner
Posts: 15
Joined: Wed Jul 24, 2019 3:07 am

Re: How to generate the zip file for upgrade?

Post by bnblzq »

by the way, I'd like to mention that it is possible to flash cf.bin directly via cfclient , instead of generating total zip flie.
during flash
during flash
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: How to generate the zip file for upgrade?

Post by kimberly »

Yes that is also possible. This only works for the STM32 though. For the NRF51 you still would need to use the zipfolder.
Post Reply