step by step: load fusion fw to 8ulp flash

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

step by step: load fusion fw to 8ulp flash

xiaocong_fu
NXP Employee
NXP Employee
5 0 4,956

step by step: load fusion fw to 8ulp flash

In this article, I'd like to share the steps to run fusion dsp fw in 8ulp, including all the issues I have encountered.

 

Pre-steps

To follow the steps, you will need:

You'll need to register to this site.

xiaocong_fu_0-1667285502126.png

 

  • GETTING STARTED GUIDE FOR I.MX 8ULP: very useful, I mainly refer to this document. I suggest to read this article throughout to get a whole picture before getting started.
  • XTENSA XPLORER IDE FOR WINDOWS V8.0.15
  • DSP CONFIGURATION FOR WINDOWS(NEWLIB) V8.0.15
  • DSP CONFIGURATION FOR WINDOWS(XCLIB) V8.0.15

 

Notes:

  1. About the 8ULP patch for IAR

iar_segger_support_patch_imx8ulp.zip https://www.nxp.com/security/login?TARGET=https%3A%2F%2Fwww.nxp.com%2Fwebapp%2Fsecure%2Flogin.SAMLSe...

Follow the readme in download zip.

  1. About the Jlink version

The version after V7.50 will not support 8ULP.

One problem is the integrated Jlink in IAR is V7.66, so we need to downgrade it to V7.50.

xiaocong_fu_2-1667285502148.png

 

In Jlink installed path, SEGGER\JLink\JLinkDLLUpdater.exe. After running the exe, Jlink in IAR will be changed to V7.50.

 

Steps:

  1. Compile the m33 bin file.

You can either compile with ARMGCC or with IAR.

With ARMGCC, just use the script build_flash_debug.sh.

With IAR, something to pay attention to:

  1. Select the device as NXP MIMX8UD7_M33

xiaocong_fu_3-1667285502150.png

 

  1. The DSP_IMAGE_COPY_TO_RAM in Defined symbols.

If set to 1, DSP application will launch from Arm core; if set to 0, it will not launch from Arm core, and can be loaded from Xtensa Xplorer.

You can also find explanation in GETTING STARTED GUIDE FOR I.MX 8ULP.

xiaocong_fu_4-1667285502150.png

 

  1. Build flash.bin

I assume you to be familiar with this step. If not, you need to read section "4.5.13 How to build imx-boot image by using imx-mkimage" in IMX_LINUX_USERS_GUIDE.

But still I'd like to take some notes here, as building 8ULP uboot has some tricks.

To build 8ULP uboot, we need extra images like mx8ulpa1-ahab-container.img and upower.bin, they can be downloaded from internally:

http://shlinux22.ap.freescale.net/internal-only/Linux_IMX_5.15.52_2.1.0/L5.15.52-2.1.0-rc2(36)/commo...

Also, the DSP examples only supports flash target in dual boot mode, which means we need to flash m33 into nor flash. Here are the steps to achieve this.

  1. A uuu script to flash dualboot image uuu_8ulp_dual.auto, can be found in http://shlinux22.ap.freescale.net/internal-only/Linux_IMX_5.15.52_2.1.0/latest/common_bsp/imx_mfgtoo...

In this script, it needs three different flash.bins: _flash_singleboot_m33.bin, _flash_dualboot_m33.bin, _flash_dualboot.bin.

They need to be built with the following commands respectively:

_flash_singleboot_m33.bin :  

make SOC=iMX8ULP flash_singleboot_m33

_flash_dualboot_m33.bin :

make SOC=iMX8ULP flash_dualboot_m33_xip

_flash_dualboot.bin:

make SOC=iMX8ULP flash_dualboot

  1. You will also need a _rootfs.sdcard, which corresponds to the  imx-image-multimedia-imx8ulpevk.wic image.
  2. Then you need to switch board to serial download mode, and can use the command uuu.exe uuu_8ulp_dual.auto to flash all image. This only needs to be done once.
  1. Load the m33 bin file to nor flash

In the above step, there is already m33 bin in nor flash. This step explains how to load m33 bin alone when you only have change in m33.

  1. Switch board to serial download mode
  2. use Jlink commander V7.50 to connect to it.
  3. Then use the command to load bin file: loadbin _flash_dualboot_m33.bin 0x4000000

xiaocong_fu_5-1667285502152.png

 

 

  1. System bootup

Switch the 8ULP dip to 1000_0010 A35-eMMC/ M33-Nor

If you set DSP_IMAGE_COPY_TO_RAM=1 in step #1, during boot up, you will see both prints in M33 and in DSP.

Otherwise you will only see prints in M33.

Audio demo started. Initialize pins and codec on core 'Cortex-M33'

Pins and codec initialized.

DSP starts on core 'fusion_nxp02_dsp_prod'

MIC->DMA->I2S->CODEC running

  1. Debug the fusion DSP.

The steps are very detailed in "chapter 4 Run and debug DSP demo using Xplorer IDE".

One note to take here:

Windows platform, there is bug in Xtensa Xplorer license manager. You need to clear the existing license path if you want to change license. Otherwise the license may not correctly as expected.

Clean existing license by searching key `XTENSAD_LICENSE_FILE` in windows registry.

In my case, I had an 8MP license installed before, so when I try to debug the 8ULP, I keep to have the following error:

xiaocong_fu_6-1667285502153.png

 

I need to clear previous license and install the one for 8ULP.