Toolchain

Get a toolchain from ARM's developer site

Extract this toolchain somewhere convenient.

Building this demo

cd armgcc
ARMGCC_DIR=/path/to/gcc-arm-none-eabi ./build_release.sh

Output files will be in the release folder. There will be an ELF file (if you want to debug), and a bin file to upload to your device.

Running the demo

Deploy the binary to your device

On your host machine:

mdt push armgcc/release/hello_world_tflite.bin

On the device:

sudo cp hello_world_tflite.bin /boot
cd /boot
sudo ln -sf hello_world_tflite.bin m4_fw.bin

On the device, in u-boot:

setenv m4enabled 1
saveenv
boot

Output from the M4 core will be visible on the second UART that enumerated when you connected your serial port via USB.