bitcraze / aideck-gap8-examples

Examples on how to use the GAP8 on the AI-deck
50 stars 53 forks source link

CFloader flash img hangs at 99% with the classification demo #104

Closed knmcguire closed 2 years ago

knmcguire commented 2 years ago

Discussed in https://github.com/orgs/bitcraze/discussions/369

Originally posted by **chengliu-LR** November 7, 2022 Hi all, I am using cfloader to flash some `target.board.devices.flash.img` to AI-Deck. For typical `img`s like the `wifi-demo` and `pulp-dronet`, it works perfectly. However, when it comes to the `classification-demo` and my own compiled programs, the cfloader hangs at `\ 99% Writing to bcAI:gap8 deck memory` everytime. Do you know possible reasons for this? Thank you!
knmcguire commented 2 years ago

So after investigations it seems that any binary file larger than 747776 Bytes fails with the cfloader (getting stuck at 99%), and the classification example is 747792 Bytes large!

This was possible to flash before... so what changed? The docker file itself hasn't changed, but perhaps the autotiler that needs to be pulled with that version is updated somehow?

chengliu-LR commented 2 years ago

I also tried this binary file (can be downloaded through the following Google Drive link): https://drive.google.com/file/d/1n7XXOmcSYcQdgXulDZKMPk2j9ynTmhyN/view?usp=sharing

This binary file is a CNN pytorch neural network, quantized by nemo and compiled by dory. It seems that although it is 993KB large (exceeds 747776 Bytes), it can still be flashed by cfloader. So the file size might not be the issue.

knmcguire commented 2 years ago

Hmm interesting! Where are you currently with the firmware of the aideck+ crazyflie? release 2022.09 or latest development branch? Will try this binary out soon.

Yes I agree, it would be really weird if the filesize was the case, as it should be able to handle 60 MB or something like that?

knmcguire commented 2 years ago

Oh wait I see that you answered my question on https://github.com/orgs/bitcraze/discussions/369 already. So your firmware is on commit 5c4261e5a9ff (CLEAN) but you've tried 2022.5 and 2022.9 as well.

hmmmm really strange! The plot thickens... but we need to investigate this more. Thanks for sharing though!

krichardsson commented 2 years ago

Other examples are

1000 bytes works 2000 bytes fails