Preface
MYD-JX8MMA7 is equipped with a heterogeneous Cortex-M4 coprocessor that can run real-time systems for control and other related processing.
M4 may involve sharing resources with A53 core during operation, so you need to switch to myd jx8mma7-rpmsg-m4.dtb device tree. M4 uses uart4 as serial port.
Prepare
Prepare the following documents
03_Tools\Toolchains\gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2
04_Sources\SDK_2.8.0_EVK-MIMX8MM.tar.gz
Unpack the compiler
mkdir toolchain
tar -lxf /mnt/d/BOARD/MYD-JX8MMA7/03_Tools/Toolchains/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 -C toolchain/
Unzip the SDK package
mkdir SDK_2.8.0_EVK-MIMX8MM
tar -zxf /mnt/d/BOARD/MYD-JX8MMA7/04_Sources/SDK_2.8.0_EVK-MIMX8MM.tar.gz -C SDK_2.8.0_EVK-MIMX8MM/
You can use vscode to open and read, the project is as follows
Set the compiler path
export ARMGCC_DIR=`pwd`/toolchain/gcc-arm-none-eabi-7-2017-q4-major
Compile
cd SDK_2.8.0_EVK-MIMX8MM/boards/evkmimx8mm/demo_apps/hello_world/armgcc/
./clean.sh
./build_debug.sh
Generate hello_world.bin hello_world.elf under debug/
run
Restart and press Enter to enter boot
Modify the device tree to setenv fdtfile myd-jx8mma7-rpmsg.dtb
u-boot=> mmc list
FSL_SDHC: 1
FSL_SDHC: 2 (eMMC)
u-boot=> fatls mmc 2
39297536 Image
6040 imx8mm_m4_TCM_hello_world.bin
17248 imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin
16712 imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin
40780 imx8mm_m4_TCM_sai_low_power_audio.bin
47864 myd-jx8mma7-lvds-atk10-1.dtb
47045 myd-jx8mma7-rpmsg.dtb
474776 tee.bin
8 file(s), 0 dir(s)
u-boot=> print fdtfile
fdtfile=myd-jx8mma7-lvds-atk10-1.dtb
u-boot=> setenv fdtfile myd-jx8mma7-rpmsg.dtb
u-boot=> saveenv
Saving Environment to MMC... Writing to MMC(2)... OK
u-boot=> print fdtfile
fdtfile=myd-jx8mma7-rpmsg.dtb
u-boot=>
Export to Windows: cp debug/hello_world.elf /mnt/d
Development board
cd /lib/firmware/
rz import hello_world.elf to the development board
echo /lib/firmware/hello_world.elf >/sys/class/remoteproc/remoteproc0/firmware
There is no path /sys/class/remoteproc/remoteproc0/firmware, so the test cannot be run.
Summarize
没有/sys/class/remoteproc/remoteproc0/firmware
The reason for this path was not found in the reference documentation.
reference
MYD-JX8MMA7 Software Evaluation Guide.pdf Chapter 2.2
MYD-JX8MMA7 Software Development Guide.pdf Chapter 2.2.2