This is a repository which step by step teaches you how to build your own examples and run on Seeed Grove Vision AI Module V2. Finally, teach you how to restore to the original factory settings and run SenseCraft AI from Seeed Studio.
How to build the firmware?
How to flash the firmware?
How to restore to the original factory settings?
How to build face mesh scenario app exmple and run on WE2?
This part explains how you can build the firmware for Grove Vision AI Module V2.
Note: The following has been tested to work on Ubuntu 20.04 PC
sudo apt install make
cd ~
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
tar -xvf arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
export PATH="$HOME/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/:$PATH"
git clone https://github.com/HimaxWiseEyePlus/Seeed_Grove_Vision_AI_Module_V2
cd Seeed_Grove_Vision_AI_Module_V2
cd EPII_CM55M_APP_S
make clean
make
./obj_epii_evb_icv30_bdv10/gnu_epii_evb_WLCSP65/EPII_CM55M_gnu_epii_evb_WLCSP65_s.elf
cd ../we2_image_gen_local/
cp ../EPII_CM55M_APP_S/obj_epii_evb_icv30_bdv10/gnu_epii_evb_WLCSP65/EPII_CM55M_gnu_epii_evb_WLCSP65_s.elf input_case1_secboot/
./we2_local_image_gen project_case1_blp_wlcsp.json
./output_case1_sec_wlcsp/output.img
make
command for prerequisitestar -xvf arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi.zip
setx PATH "%PATH%;[location of your gnu-toolchain-13.2 ROOT]\arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi\bin"
git clone https://github.com/HimaxWiseEyePlus/Seeed_Grove_Vision_AI_Module_V2
cd Seeed_Grove_Vision_AI_Module_V2
cd EPII_CM55M_APP_S
make clean
make
./obj_epii_evb_icv30_bdv10/gnu_epii_evb_WLCSP65/EPII_CM55M_gnu_epii_evb_WLCSP65_s.elf
cd ../we2_image_gen_local/
cp ../EPII_CM55M_APP_S/obj_epii_evb_icv30_bdv10/gnu_epii_evb_WLCSP65/EPII_CM55M_gnu_epii_evb_WLCSP65_s.elf input_case1_secboot/
we2_local_image_gen project_case1_blp_wlcsp.json
./output_case1_sec_wlcsp/output.img
This part explains how you can flash the firmware to Grove Vision AI Module V2.
TeraTerm
and Minicom
will be used.
sudo apt-get install minicom
sudo apt-get install lrzsz #(to support xmodem protocol)
sudo setfacl -m u:[USERNAME]:rw /dev/ttyUSB0
# in my case
# sudo setfacl -m u:kris:rw /dev/ttyACM0
sudo minicom -s
Grove Vision(V2)
and press Connect
.
Following steps update application in the flash.
Minicom
, setup serial port and COM Port name-> connect to Grove Vision AI Module V2. (Please reference the minicom part of System Requirement)
Ctrl+A
on keyboard to enter minicom menu, and then press s
on keyboard to upload file and select xmodem
.
Seeed_Grove_Vision_AI_Module_V2\we2_image_gen_local\output_case1_sec_wlcsp\output.img
and press enter
to burn.
y
to restart.
minicom
which is runing your algorithm.
Following steps update application in the flash.
TeraTerm
and select File -> New connection, connect to Grove Vision AI Module V2.
y
to restart.
TeraTerm
which is runing your algorithm.
pip install -r xmodem/requirements.txt
Minicom
Seeed Grove Vision AI Module V2
is connect to PC.sudo setfacl -m u:[USERNAME]:rw /dev/ttyUSB0
# in my case
# sudo setfacl -m u:kris:rw /dev/ttyACM0
Terminal
and key-in following commandSeeed Grove Vision AI Module V2
, for example,/dev/ttyACM0
file: your firmware image [maximum size is 1MB]
python3 xmodem/xmodem_send.py --port=[your COM number] --baudrate=921600 --protocol=xmodem --file=we2_image_gen_local/output_case1_sec_wlcsp/output.img
# example:
# python3 xmodem/xmodem_send.py --port=/dev/ttyACM0 --baudrate=921600 --protocol=xmodem --file=we2_image_gen_local/output_case1_sec_wlcsp/output.img
reset
buttun on Seeed Grove Vision AI Module V2
.
pip install -r xmodem/requirements.txt
Tera Term
Seeed Grove Vision AI Module V2
is connect to PC.CMD
and key-in following commandSeeed Grove Vision AI Module V2
python xmodem\xmodem_send.py --port=[your COM number] --baudrate=921600 --protocol=xmodem --file=we2_image_gen_local\output_case1_sec_wlcsp\output.img
# example:
# python xmodem\xmodem_send.py --port=COM123 --baudrate=921600 --protocol=xmodem --file=we2_image_gen_local\output_case1_sec_wlcsp\output.img
reset
buttun on Seeed Grove Vision AI Module V2
.
Update the flash image Seeed_SenseCraft_AI*.img
to Grove Vision AI Module V2 and press reset
buttun.
Disconnect the Minicom
:
Ctrl+A
on keyboard and press z
on keyboard to go to the menu of minicom
.
q
on keyboard to quit with no reset minicom
, and press yes
to leave.
Open the permissions to acceess the deivce
sudo setfacl -m u:[USERNAME]:rw /dev/ttyUSB0
# in my case
# sudo setfacl -m u:kris:rw /dev/ttyACM0
After doing the above steps, you can run the SenseCraft AI on Grove Vision AI Module V2.
Update the flash image Seeed_SenseCraft AI*.img
to Grove Vision AI Module V2 and press reset
buttun.
Disconnect the TeraTerm
.
After doing the above steps, you can run the SenseCraft AI on Grove Vision AI Module V2.
APP_TYPE
to tflm_fd_fm
at makefile
APP_TYPE = tflm_fd_fm
How to flash firmware image and model at model_zoo?
pip install -r xmodem/requirements.txt
Minicom
Seeed Grove Vision AI Module V2
is connect to PC.sudo setfacl -m u:[USERNAME]:rw /dev/ttyUSB0
# in my case
# sudo setfacl -m u:kris:rw /dev/ttyACM0
Terminal
and key-in following commandSeeed Grove Vision AI Module V2
, for example,/dev/ttyACM0
model: you can burn multiple models "[model tflite] [position of model on flash] [offset]"
python3 xmodem/xmodem_send.py --port=[your COM number] --baudrate=921600 --protocol=xmodem --file=we2_image_gen_local/output_case1_sec_wlcsp/output.img --model="model_zoo/tflm_fd_fm/0_fd_0x200000.tflite 0x200000 0x00000" --model="model_zoo/tflm_fd_fm/1_fm_0x280000.tflite 0x280000 0x00000" --model="model_zoo/tflm_fd_fm/2_il_0x32A000.tflite 0x32A000 0x00000"
reset
buttun on Seeed Grove Vision AI Module V2
.
APP_TYPE
to tflm_fd_fm
at makefile
APP_TYPE = tflm_fd_fm
How to flash firmware image and model at model_zoo?
pip install -r xmodem/requirements.txt
Tera Term
Seeed Grove Vision AI Module V2
is connect to PC.CMD
and key-in following commandSeeed Grove Vision AI Module V2
model: you can burn multiple models "[model tflite] [position of model on flash] [offset]"
python xmodem\xmodem_send.py --port=[your COM number] --baudrate=921600 --protocol=xmodem --file=we2_image_gen_local\output_case1_sec_wlcsp\output.img --model="model_zoo\tflm_fd_fm\0_fd_0x200000.tflite 0x200000 0x00000" --model="model_zoo\tflm_fd_fm\1_fm_0x280000.tflite 0x280000 0x00000" --model="model_zoo\tflm_fd_fm\2_il_0x32A000.tflite 0x32A000 0x00000"
reset
buttun on Seeed Grove Vision AI Module V2
.
Tera Term
or Minicom
first.index.html
.Grove Vision AI(V2)
and press connect
button
sudo setfacl -m u:[USERNAME]:rw /dev/ttyUSB0
# in my case
# sudo setfacl -m u:kris:rw /dev/ttyACM0
You can reference the scenario app allon_sensor_tflm , allon_sensor_tflm_freertos and tflm_fd_fm. Take allon_sensor_tflm for example, you should only modify the allon_sensor_tflm.mk from cis_ov5647 to cis_imx219 or cis_imx477.
#CIS_SUPPORT_INAPP_MODEL = cis_ov5647
CIS_SUPPORT_INAPP_MODEL = cis_imx219
#CIS_SUPPORT_INAPP_MODEL = cis_imx477
So that, it can support cis_imx219 or cis_imx477 camera.
LIB_CMSIS_NN_ENALBE
to build CMSIS-NN library
LIB_CMSIS_NN_ENALBE = 1
APP_TYPE
to allon_sensor_tflm_cmsis_nn
at the makefile
APP_TYPE = allon_sensor_tflm_cmsis_nn