AI-deck GAP8 flash issue

Discussions about the AI-deck
Post Reply
WendaZ
Beginner
Posts: 14
Joined: Sun Jul 14, 2019 10:35 pm

AI-deck GAP8 flash issue

Post by WendaZ »

Hello,

Recently, I encountered an issue when flashing the GAP8 code onto the AI deck.

Background:
gap_sdk version 3.8.1 (locally installed on a clean Ubuntu 20.04)
Debugger:
brand new (1) JTAG ARM-USB-TINY-H (2) ARM JTAG 20-10 adapter (3) USB cable

The crazyflie is flashed with the lastest firmware online.

I am able to run the FaceDetection example and other customized code through JTAG wired connection.
However, when I flash the code onto the AI deck, the code doesn't seem to work.

For FaceDetection example, with wired connection, I can see the wifi stream with the detected face in a black box.
When I flash the code with "make image" and "make flash", I cannot see the wifi stream anymore and consequently, I cannot confirm if the code is working.

With the customized code, I set the GAP8 led to blink. However, after flashing onboard, the led doesn't blink (though the code works with wired connection)

During the flash process, I didn't see any errors in the terminal. (see the attachment)

My questions are
(1) Is there a way to validate if the code is running after flashing onboard?
(2) What could be the reason of causing this? Bootloader or hardware problem of the flash?


Looking forward to the reply.

Thanks in advance!
Attachments
flash-printout.png
gemenerik
Beginner
Posts: 19
Joined: Wed Apr 07, 2021 11:11 am

Re: AI-deck GAP8 flash issue

Post by gemenerik »

Hello Wenda,

Yes, the printout in the terminal looks good!

All I can think of to verify your code is running is through some peripheral (LED, streaming over WIFI, communicating over UART with STM32).
I do believe you have to reboot your GAP8 chip before it actually runs flashed code. (have you tried turning it off and on again)

Also, about the commands for flashing, I recommend running "make clean all flash", this first cleans the project (you don't always have to do this, but sometimes it's better to be safe than sorry), then actually compiles it (which doesn't happen when you "make image" or just "make flash", then flashes it.
WendaZ
Beginner
Posts: 14
Joined: Sun Jul 14, 2019 10:35 pm

Re: AI-deck GAP8 flash issue

Post by WendaZ »

Hi gemenerik,

Thanks for the quick reply!

I have tried turning it off and on again. But it doesn't solve the problem.

Using "make clean all flash" seems to be a good way for flashing, I will try if this can make the code work onboard.

Will let you know if the problem is resolved.

Thanks.
WendaZ
Beginner
Posts: 14
Joined: Sun Jul 14, 2019 10:35 pm

Re: AI-deck GAP8 flash issue

Post by WendaZ »

Hi,

After reflash several times, the Face detection example is working onboard.

For my customized code, I find adding a 5-second delay at the beginning helps to run the flashed code onboard.
My suspicion is that there are some conflicts at the initialization which sometimes causes crashes during the start stage.


Regards,

Wenda
gemenerik
Beginner
Posts: 19
Joined: Wed Apr 07, 2021 11:11 am

Re: AI-deck GAP8 flash issue

Post by gemenerik »

I'm glad you got it to work. Curious behavior! We've taken note.
Post Reply