前提准备
imx6solox必须先启动A9核,完成相关的配置后,才能启动M4核。
- 通过mfgtools将uboot烧录到开发板的emmc中
- 进入uboot命令 通过tftp烧录kernel dtb 和 rootfs
- 安装M4核网卡驱动
- 准备FreeRTOS
- 准备armgcc 和 cmake
demo演示
首先准备.bin文件
下载好 FreeRTOS 后在FreeRTOS_BSP_1.0.1_iMX6SX.tar\FreeRTOS_BSP_1.0.1_iMX6SX\examples\imx6sx_sdb_m4\demo_apps目录下可以看到示例
- 选择示例 进入armgcc目录下运行 build_release.sh 文件 (需要先修改环境变量ARMGCC_DIR 和 PATH )
echo $ARMGCC_DIR
/home/book/jwq/imx6solox/gcc-arm-none-eabi-8-2019-q3-update/
echo $PATH
/home/book/jwq/imx6solox/cmake-3.15.3-Linux-x86_64/bin
2.得到relase文件夹中包含.bin文件
TFTP烧录到M4核
连接M4串口、A9串口,在A9串口终端下进入uboot模式
根据示例决定烧录到不同的存储器中如ddr ocram tcm
- ddr的地址为0x9ff00000
- ocram的地址为0x00910000
- tcm地址为0x7F8000
参考手册Getting_Started_with_FreeRTOS_BSP_for_i.MX_6SoloX
烧录到ddr
tftp 0x9ff00000 ******.bin //将.bin文件烧录到指定ddr地址
dcache flush // 刷新
bootaux 0x9ff00000 //启动M4核运行
以hello_world_ddr.bin文件为例 可以在 M4核的端口看到hello world 输出
烧录到ocram
只需修改地址
烧录到TCM
Tcm是M4核上的flash 不能通过uboot直接烧录 先烧录到ddr然后拷贝到tcm
tftp 0x9ff00000 ******.bin //将.bin文件烧录到指定ddr地址
dcache flush // 刷新
cp.b 0x9ff00000 0x7F8000 0x8000 //Copy Cortex-M4 image from DDR RAM to TCM
dcache flush //Flush cached content to TCM
bootaux 0x7F8000 //Start the Cortex-M4 core from the TCM