iMX7ULP (Q)SPI support
The NXP iMX7ULP device series comes with a QUADSPI controller which allows memory mapped read accesses to any (Q)SPI flash, connected to the Quad-SPI interface of the MCU. This allows the J-Link DLL to support flash programming through the Quad-SPI interface. Unfortunately, there is no generic way how to implement flash programming because the used pins to connect the SPI flash is not defined but different pins can be used for the same QUADSPI alternate function and therefore, for each configuration, a slightly different RAMCode (different pin initialization / flash size) is required. We have developed a flash algorithm, which allows to program any common (Q)SPI flash, connected to the Quad-SPI interface of the NXP iMX7ULP device. The flash algorithm is based on the Open Flashloader concept so it can easily exchanged if a pin configuration, different from the one used in the example flash algorithm, is required. In such cases, please get in touch with SEGGER directly (firstname.lastname@example.org).
Example Implementation (iMX7ULP-EVK-SOM with base board)
As described above, the reference flash algorithm is based on the Open Flashloader and therefore needs to be added manually using a JLinkDevices.xml file. An example JLinkDevices.xml entry as well as the used pinout in the example flash algorithm is given below. This example assumes a Macronix MX25R6435F(8MB flash) connected to the Quad-SPI interface of the iMX7ULP. For further information regarding the Open Flashloader and how to use the JLinkDevices.xml file, please refer to the J-Link User Manual (UM08001), chapter 10 Open Flash Loader.
Quad-SPI Interface Pins
The following QSPI interface is used on the iMX7ULP-EVK-SOM board to interface the (Q)SPI flash.
|Alternate function||Port / Pin|
<Database> <Device> <ChipInfo Vendor="NXP" JLinkScriptFile="Devices\NXP\iMX7ULP\NXP_iMX7ULP_Connect_CortexA7.JLinkScript" Name="MCIMX7U5_A7" WorkRAMAddr="0x20000000" WorkRAMSize="0x00010000" Core="JLINK_CORE_CORTEX_A7"/> <FlashBankInfo Name="QSPI Flash" BaseAddr="0xC0000000" MaxSize="0x10000000" Loader="NXP_iMX7ULP_BB.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" /> </Device> </Database>
Flash algorithm (*.elf)
This file contains the program routines used by the J-Link DLL during flash programming.
Embedded Studio example project
The example project contains a simple counter loop which is linked into the (Q)SPI flash memory region @ address 0xC0000000. The project includes the JLinkDevices.xml file as well as the NXP_iMX7ULP_BB.elf. It runs out-of-the-box. Please note, that Embedded Studio 3.20 or later and at least the J-Link DLL version V6.16a must be used.