Debug methods - IMX8QXP

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

Debug methods - IMX8QXP

4,315 Views
jnj
Contributor III

Hi All,

I am currently working on IMX8QXP-MEK, and I have some queries regarding the debugging methods. I am a newbie to this platform. From the NXP documents, I came to know that there are mainly two methods to debug i.MX8. One is UART, and the second one is JTAG.

When the EVK is connected to the PC via USB, there are 4 UART ports visible: /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2, and /dev/ttyUSB3. Cortex A35 prints [Linux] can be seen over /dev/ttyUSB0, and M4 Cortex prints can be seen over /dev/ttyUSB2.

I am a little bit confused about which UART (among FTDIA, FTD_IB, FTDIC, FTDID ) is connected to Cortex A35 and Cortex M4 debugging.UART Connection diagram  of EVK is shown below.an JTAG be used for debugging both M4 and A35? Or can M4 only be debugged using JTAG? Kindly help me to resolve my doubts.

jnj_0-1707485150669.png

 

   Thanks in advance !

0 Kudos
Reply
32 Replies

963 Views
jnj
Contributor III

Hi @Chavira ,

Sorry I didn't get it.I created flash.bin using mkimage tool after renaming hello_world.bin as m4_image.bin and copying into the above mentioned folder.

0 Kudos
Reply

961 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @jnj!

Do you use the command ""make SOC=iMX8QX flash_linux_m4" or the command "make SOC=iMX8QX flash"?

if  you use the command "make SOC=iMX8QX flash" the build don´t include the m4 binary.

0 Kudos
Reply

959 Views
jnj
Contributor III

Hi @Chavira ,

I have used make SOC=iMX8QX flash_linux_m4" .But I am having the confusion in the file name interpretation while using uuu command. Could you please help me to understand the file name interpretation

 

0 Kudos
Reply

956 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @jnj!

You should use the command "uuu -b emmc flash.bin" to update your boot loader in  your board.

 

0 Kudos
Reply

954 Views
jnj
Contributor III

Hi @Chavira ,

If we want to update only the m4 image , do we really need to  flash bootloader along with it?If I am flashing using the below command :

./uuu -b emmc_all imx-boot-imx8qxpc0mek-sd.bin-flash_linux_m4 imx-image-full-imx8qxpc0mek-20240213094507.rootfs.wic.zst

imx-boot-imx8qxpc0mek-sd.bin-flash_linux_m4 : bootloader bin

imx-image-full-imx8qxpc0mek-20240213094507.rootfs.wic.zst - complete rootfs

I can see the m4 power regulator switch task prints and why?

0 Kudos
Reply

951 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @jnj!

By default the binary "imx-boot-imx8qxpc0mek-sd.bin-flash_linux_m4" contains the m4 power example.

If you want a binary without an m4 example loaded, try to use the binary "imx-boot-imx8qxpc0mek-sd.bin-flash".

If you want to run the M4 image with another program, you have to update and make the flash.bin with your new m4 binary.

0 Kudos
Reply

948 Views
jnj
Contributor III

Hi @Chavira ,

So imx-boot-imx8qxpc0mek-sd.bin-flash_linux_m4 contains the m4 binary + bootloader ?which all binaries are added to get imx-boot-imx8qxpc0mek-sd.bin-flash_linux_m4?

0 Kudos
Reply

945 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @jnj !

Yes, the "imx-boot-imx8qxpc0mek-sd.bin-flash_linux_m4" contains the m4 binary + bootloader (u-boot).

For i.MX 8QuadXPlus, to build imx-boot image by using imx-mkimage, perform the following steps:


1. Copy u-boot.bin from u-boot/u-boot.bin to imx-mkimage/iMX8QX/.
2. Copy scfw_tcm.bin from SCFW porting kit to imx-mkimage/iMX8QX/.
3. Copy bl31.bin from Arm Trusted Firmware (imx-atf) to imx-mkimage/iMX8QX/.
4. Copy the SECO firmware container images (mx8qxpb0-ahab-container.img and mx8qxpc0-ahab-
container.img) to imx-mkimage/iMX8QM/.

5.Copy the "m4_image.bin" to imx-mkimage/iMX8QX/
6. Run make SOC=iMX8QX flash_linux_m4 to generate flash.bin for i.MX 8QuadXPlus B0, and run make
SOC=iMX8QX REV=C0 flash_linux_m4 to generate flash.bin for i.MX 8QuadXPlus C0.


7. If using OP-TEE, copy tee.bin to imx-mkimage/iMX8QX/ and copy u-boot/spl/u-boot-spl.bin
to imx-mkimage/iMX8QX/. Run make SOC=iMX8QX flash_spl to generate flash.bin.

0 Kudos
Reply

907 Views
jnj
Contributor III

Hi @Chavira ,

Currently I am facing an issue.I flashed the IMX8QXP MEK Board using the following command mistakenly

./uuu -b emmc_all imx-boot-imx8qxpc0mek-sd.bin-flash_linux_m4

After this , board is not booting up.I am not able see any uart log. I am always able to flash the bin.I think the board is not able to boot from emmc and automatically it goes to serial download mode.How can I recover the board from this.Kindly help me 

0 Kudos
Reply

1,417 Views
jnj
Contributor III

Hi @Chavira , 

I will check by listing the files as you mentioned. I have some more queries regarding the debugging. In which situation do we really need to debug SCU and SECU.?

0 Kudos
Reply

1,367 Views
jnj
Contributor III

Hi @Chavira ,

I will refer to this .Is there any other methods to update M4 bin? 

0 Kudos
Reply

1,471 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @jnj!
Thank you for contacting NXP Support!

You can see 4 ports when you connect the board to your board because the UART to USB bridge supports 4 ports (only 3 are connected to the board).

By default using our bsp and examples the cores can be debugged as you mention "Cortex A35 prints [Linux] can be seen over /dev/ttyUSB0, and M4 Cortex prints can be seen over /dev/ttyUSB2" but in really you can use any uart for each core, but I recommend to use the default configuration because the changes and configurations to change the debug uart port are a little difficult.

The JTAG connector can be used to debug both cores normally we debug only the M core with the JTAG connector, but using tools like Lauterbach you can debug any core on the chip.


Best Regards!
Chavira

0 Kudos
Reply