Trouble loading and running examples on M4 core

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trouble loading and running examples on M4 core

Jump to solution
842 Views
mwilliams
Contributor III

I'm trying to load and run the "hello world" example on my IMX8MMEVK board by following this page:

https://www.nxp.com/document/guide/get-started-with-the-i-mx-8m-mini-evkb:GS-iMX-8M-Mini-EVK

I have flashed the latest stock Linux BSP to EMMC and I have built my own stock image and flashed the SD card with that.  I can see that the examples are there on the SD card.  I get the following results on the Uboot console:

 

DDRINFO: start DRAM init
DDRINFO: DRAM rate 3000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
SEC0:  RNG instantiated
Normal Boot
Trying to boot from MMC1
NOTICE:  BL31: v2.6(release):lf-5.15.32-2.0.0-0-gc6a19b1a3
NOTICE:  BL31: Built : 06:37:22, Jun  7 2022


U-Boot 2022.04-lf_v2022.04+g1c881f4da8 (Jun 07 2022 - 05:16:02 +0000)

CPU:   i.MX8MMQ rev1.0 1800 MHz (running at 1200 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 39C
Reset cause: POR
Model: NXP i.MX8MM EVK board
DRAM:  2 GiB
TCPC:  Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x52]
Power supply on USB2
TCPC:  Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50]
Core:  169 devices, 30 uclasses, devicetree: separate
MMC:   FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... *** Warning - bad CRC, using default environment

[*]-Video Link 0 (1920 x 1080)
       [0] lcdif@32e00000, video
       [1] mipi_dsi@32e10000, video_bridge
       [2] adv7535@3d, panel
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated

BuildInfo:
 - ATF c6a19b1

switch to partitions #0, OK
mmc1 is current device
flash target is MMC:1
Net:   eth0: ethernet@30be0000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0  
u-boot=> fatload mmc 0:1 0x7e0000 imx8mm_m4_TCM_hello_world.bin
Couldn't find partition mmc 0:1
Can't set block device
u-boot=> fatload mmc 1:1 0x7e0000 imx8mm_m4_TCM_hello_world.bin
** Reading file would overwrite reserved memory **
Failed to load 'imx8mm_m4_TCM_hello_world.bin'
u-boot=> fatload mmc 1:1 0x800000 imx8mm_m4_TCM_hello_world.bin
** Reading file would overwrite reserved memory **
Failed to load 'imx8mm_m4_TCM_hello_world.bin'
u-boot=>

What am I missing or doing wrong?

 

 

 

0 Kudos
1 Solution
830 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Please try with the following commands:
> fatload mmc 1:1 0x48000000 imx8mm_m4_TCM_hello_world.bin
> cp.b 0x48000000 0x7e0000 0x20000
> dcache flush
> bootaux 0x7e0000

Best regards,
Aldo.

View solution in original post

0 Kudos
3 Replies
831 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Please try with the following commands:
> fatload mmc 1:1 0x48000000 imx8mm_m4_TCM_hello_world.bin
> cp.b 0x48000000 0x7e0000 0x20000
> dcache flush
> bootaux 0x7e0000

Best regards,
Aldo.

0 Kudos
826 Views
mwilliams
Contributor III

Thanks so much! Now I have to figure out what I did.  If you have any other pearls of wisdom feel free to impart.  Thanks again.

0 Kudos
822 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Sorry for not being clear, please see below for a more detailed response:

The command you have used is no longer correct, this is because u-boot from >= L5.4.24  checks if the load address is in a reserved area of memory for u-boot or not.

So now we need to fatload the bin to DDR (0x48000000) by using the following command:
> fatload mmc 1:1 0x48000000 imx8mm_m4_TCM_hello_world.bin

Next will be copying the binary from that location to TCM (0x7e0000)
> cp.b 0x48000000 0x7e0000 0x20000

Finally we flush dcache and boot the auxiliary core (Cortex-M4)
> dcache flush
> bootaux 0x7e0000

Best regards,
Aldo.
 



0 Kudos