cortex-mgoogle-coralmendel-os

How to load bin to Cortex-M4 in Google Coral Dev


What I've tried?

$ tar -xzf SDK_2.8.0_MIMX8MQ6xxxJZ.tar.gz
$ cd boards/evkmimx8mq/demo_apps/hello_world/armgcc
$ export ARMGCC_DIR=<path to>/gcc-arm-none-eabi-9-2020-q2-update/
$ export PATH=$PATH:<path to>/gcc-arm-none-eabi-9-2020-q2-update/bin
$ ./build_debug.sh 
$ ls debug/hello_world.bin 
Hit any key to stop autoboot:  0 
u-boot=> tftp 0x7e0000 192.168.0.33:/tftpboot/coral/boot/hello_world.bin
Using ethernet@30be0000 device
TFTP from server 192.168.0.33; our IP address is 192.168.0.133
Filename '/tftpboot/coral/boot/hello_world.bin'.
Load address: 0x7e0000
Loading: ####
         2.3 MiB/s
done
Bytes transferred = 16700 (413c hex)
u-boot=> bootaux 0x7e0000
## Starting auxiliary core at 0x007E0000 ...

What I've Observed

// On coral dev
root@wishful-zebra:~# ls -las /dev/ttymxc*
0 crw------- 1 mendel tty     207, 16 Aug 20 03:45 /dev/ttymxc0
0 crw-rw---- 1 root   dialout 207, 17 Aug 20 03:05 /dev/ttymxc1
0 crw-rw---- 1 root   dialout 207, 18 Aug 20 03:40 /dev/ttymxc2

root@wishful-zebra:~# stty -echo raw speed 115200 < /dev/ttymxc2
115200
root@wishful-zebra:~# echo "test" > /dev/ttymxc2 

// prints 'test' on /dev/ttyUSB1 host side
Welcome to minicom 2.7.1

OPTIONS: I18n 
Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyUSB1, 23:55:15

Press CTRL-A Z for help on special keys

test

Question


Solution

  • Here are the instructions to boot the imx8m M4 and run the TFLite Micro Hello World (outputs a sine wave) on it: https://coral.googlesource.com/mcuxpresso_sdk/+/refs/heads/master/boards/evkmimx8mq/demo_apps/hello_world_tflite/.

    you'll need to sync the project repo and rebuild linux-imx and uboot-imx.

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