Unable to bootup M4 core on i.MX 8M Mini using MCUXpresso SDK

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

Unable to bootup M4 core on i.MX 8M Mini using MCUXpresso SDK

3,690 Views
thomas_anderson_
Contributor III

Greetings,

I was trying to flash a default hello_world application(MCUXpresso-SDK/SDK_2_9_0_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/hello_world) using MCUXpresso SDK,

I got the project along with the SDK from MCUXpresso SDK Builder.

As per the User guide I have flashed the the bin file along with the uboot into the board using uuu.

After flashing I have followed instructions to kickoff the m4 by the following commands in uboot:

=> sf probe
=> bootaux 0x8000000

In my case the m4 fails to be up after I entered the above commands.

Here are the logs:

u-boot=> sf probe
clk qspi_root_clk already disabled
clk qspi_root_clk already disabled
SF: Detected n25q256ax1 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
u-boot=> bootaux 0x8000000
"Synchronous Abort" handler, esr 0x96000210
elr: 0000000040202ef0 lr : 000000004020302c (reloc)
elr: 00000000bcce2ef0 lr : 00000000bcce302c
x0 : 00000000bcd98681 x1 : 0000000008000000
x2 : 0000000000000044 x3 : 00000000bacff559
x4 : 0000000008000000 x5 : 0000000000000000
x6 : 0000000000000010 x7 : 0000000000000010
x8 : 0000000000000000 x9 : 0000000000000008
x10: 0000000000000008 x11: 0000000000000000
x12: 0000000002566e3e x13: 000000000001869f
x14: 00000000bacd2a90 x15: 0000000000000000
x16: 00000000bcce2fac x17: 00000000000041a0
x18: 00000000bacdfdb0 x19: 0000000000000000
x20: 00000000bad0dfb0 x21: 0000000000000000
x22: 00000000bad0dfb0 x23: 0000000000000002
x24: 00000000bcdeb574 x25: 0000000000000000
x26: 0000000000000000 x27: 0000000000000000
x28: 00000000bacf2580 x29: 00000000bacd27d0

Code: 911a0400 a9017bfd 910043fd a90253f3 (29404c34)
Resetting CPU ...

Labels (1)
0 Kudos
Reply
12 Replies

3,664 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @thomas_anderson_ 

I hope you are doing well.
 
As you are trying to boot up M4 core on i.MX 8M Mini using MCUXpresso SDK
The below line seems contradictory as it shows SDK for i.MX8QXP MEK board.
 
"I was trying to flash a default hello_world application(MCUXpresso-SDK/SDK_2_9_0_MEK-MIMX8QX/boards/mekmimx8qx/demo_apps/hello_world) using MCUXpresso SDK."
 
Please download SDK_2.13.0_EVK-MIMX8MM for i.MX8MM using the below link.
 
Please run the below commands in u-boot to kickoff m4:
 
=> sf probe
=> sf read ${loadaddr} 0 4
=> bootaux 0x8000000
 
Thanks & Regards,
Sanket Parekh

3,653 Views
thomas_anderson_
Contributor III

Hi @Sanket_Paresh,


Thank you for the response.
I realise that I have downloaded the wrong SDK!
This time I downloaded the correct one you from your link, and have built and flashed the bin files, now I am able to boot m4 core without any issues.

logs:
u-boot=> sf probe
clk qspi_root_clk already disabled
clk qspi_root_clk already disabled
SF: Detected n25q256ax1 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
u-boot=> sf read ${loadaddr} 0 4
device 0 offset 0x0, size 0x4
SF: 4 bytes @ 0x0 Read: OK
u-boot=> bootaux 0x8000000
## Starting auxiliary core stack = 0x42464346, pc = 0x56010000...

But I fail to see the "hello world" being printed on the other serial terminal of the debug port as the user guide suggests.
Could you please help me with debugging this too?

Regards,
Thomas.

0 Kudos
Reply

3,631 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @thomas_anderson_ 

Please mention the debug uart used for the M4 core in the custom board.
 
Please make sure that you have followed the correct steps mentioned in chapter 7 - Run a flash target demo by UUU in MCUXSDKIMX8MMGSUG.
 
Thanks & Regards,
Sanket Parekh

0 Kudos
Reply

3,624 Views
thomas_anderson_
Contributor III

Hi @Sanket_Parekh,

I am not using any custom board but the i.MX 8M Mini Evk.

I have connected micro USB cable  between the  debug port (J901) and my PC running linux.

The boot logs plus u-boot are open on /dev/ttyUSB1 and I was expecting the m4 prints to be on the other  serial port i.e. /dev/ttyUSB0 as per the user guide.

I have tried following the User Guide you are talking about and have failed to flash the board, encountering errors since the document written feels incomplete and inaccurate.

I found a post under the nxp community and followed the steps there for the flashing process, please correct me if I am doing something wrong in the flashing part.

Compiler I used to build the application:

arm-none-eabi-gcc (15:9-2019-q4-0ubuntu1) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]

Regards,

Thomas.

 

0 Kudos
Reply

3,597 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @thomas_anderson_ 

I hope you are doing well.

Please refer to  1.3 Connect USB Debug Cable in Get Started with the i.MX 8M Mini EVKB for the USB Debug connection in i.MX8MM EVK.
283b671e-11aa-4723-8923-57f6e54df52d.png
 
Please Try with /dev/ttyUSB2.
 
Thanks & Regards,
Sanket Parekh

0 Kudos
Reply

3,590 Views
thomas_anderson_
Contributor III

Hi @Sanket_Parekh

The two serial ports getting detected in my case are /dev/ttyUSB0 and /dev/ttyUSB1.

But contrary to the document you have linked, the boot logs of A53 are being displayed on the serial port with the bigger number i.e. /dev/ttyUSB1.

So I was expecting the m4 logs to be on the other serial port i.e. /dev/ttyUSB0.

And there are no m4 output prints on the /dev/ttyUSB0 when I boot the m4 core.

Regards,

Thomas

0 Kudos
Reply

3,554 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @thomas_anderson_ 

I hope you are doing well.
 
Please provide me with the lsusb command output on the host PC and linux kernel version.
 
Please try with putting the m4 core (compiled with ./build_debug.sh script ) bin image in the sdcard/mmc partition and running the below commands in u-boot.
 
=> fatload mmc 1:1 0x48000000 hello_world.bin
=> cp.b 0x48000000 0x7e0000 0x20000
=> bootaux 0x7e0000
 
Thanks & Regards,
Sanket Parekh

0 Kudos
Reply

3,485 Views
thomas_anderson_
Contributor III

Hi @Sanket_Parekh

Host PC lsusb command output:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 2808:9338 Focal-systems.Corp FT9201Fingerprint.̚
Bus 001 Device 004: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 003: ID 13d3:3503 IMC Networks
Bus 001 Device 002: ID 003f:00c1 Alcor Micro, Corp. 720P USB Webcam
Bus 001 Device 037: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Host pc Linux kernel version : 5.15.0-60-generic

I also built the hello_world project with ./build_debug.sh script and flashed it in the mmc using the command :
sudo uuu -b qspi uboot_flash.bin hello_world.bin


I ran the commands you provided with, here is the output:
u-boot=> fatload mmc 1:1 0x48000000 hello_world.bin
MMC: no card present
Couldn't find partition mmc 1:1
Can't set block device
u-boot=> cp.b 0x48000000 0x7e0000 0x20000
u-boot=> bootaux 0x7e0000
## Starting auxiliary core stack = 0x755E5A66, pc = 0x2C807A12...

Regards,

Thomas

 

0 Kudos
Reply

3,478 Views
thomas_anderson_
Contributor III

Hi @Sanket_Parekh 

Here is a little update,

Since it said "MMC: no card present"

I ran the mmc list command:

u-boot=> mmc list
FSL_SDHC: 1
FSL_SDHC: 2 (eMMC)

Since it showed eMMC present on dev 2,

I ran the following commands:

u-boot=> mmc dev 2 1
switch to partitions #1, OK
mmc2(part 1) is current device

u-boot=> fatload mmc 2:1 0x48000000 hello_world.bin
Can't set block device

I wonder if I am using the right u-boot bin file, could you please tell me what u-boot file I should use? In the user guide section 7.3 (step no. 4) it does not clearly mention from where to get the u-boot file.

Regards,

Thomas.

0 Kudos
Reply

3,453 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @thomas_anderson_ 

From the lsusb output, it seems that the board is not connected with host PC properly.
 
Did you get any output on the serial console after executing bootaux 0x7e0000 command. ?
 
I also built the hello_world project with ./build_debug.sh script and flashed it in the mmc using the command :
sudo uuu -b qspi uboot_flash.bin hello_world.bin
- Above command is not for emmc.
 
One has to copy hello_world.bin to fat32 partition of emmc/SD card where kernel image and dtbs are present.
 
Thanks & Regards,
Sanket Parekh

0 Kudos
Reply

3,447 Views
thomas_anderson_
Contributor III

Hi @Sanket_Parekh,

"From the lsusb output, it seems that the board is not connected with host PC properly."

May I know what output I must get to confirm the connection is correct?

Also I have connected a micro USB cable between my host PC and the board(J901), is that not correct?

I did not get any output on the m4 serial console after executing bootaux 0x7e0000 command.

Also, looks like I have been flashing using the wrong command then.

Could you please share with me the command to flash the hello_world.bin file into the eMMC then? 

Or is it mandatory to use the SD card? also as u mentioned do I just copy the hello_world.bin file into the SD card? and could u elaborate about the kernel image and dtbs files you mentioned? 

This is all very confusing (flashing and booting up the m4 core), I was just trying to follow the user guide steps(Section 7.3), after flashing even there it mentions in step 6  "to change the boot mode to MicroSD Mode [SW1101:0110000000, SW1102:1000111100]" 

But the boot switches configuration mentioned in the angular brackets are for booting from NAND flash, as per the EVK user guide.

Regards, 

Thomas.

 

0 Kudos
Reply

3,386 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @thomas_anderson_,

lsusb seems correct as in evk FT2232D is used as uart - USB bridge.
 
One could just copy helloword.bin in fat32 partition of sdcard.
 
$ cp helloworld.bin /media/<username>/boot/ 
 
After that one can follow commands (6.a) in Chapter -6 Running an application by U-Boot in Getting Started with MCUXpresso SDK for EVK-MIMX8MM
 
Note: For Linux release version L5.15.71-2.2.0 and later, the run prepare_mcore

command must run before the bootaux command

Thanks & Regards,
Sanket Parekh

0 Kudos
Reply