A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

1. Introduction

This article shares the setup of the bare-metal development environment for the IMX6ULL.

2. Install SDK

Download from https://www.nxp.com.cn/products/i.MX6ULL.

SDK2.2_iMX6ULL_WIN, you need to log in first.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Open SDK_2.2_MCIM6ULL_RFP_Win.exe, and follow the installation prompts.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

The content after installation is as follows:

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

3. Install IAR

Use IAR7.8 version. Higher versions may not be compatible with the SDK.

Double-click EWARM-CD-7804-12495.exe and follow the installation prompts.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Install all the drivers that pop up as prompted.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

3.1 Activation

Run IAR as administrator.

Open the Help menu and select License Manager

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Select offline activation.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Disable security software.

Run IARkg_Unis.exe

Generate the key and copy it.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Paste it into the License management here.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Select the location to save.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Return to the key generator and select the file you just saved.

Click activate.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Generate the license file and save it.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Return to IAR and select the license file you just created.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

4. Install JLINK

Open JLink V6.34.exe

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

5. Project Compilation

File->Open->workspace

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Select D:\nxp\SDK_2.2_MCIM6ULL\boards\evkmcimx6ull\demo_apps\hello_world\iar

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Select a target, for example, ddr_debug, and compile.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation ConfigurationA Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Configure the CPU model macro.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

6. Download Debugging

6.1 Jlink Connection

First, you must set BOOT1:0 to 01, which means Serial Downloader mode, otherwise Jtag will not be enabled. At this point, JTAG_TDO will have no output and will always be high.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

JTAG_MOD should be grounded.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Otherwise, you will see the message:

Fatal error: JTAG Id mismatch. TAP with Id 0x00000000 is no JTAG-DP Session aborted!

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

If you see the message – ERROR: Cortex-A/R-JTAG (connect): Could not determine address of core debug registers. Incorrect CoreSight ROM table in device?

Then you need to modify the project file

ddr_init.jlinkscript

and add the following bold content:

/* ConfigTarget */

void ConfigTargetSettings(void)

{

Report(“Config JTAG Speed to 4000kHz”);

JTAG_Speed = 4000;

CORESIGHT_AddAP(0, CORESIGHT_AHB_AP);

CORESIGHT_AddAP(1, CORESIGHT_APB_AP);

CORESIGHT_IndexAPBAPToUse = 1;

}

6.2 Simulation

Right-click on the left directory -> options

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Select Jlink

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Here you can set parameters, such as clock speed; if the line is long, you can set it lower.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Click the following icon to enter simulation.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

Once in simulation, you can perform various operations.

A Comprehensive Guide to Setting Up the IMX6ULL Bare-Metal Development Environment and Jlink Simulation Configuration

7. Conclusion

This article has detailed the setup of the bare-metal development environment for the IMX6ULL and some considerations for Jlink connections. The official SDK for bare-metal development is provided, making it convenient. The main points to note are the configuration of the BOOT pins and JTAG_MOD pins during Jlink connections.

Leave a Comment