Version 5 vs 6
Version 5 vs 6
Edits
Edits
- Edit by • tom-gall, Version 6
- Mar 27 2020 8:08 PM
- Edit by • tom-gall, Version 5
- Mar 26 2020 7:22 PM
« Previous Change | Most Recent Change |
Edit Older Version 5... | Edit Current Version 6... |
Content Changes
Content Changes
The page is dedicated to the mixture of Zephyr an RTOS and Tensorflow Micro a subset of the Tensorflow project for Microcontrollers.
Tensorflow as it exists currently doesn't support Zephyr and vise versa so the instructions and code below is a work in progress and not yet pushed upstream.
# Howto
This howto is currently specific to the [[ https://docs.zephyrproject.org/latest/boards/arm/stm32f746g_disco/doc/index.html | STM32F746ng board ]] and
only gets the Tensorflow Lite Micro Hello World example running on the board with Zephyr.
Download and Setup Zephyr
git clone https://github.com/zephyrproject-rtos/zephyr.git
sudo pip3 install west
sudo pip3 install cmake
**install Zephyr SDK**
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.10.3/zephyr-sdk-0.10.3-setup.run
chmod +x zephyr-sdk-0.10.3-setup.run
./zephyr-sdk-0.10.3-setup.run -- -d /opt/zephyr-sdk
sudo pip3 install -r zephyr/scripts/requirements.txt
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk
cd zephyr
cd zephyr-project
**Download tensorflow with experimental zephyr support**
git clone https://github.com/tom-gall/tensorflow.git
cd tensorflow
git checkout disco_f746ng_hello
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=zephyr-disco_f746ng hello_world_bin
**Todo**
redo LCD code so it uses Zephyr stack
enable CMSIS
The page is dedicated to the mixture of Zephyr an RTOS and Tensorflow Micro a subset of the Tensorflow project for Microcontrollers.
Tensorflow as it exists currently doesn't support Zephyr and vise versa so the instructions and code below is a work in progress and not yet pushed upstream.
# Howto
This howto is currently specific to the [[ https://docs.zephyrproject.org/latest/boards/arm/stm32f746g_disco/doc/index.html | STM32F746ng board ]] and
only gets the Tensorflow Lite Micro Hello World example running on the board with Zephyr.
Download and Setup Zephyr
git clone https://github.com/zephyrproject-rtos/zephyr.git
sudo pip3 install west
sudo pip3 install cmake
**install Zephyr SDK**
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.10.3/zephyr-sdk-0.10.3-setup.run
chmod +x zephyr-sdk-0.10.3-setup.run
./zephyr-sdk-0.10.3-setup.run -- -d /opt/zephyr-sdk
sudo pip3 install -r zephyr/scripts/requirements.txt
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk
cd zephyr
cd zephyr-project
**Download tensorflow with experimental zephyr support**
git clone https://github.com/tom-gall/tensorflow.git
cd tensorflow
git checkout disco_f746ng_hello
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=zephyr-disco_f746ng hello_world_bin
The resulting binary is tensorflow/lite/micro/tools/make/gen/zephyr-disco_f746ng_x86_64/hello_world/CMake/zephyr/zephyr.bin
Connect the USB cable to the board, mount the device and copy over the binary
(dmesg will show you what device the USB storage device is visible as)
Ex: mount /dev/sdb /t
cp tensorflow/lite/micro/tools/make/gen/zephyr-disco_f746ng_x86_64/hello_world/CMake/zephyr/zephyr.bin /t/.
The board will reboot and run your binary.
Connect minicom to /dev/ACM0 to see output.
**Todo**
redo LCD code so it uses Zephyr stack
enable CMSIS
The page is dedicated to the mixture of Zephyr an RTOS and Tensorflow Micro a subset of the Tensorflow project for Microcontrollers.
Tensorflow as it exists currently doesn't support Zephyr and vise versa so the instructions and code below is a work in progress and not yet pushed upstream.
# Howto
This howto is currently specific to the [[ https://docs.zephyrproject.org/latest/boards/arm/stm32f746g_disco/doc/index.html | STM32F746ng board ]] and
only gets the Tensorflow Lite Micro Hello World example running on the board with Zephyr.
Download and Setup Zephyr
git clone https://github.com/zephyrproject-rtos/zephyr.git
sudo pip3 install west
sudo pip3 install cmake
**install Zephyr SDK**
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.10.3/zephyr-sdk-0.10.3-setup.run
chmod +x zephyr-sdk-0.10.3-setup.run
./zephyr-sdk-0.10.3-setup.run -- -d /opt/zephyr-sdk
sudo pip3 install -r zephyr/scripts/requirements.txt
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk
cd zephyr
cd zephyr-project
**Download tensorflow with experimental zephyr support**
git clone https://github.com/tom-gall/tensorflow.git
cd tensorflow
git checkout disco_f746ng_hello
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=zephyr-disco_f746ng hello_world_bin
The resulting binary is tensorflow/lite/micro/tools/make/gen/zephyr-disco_f746ng_x86_64/hello_world/CMake/zephyr/zephyr.bin
Connect the USB cable to the board, mount the device and copy over the binary
(dmesg will show you what device the USB storage device is visible as)
Ex: mount /dev/sdb /t
cp tensorflow/lite/micro/tools/make/gen/zephyr-disco_f746ng_x86_64/hello_world/CMake/zephyr/zephyr.bin /t/.
The board will reboot and run your binary.
Connect minicom to /dev/ACM0 to see output.
**Todo**
redo LCD code so it uses Zephyr stack
enable CMSIS