Grove AI HAT for Edge Computing

Grove is a modulated, ready-to-use tool set.
Much like Lego, it takes a building block approach to assembling electronics.

Moderators: lily.li, violet, jeremy882, crail.lyu969

tristan.mumford
Pre-kindergarten
Pre-kindergarten
Posts: 13
Joined: Mon Apr 15, 2019 6:49 pm

Re: Grove AI HAT for Edge Computing

Post by tristan.mumford » Sat Jul 13, 2019 7:10 am

As I said before, I managed to build the Kendryte toolchain for the Jetson nano. Last night I tried building the hello_world example in the standalone SDK and was successful. Haven't tested it though.

As for the Pi3. Hours of trial and error to get the Kendryte toolchain to build.
I was eventually successful. Install and build gcc-5 g++-5 and gcc-5-base.
After doing the configure dance, make it with sudo -H make CC=gcc-5 CXX=g++-5 -j2

You can add more cores if you want but I was having thermal issues so I went for two cores.
I haven't had a chance to test the standalone SDK yet. I'm phone posting so I hope the make came out right on here.
gcc5 is the earliest version that supports c++11. Gcc6 was segfaulting. Clang tripped over on a file that didn't have a default method or something defined. I don't really remember.

tristan.mumford
Pre-kindergarten
Pre-kindergarten
Posts: 13
Joined: Mon Apr 15, 2019 6:49 pm

Re: Grove AI HAT for Edge Computing

Post by tristan.mumford » Sun Jul 14, 2019 2:28 pm

I've had some progress.
I grabbed the files which the board definition downloads from the ~/.arduino15 directory on my PC, removed the kendryte-gnu-toolchain files, and copied the rest over to my Pi 3.
I took the toolchain which was built in /opt/kendrtye-gnu-toolchain/ and copied it to ~/.arduino15/packages/Seeeduino/tools/riscv64-unknown-elf-gcc/8.2.0/

It is not enough to symlink because arduino seems to add things to the toolchain directories.
The Arduino ide complains about it not being a supported platform but installed anyway in the terminal.
Using the Arduino IDE I was able to build some examples using the k210 toolchain. Unfortunately I haven't got k-flash working yet. Java gets a whole bunch of exceptions.
So it's not a magic bullet, but it is progress.

tristan.mumford
Pre-kindergarten
Pre-kindergarten
Posts: 13
Joined: Mon Apr 15, 2019 6:49 pm

Re: Grove AI HAT for Edge Computing

Post by tristan.mumford » Mon Jul 15, 2019 7:24 pm

I'm working on it.
So far I have a working json for armhf and aarch64. I can make an archive of my toolchain and manually dump it to the correct directory in the .arduino15 tree, but there's something that doesn't work right with the special archive I made for the .json.
Hopefully I'll get that worked out.
After using my json then deleting the faulty toolchain and dumping the original in the same place it works. I just built the blink sketch for the Grove AI HAT on my Pi 3 and uploaded it! So there is hope.

edit: I ran the character analysis example sketch and it worked fine too.

e again: I can't post links yet. if you feel like a gamble, go to github, search for user "experimentech" and navigate to "kendryte-toolchain-arm".

sharamapreeti329
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Mon Sep 09, 2019 2:50 pm

Re: Grove AI HAT for Edge Computing

Post by sharamapreeti329 » Mon Sep 09, 2019 2:53 pm

Thanks for sharing thread! Keep up!

tristan.mumford
Pre-kindergarten
Pre-kindergarten
Posts: 13
Joined: Mon Apr 15, 2019 6:49 pm

Re: Grove AI HAT for Edge Computing

Post by tristan.mumford » Tue Sep 10, 2019 1:36 pm

I haven't uploaded it yet but I succeeded in building nncase (ncc) for arm64. I built it on my Jetson Nano. I did this because I wanted a single solution for training, converting and flashing neural nets for k210. At least I know it is possible to build nncase on other platforms now.

I can say it needs a few things installed from source to work
Two things from QuantStack: xtl and xtensor from GitHub.
Another library called clipp (muellan/clipp on GitHub).

Post Reply