Difference between revisions of "IoTGateway/BSP/FreeRTOS IMX8ULP"
Sean.chuang (talk | contribs) (Created page with " Set up imx8 cortex m4 MCUxpress SDK environment = 1.Download the SDK = Download the SDK package according to the model of the chip or board from the following website [htt...") |
Sean.chuang (talk | contribs) |
||
Line 1: | Line 1: | ||
− | Set up | + | Set up imx8ulp cortex m33 MCUxpress SDK environment |
= 1.Download the SDK = | = 1.Download the SDK = | ||
− | Download the SDK package | + | Download the SDK package from Advantech azure git server. |
− | [https:// | + | [https://AIM-Linux@dev.azure.com/AIM-Linux/RISC_MCU_SDK/_git/SDK_2_14_0_EVK9-MIMX8ULP [1]] |
− | + | | |
= 2.Setup the cross compiler = | = 2.Setup the cross compiler = | ||
Line 16: | Line 16: | ||
[https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads] | [https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads] | ||
− | 1.It is best to download the latest version cross-compiler | + | 1.It is best to download the latest version cross-compiler arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz from the site and decompression it to get the directory arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi. |
2.Create a new system environment variable and name it ARMGCC_DIR. | 2.Create a new system environment variable and name it ARMGCC_DIR. | ||
Line 22: | Line 22: | ||
The value of this variable should point to the Arm GCC Embedded tool chain installation path. For this example, the path is: | The value of this variable should point to the Arm GCC Embedded tool chain installation path. For this example, the path is: | ||
− | $ export ARMGCC_DIR=/work/platforms/tmp/ | + | $ export ARMGCC_DIR=/work/platforms/tmp/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi |
= 3.Compile the demo code = | = 3.Compile the demo code = | ||
Line 28: | Line 28: | ||
To build an example application, follow these steps. | To build an example application, follow these steps. | ||
− | 1.Extract the SDK package | + | 1.Extract the SDK package and change the directory to the following application project directory : |
− | + | <install_dir>/boards/evk9mimx8ulp/demo_apps/'''adv_rtdfull'''/armgcc | |
− | 2. | + | 2. Because some contents of adv_rtdfull are written considering the testing and applications of the A core, users need to ensure that their modifications do not affect these parts. Otherwise, they might encounter A core boot failures |
− | + | 3.Run the build_debug.sh script in the armgcc directory to perform the build. The output is shown in this figure:<br/> chmod u+x build_debug.sh<br/> ./build_debug.sh | |
− | + | Built target '''sdk20-app.bin''' | |
− | + | = 4. Package M33 image to flash.bin = | |
− | + | 1. Get imx-boot tarball from our server. Here we use ROM-2620 VC0064 as an example: | |
− | + | $ tar xzvf 2620A1AIM34LIVC0064_iMX8ULP_1G_imx-boot.tgz | |
− | + | 2. Replace the m33 image by pre-build sdk20-app.bin file. | |
− | + | $ cp sdk20-app.bin 2620A1AIM34LIVC0064_iMX8ULP_1G_imx-boot/MX8ULP/m33_image.bin | |
− | + | 3. Change directory to imx-boot folder, and start packaging flash.bin. | |
− | + | $ cd 2620A1AIM34LIVC0064_iMX8ULP_1G_imx-boot/ | |
− | + | $ make SOC=iMX8ULP REV=A1 flash_singleboot_m33 | |
− | + | Built target '''flash.bin''' in iMX8ULP subfolder. | |
− | | + | |
− | + | = 5. Burn flash.bin int eMMC = | |
− | | + | 1. Config boot switch to serial download mode. |
− | | + | 2. Connect OTG to PC side. |
− | | + | 3. Use UUU command as below |
− | + | $ ./uuu -b emmc flash.bin | |
− | | + | |
− | + | = 6. Run the demo application = | |
− | | + | 1. Config boot switch to eMMC boot mode. |
− | | + | 2. Connect COM (COM-E) to PC. |
− | | + | 3. Power on system. And you will see below message : |
− | | + | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 04:30, 12 June 2024
Set up imx8ulp cortex m33 MCUxpress SDK environment
Contents
1.Download the SDK
Download the SDK package from Advantech azure git server.
[1]
2.Setup the cross compiler
Download and run the installer from launchpad.net/gcc-arm-embedded. This is the actual toolset (in other words, compiler,linker, and so on).
1.It is best to download the latest version cross-compiler arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz from the site and decompression it to get the directory arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.
2.Create a new system environment variable and name it ARMGCC_DIR.
The value of this variable should point to the Arm GCC Embedded tool chain installation path. For this example, the path is:
$ export ARMGCC_DIR=/work/platforms/tmp/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi
3.Compile the demo code
To build an example application, follow these steps.
1.Extract the SDK package and change the directory to the following application project directory :
<install_dir>/boards/evk9mimx8ulp/demo_apps/adv_rtdfull/armgcc
2. Because some contents of adv_rtdfull are written considering the testing and applications of the A core, users need to ensure that their modifications do not affect these parts. Otherwise, they might encounter A core boot failures
3.Run the build_debug.sh script in the armgcc directory to perform the build. The output is shown in this figure:
chmod u+x build_debug.sh
./build_debug.sh
Built target sdk20-app.bin
4. Package M33 image to flash.bin
1. Get imx-boot tarball from our server. Here we use ROM-2620 VC0064 as an example:
$ tar xzvf 2620A1AIM34LIVC0064_iMX8ULP_1G_imx-boot.tgz
2. Replace the m33 image by pre-build sdk20-app.bin file.
$ cp sdk20-app.bin 2620A1AIM34LIVC0064_iMX8ULP_1G_imx-boot/MX8ULP/m33_image.bin
3. Change directory to imx-boot folder, and start packaging flash.bin.
$ cd 2620A1AIM34LIVC0064_iMX8ULP_1G_imx-boot/
$ make SOC=iMX8ULP REV=A1 flash_singleboot_m33
Built target flash.bin in iMX8ULP subfolder.
5. Burn flash.bin int eMMC
1. Config boot switch to serial download mode.
2. Connect OTG to PC side.
3. Use UUU command as below
$ ./uuu -b emmc flash.bin
6. Run the demo application
1. Config boot switch to eMMC boot mode.
2. Connect COM (COM-E) to PC.
3. Power on system. And you will see below message :