
NXP iMXRT CPU Support Package
This package contains project templates and system files for the NXP iMXRT.
CrossWorks Version 4 Installation Instructions
- To install this support package
-
- Click the Tools > Package Manager menu option to open the package manager window.
- Right click on the NXP iMXRT CPU Support Package entry and select Install Selected Packages.
- Click Next to take you to the summary page.
- Click Next to install the package.
- Click Finish to close the package manager window.
- Click the Tools > Show Installed Packages.
- Click on the NXP iMXRT CPU Support Package link to view the package and its contents.
- To manually install this support package
-
- If you have not done so already, follow the CMSIS 5 CMSIS-Core(M) Support Package, CMSIS 5 CMSIS-DSP Support Package, CMSIS 5 Support Package and CrossWorks Tasking Library Package installation instructions.
- Download the file iMXRT.hzq using your web browser.
- Click the Tools > Manually Install Packages menu option.
- Select the file you have just downloaded to install the package.
- Click the Tools > Show Installed Packages.
- Click on the NXP iMXRT CPU Support Package link to view the package and its contents.
Release Notes
4.5
- Fixed FPUType for iMXRT1011 devices.
- Add latest CMSIS header files.
- Add support for iMXRT1160 devices.
- Moved FILL section into iMXRT1011/iMXRT11xx startup code.
- STARTUP_FROM_RESET now implemented in iMXRT11xx startup code.
- Add Loader2 implemented using fsl_romapi with builds for iMXRT117x/iMXRT116x QSPI.
- Modified the Reset() script for iMXRT11xx devices to use the NSRST pin.
4.4
- Add external GCC project template.
- Add support for iMXRT1011, iMXRT1024 and iMXRT1170 devices.
4.3
- Add support for iMXRT1015 devices.
4.2
- Add support for iMXRT1060 and iMXRT1064 devices.
4.1
- Now using LIBMEM RPC FLM loader.
4.0
- Initial Release.
Documentation
Creating iMXRT Projects
To create a new iMXRT project
- Select the File > New > New Project menu item.
- Select the appropriate Generic iMXRT from the Categories list.
- Select the required project template type from the Templates list.
- Set the required project name and location directory.
- Click OK.
To import MCUXpresso project files
- Select File > Import Project... > Import Eclipse Project menu item.
- Navigate to the directory containing the eclipse .project and select it.
- Type "imxrt" in the Project Template Chooser search.
- Select one of the displayed project templates.
- Set the Section Placement and Target Processor properties.
- For projects that use the CrossWorks tools you will need to remove the startup folder from the project.
To build and debug an application the runs in Flash memory
- Select the project to work on by using the Project > Set Active Project menu option.
- Select the configuration you require by using the Build > Set Active Build Configuration menu option.
- Right click on the project node in the project explorer and select the FlexSPI (HYPER|QuadSPI) placement property.
- Build the project by using the Build > Build Project menu option.
- Connect to the appropriate target in the target window.
- Download and start debugging the current project by using Debug > Start Debugging.
To make the application startup from reset
- Right click on the project node in the project explorer and select Properties...
- In the properties window scroll down to the Preprocessor Options section.
- Type STARTUP_FROM_RESET into the Preprocessor Definitions property editor.
iMXRT Project Specifics
Target Processor
Once a project has been created you can select different target processors by right clicking on the project node in the project explorer and selecting the Target Processor entry.
Selecting the target processor will specify the memory map that is used for the build and debug. You can view the selected memory map by right clicking on the project node in the project explorer and selecting Edit Memory Map.
The memory map file has the following macros that can be used to specify the start and sizes of the memory regions:
- ITCMSTART and ITCMSIZE the start and size of the ITCM memory segment.
- DTCMSTART and DTCMSIZE the start and size of the DTCM memory segment.
- OCRAMSTART and OCRAMSIZE the start and size of the OCRAM memory segment.
- FlexSPISTART and FlexSPISIZE the start and size of the FlexSPI memory segment.
- FlexSPI2START and FlexSPI2SIZE the start and size of the FlexSPI2 memory segment.
- RAMSIZE the size of the SDRAM memory segment.
- NCACHE_REGION_START the start of the non cacheable memory segment.
- NCACHE_REGION_SIZE the size of the non cacheable memory segment.
Section Placement
CrossStudio for ARM supports iMXRT projects running applications in a number of different memory configurations. You can select the memory configuration you require by setting the Section Placement property.
For iMXRT projects the set of placements are:
- TCM application runs ITCM and DTCM memories.
- RAM application runs in OCRAM memory.
- FlexSPI (HYPER) application runs in FlexSPI and DTCM memories.
- FlexSPI (QuadSPI) application runs in FlexSPI and DTCM memories.
- FlexSPI2 (QuadSPI) application runs in FlexSPI2 and DTCM memories.
- FlexSPI (HYPER, No DCD) application runs in FlexSPI and DTCM memories, no Device Configuration Data.
- FlexSPI (QuadSPI, No DCD) application runs in FlexSPI and DTCM memories, no Device Configuration Data.
- FlexSPI2 (QuadSPI, No DCD) application runs in FlexSPI2 and DTCM memories, no Device Configuration Data.
Stack and Heap Sizes
The default stack and heap sizes are set to be 1024 and 1024 bytes by default when a project is created.
Target Startup Code
The startup code is device specific and is selected with the Target Processor entry. There are a set of preprocessor defines that configure the startup code and are documented in the startup file itself. The startup code calls out to a weak symbol SystemInit with the stack pointer set to the end of the stack section. The SystemInit function can be used to set the CPU clock or configure any external memories prior to the C initialisation code as such it cannot access initialised static data.
The startup code declares symbolic names (and weak implementations) for each interrupt service routine, for example the RTC_SEC_IRQHandler function will be called when the RTC second match interrupt occurs. The names of the interrupt service routines match those in the CMSIS header file. If you are porting code that has application specific interrupt service routines then you can use preprocessor definitions to rename the declared symbolic name for example RTC_SEC_IRQHandler=RTC_SEC_DriverIRQHandler.
Target Reset Script
The reset script iMXRT_Target.js is used by the debugger to reset the target board.