Difference between revisions of "IMX93 M33 Test"

From ESS-WIKI
Jump to: navigation, search
(Created page with " == M33 SDK== *Donwload sdk *Example from NXP *Cross compiler example code == M33 Compiler== == M33 Flash binary==  ")
 
Line 1: Line 1:
  
== M33 SDK==
+
== Use IMX93 Cortex-M33 to execute hello_world. Use example SDK_2_14_0_MCIMX93-EVK ==
  
*Donwload sdk
+
*Unzip SDK_2_14_0_MCIMX93-EVK
*Example from NXP
+
*Install GCC Arm embedded tool chain
*Cross compiler example code
 
  
== M33 Compiler==
+
        Step 1:Set GCC  a new system environment variable(gcc-arm-none-eabi-9-2019-q4-major.tar.bz2)
 +
<pre>download:https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2019-q4-major</pre>
 +
&nbsp; &nbsp; &nbsp; &nbsp; Step 2:/usr/local/Create a new folder arm and copy the compressed package.
 +
<pre>$ cd /usr/local/
 +
$ sudo mkdir arm
 +
$ cd arm
 +
$ sudo cp ~/tools/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 ./</pre>
 +
&nbsp; &nbsp; &nbsp; &nbsp; Step 3:/usr/local/arm tar jxvf.
 +
<pre>$ sudo tar -vxf gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2</pre>
 +
&nbsp; &nbsp; &nbsp; &nbsp; Step 4:After unzip, delete the zip package and leave the folder.
 +
<pre>$ sudo rm gcc-arm-none-eabi-9-2019-q4-major.tar.bz2</pre>
 +
&nbsp; &nbsp; &nbsp; &nbsp; Step 5:Add environment variables.
 +
<pre>$ export ARMGCC_DIR=/usr/local/arm/gcc-arm-none-eabi-9-2019-q4-major/bin
 +
$ export PATH=$PATH:/usr/local/arm/gcc-arm-none-eabi-9-2019-q4-major/bin</pre>
 +
&nbsp; &nbsp; &nbsp; &nbsp; Step 6:Check the gcc version number verification.
 +
<pre>$ arm-none-eabi-gcc -v</pre>
  
== M33 Flash binary==
+
== M33 Compiler ==
 
+
*Build an example application.
&nbsp;
+
<pre>$ cd ~/SDK_2_14_0_MCIMX93-EVK/boards/mcimx93evk/demo_apps/hello_world/armgcc
 +
$ ./build_debug.sh
 +
-- TOOLCHAIN_DIR: /work/platforms/tmp/gcc-arm-none-eabi-9-2019-q4-major
 +
-- BUILD_TYPE: debug
 +
-- TOOLCHAIN_DIR: /work/platforms/tmp/gcc-arm-none-eabi-9-2019-q4-major
 +
-- BUILD_TYPE: debug
 +
-- The ASM compiler identification is GNU
 +
-- Found assembler: /work/platforms/tmp/gcc-arm-none-eabi-8-2019-q3-update/
 +
bin/arm-none-eabi-gcc
 +
-- Configuring done
 +
-- Generating done
 +
-- Build files have been written to:
 +
/work/platforms/tmp/nxp/SDK_2.12.0_MCIMX93_EVK/boards/mcimx93evk/demo_apps/
 +
hello_world/armgcc/demo_apps/hello_world/armgcc
 +
Scanning dependencies of target hello_world.elf
 +
[ 6%] Building C object CMakeFiles/hello_world.elf.dir/work/platforms/
 +
tmp/nxp/SDK_2.12.0_MCIMX93_EVK/boards/mcimx93evk/demo_apps/hello_world/
 +
hello_world.c.obj
 +
< -- skipping lines -- >
 +
[100%] Linking C executable debug/hello_world.elf
 +
[100%] Built target hello_world.elf</pre>
 +
== M33 Flash binary ==
 +
*Download  bin to SD card
 +
<pre>$ cd ~/SDK_2_14_0_MCIMX93-EVK/boards/mcimx93evk/demo_apps/hello_world/armgcc/debug
 +
$ ls
 +
hello_world.elf  sdk20-app.bin</pre>
 +
*Copy sdk20-app.bin to IMX93 BSP boot  partition.
 +
*Open all USB serial Port ex:COM30 - COM34
 +
*Enter to U-Boot command line mode. You can then write the image and run it from TCM with the following commands:
 +
<pre>$ fatload mmc 1:1 80000000 sdk20-app.bin
 +
$ cp.b 0x80000000 0x201e0000 0x10000
 +
$ bootaux 0x1ffe0000 0</pre>

Revision as of 07:47, 21 August 2023

Use IMX93 Cortex-M33 to execute hello_world. Use example SDK_2_14_0_MCIMX93-EVK

  • Unzip SDK_2_14_0_MCIMX93-EVK
  • Install GCC Arm embedded tool chain

        Step 1:Set GCC  a new system environment variable(gcc-arm-none-eabi-9-2019-q4-major.tar.bz2)

download:https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2019-q4-major

        Step 2:/usr/local/Create a new folder arm and copy the compressed package.

$ cd /usr/local/ 
$ sudo mkdir arm 
$ cd arm 
$ sudo cp ~/tools/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 ./

        Step 3:/usr/local/arm tar jxvf.

$ sudo tar -vxf gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2

        Step 4:After unzip, delete the zip package and leave the folder.

$ sudo rm gcc-arm-none-eabi-9-2019-q4-major.tar.bz2

        Step 5:Add environment variables.

$ export ARMGCC_DIR=/usr/local/arm/gcc-arm-none-eabi-9-2019-q4-major/bin
$ export PATH=$PATH:/usr/local/arm/gcc-arm-none-eabi-9-2019-q4-major/bin

        Step 6:Check the gcc version number verification.

$ arm-none-eabi-gcc -v

M33 Compiler

  • Build an example application.
$ cd ~/SDK_2_14_0_MCIMX93-EVK/boards/mcimx93evk/demo_apps/hello_world/armgcc
$ ./build_debug.sh
-- TOOLCHAIN_DIR: /work/platforms/tmp/gcc-arm-none-eabi-9-2019-q4-major
-- BUILD_TYPE: debug
-- TOOLCHAIN_DIR: /work/platforms/tmp/gcc-arm-none-eabi-9-2019-q4-major
-- BUILD_TYPE: debug
-- The ASM compiler identification is GNU
-- Found assembler: /work/platforms/tmp/gcc-arm-none-eabi-8-2019-q3-update/
bin/arm-none-eabi-gcc
-- Configuring done
-- Generating done
-- Build files have been written to:
/work/platforms/tmp/nxp/SDK_2.12.0_MCIMX93_EVK/boards/mcimx93evk/demo_apps/
hello_world/armgcc/demo_apps/hello_world/armgcc
Scanning dependencies of target hello_world.elf
[ 6%] Building C object CMakeFiles/hello_world.elf.dir/work/platforms/
tmp/nxp/SDK_2.12.0_MCIMX93_EVK/boards/mcimx93evk/demo_apps/hello_world/
hello_world.c.obj
 < -- skipping lines -- >
[100%] Linking C executable debug/hello_world.elf
[100%] Built target hello_world.elf

M33 Flash binary

  • Download bin to SD card
$ cd ~/SDK_2_14_0_MCIMX93-EVK/boards/mcimx93evk/demo_apps/hello_world/armgcc/debug
$ ls 
hello_world.elf  sdk20-app.bin
  • Copy sdk20-app.bin to IMX93 BSP boot partition.
  • Open all USB serial Port ex:COM30 - COM34
  • Enter to U-Boot command line mode. You can then write the image and run it from TCM with the following commands:
$ fatload mmc 1:1 80000000 sdk20-app.bin 
$ cp.b 0x80000000 0x201e0000 0x10000 
$ bootaux 0x1ffe0000 0