👹
Carlos's Tech Blog
  • 🧔ECUs
    • ZYNQ_Documents
      • [ZYNQ] 构建ZYNQ的BSP工程
      • [ZYNQ] 启动流程
      • [ZYNQ] Secure Boot Flow
      • [ZYNQ] Provisioning Guideline
      • [ZYNQ] Decrypting Partition by the Decrypt Agent Using PUF key
      • [ZYNQ] enabling the cryptsetup on ramdisk
      • [ZYNQ] Encrypt external files based on file system using PUF key
      • [ZYNQ] Loading an Encrypted Linux kernel at U-Boot with a KUP Key
      • [ZYNQ] cross-compile the cryptsetup on Xilinx ZYNQ aarch64 platform
      • [ZYNQ] Linux Linaro系统镜像制作SD卡启动
    • S32G_Documents
      • [S32G] Going through the s32g hard/soft platform
      • [S32G] S32g247's Secure Boot using HSE firmware
        • S32g2 HSE key config
        • How S32g verify secure boot image
        • S32g secure boot signature generation
        • How to download and build S32g Secure boot image
        • [S32G] OTA with Secure Boot
    • RT117x_Documents
      • [RT-117x]IMX RT1170 Provisioning Guideline
      • [RT-117x] Going through the MX-RT1170 hard/soft platform
      • [RT-117x] i.MX-RT1170's Secure Boot
        • [RT-117x]Signing image with the HSM (SignServer)
    • LS104x_Documents
      • [LS104x] bsp project
      • [LS104x] boot flow
      • [LS104x] secure boot
      • [LS104x] Application Note, Using the PKCS#11 in TCU platform
      • [LS104x] 使用ostree更新rootfs
      • [LS104x] ostree的移植
      • [LS104x] Starting with Yocto
      • [LS104x] 使用FIT的kernel格式和initramfs
    • IMX6/8_Documents
      • [IMX6] Defining A U-Boot Command
      • NXP IMX6 嵌入式板子一些笔记
      • NXP-imx6 initialization
    • Vehicle_Apps
      • [SecOC] Tree
        • [SecOC] SecOC Freshness and MAC Truncation
  • 😾TECH
    • Rust Arm OS
      • ARMv7m_Using_The_RUST_Cross_Compiler
    • ARM
      • ARM-v7-M
        • 01_ARMv7-M_处理器架构技术综述
        • 02_ARMv7-M_编程模型与模式
        • 03_ARMv7-M_存储系统结构
        • 04_ARMv7-M_异常处理及中断处理
      • ARM-v8-A
        • 02_ARMv8_基本概念
        • 03_ARMv8_指令集介绍_加载指令集和存储指令集
        • 04_ARMv8_指令集_运算指令集
        • 05_ARMv8_指令集_跳转_比较与返回指令
        • 06_ARMv8_指令集_一些重要的指令
        • 0X_ARMv8_指令集_基于汇编的UART驱动
        • 07_ARMv8_汇编器Using as
        • 08_ARMv8_链接器和链接脚本
        • 09_ARMv8_内嵌汇编(内联汇编)Inline assembly
        • 10_ARMv8_异常处理(一) - 入口与返回、栈选择、异常向量表
        • 11_ARMv8_异常处理(二)- Legacy 中断处理
        • 12_ARMv8_异常处理(三)- GICv1/v2中断处理
        • 13_ARMv8_内存管理(一)-内存管理要素
        • 14_ARMv8_内存管理(二)-ARM的MMU设计
        • 15_ARMv8_内存管理(三)-MMU恒等映射及Linux实现
        • 16_ARMv8_高速缓存(一)cache要素
        • 17_ARMv8_高速缓存(二)ARM cache设计
        • 18_ARMv8_高速缓存(三)多核与一致性要素
        • 19_ARMv8_TLB管理(Translation Lookaside buffer)
        • 20_ARMv8_barrier(一)流水线和一致性模型
        • 21_ARMv8_barrier(二)内存屏障案例
      • ARM Boot Flow
        • 01_Embedded_ARMv7/v8 non-secure Boot Flow
        • 02_Embedded_ARMv8 ATF Secure Boot Flow (BL1/BL2/BL31)
        • 03_Embedded_ARMv8 BL33 Uboot Booting Flow
      • ARM Compiler
        • Compiler optimization and the volatile keyword
      • ARM Development
        • 在MACBOOK上搭建ARMv8架构的ARM开发环境
        • Starting with JLink debugger or QEMU
    • Linux
      • Kernel
        • 0x01_LinuxKernel_内核的启动(一)之启动前准备
        • 0x02_LinuxKernel_内核的启动(二)SMP多核处理器启动过程分析
        • 0x21_LinuxKernel_内核活动(一)之系统调用
        • 0x22_LinuxKernel_内核活动(二)中断体系结构(中断上文)
        • 0x23_LinuxKernel_内核活动(三)中断体系结构(中断下文)
        • 0x24_LinuxKernel_进程(一)进程的管理(生命周期、进程表示)
        • 0x25_LinuxKernel_进程(二)进程的调度器的实现
        • 0x26_LinuxKernel_设备驱动(一)综述与文件系统关联
        • 0x27_LinuxKernel_设备驱动(二)字符设备操作
        • 0x28_LinuxKernel_设备驱动(三)块设备操作
        • 0x29_LinuxKernel_设备驱动(四)资源与总线系统
        • 0x30_LinuxKernel_设备驱动(五)模块
        • 0x31_LinuxKernel_内存管理(一)物理页面、伙伴系统和slab分配器
        • 0x32_LinuxKernel_内存管理(二)虚拟内存管理、缺页与调试工具
        • 0x33_LinuxKernel_同步管理_原子操作_内存屏障_锁机制等
        • 01_LinuxDebug_调试理论和基础综述
      • Userspace
        • Linux-用户空间-多线程与同步
        • Linux进程之间的通信-管道(上)
        • Linux进程之间的通信-管道(下)
        • Linux进程之间的通信-信号量(System V)
        • Linux进程之间的通信-内存共享(System V)
        • Linux进程之间的通信-消息队列(System V)
        • Linux应用调试(一)方法、技巧和工具 - 综述
        • Linux应用调试(二)工具之coredump
        • Linux应用调试(三)工具之Valgrind
        • Linux机制之内存池
        • Linux机制之对象管理和引用计数(kobject/ktype/kset)
        • Linux机制copy_{to, from}_user
        • Linux设备树 - DTS语法、节点、设备树解析等
        • Linux System : Managing Linux Services - inittab & init.d
        • Linux System : Managing Linux Services - initramfs
      • Kernel Examples
        • Linux Driver - GPIO键盘驱动开发记录_OMAPL138
        • 基于OMAPL138的Linux字符驱动_GPIO驱动AD9833(一)之miscdevice和ioctl
        • 基于OMAPL138的Linux字符驱动_GPIO驱动AD9833(二)之cdev与read、write
        • 基于OMAPL138的字符驱动_GPIO驱动AD9833(三)之中断申请IRQ
        • Linux内核调用SPI驱动_实现OLED显示功能
        • Linux内核调用I2C驱动_驱动嵌套驱动方法MPU6050
    • OPTEE
      • 01_OPTEE-OS_基础之(一)功能综述、简要介绍
      • 02_OPTEE-OS_基础之(二)TrustZone和ATF功能综述、简要介绍
      • 03_OPTEE-OS_系统集成之(一)编译、实例、在QEMU上执行
      • 05_OPTEE-OS_系统集成之(三)ATF启动过程
      • 06_OPTEE-OS_系统集成之(四)OPTEE镜像启动过程
      • 07_OPTEE-OS_系统集成之(五)REE侧上层软件
      • 08_OPTEE-OS_系统集成之(六)TEE的驱动
      • 09_OPTEE-OS_内核之(一)ARM核安全态和非安全态的切换
      • 10_OPTEE-OS_内核之(二)对安全监控模式的调用的处理
      • 11_OPTEE-OS_内核之(三)中断与异常的处理
      • 12_OPTEE-OS_内核之(四)对TA请求的处理
      • 13_OPTEE-OS_内核之(五)内存和cache管理
      • 14_OPTEE-OS_内核之(六)线程管理与并发
      • 15_OPTEE-OS_内核之(七)系统调用及IPC机制
      • 16_OPTEE-OS_应用之(一)TA镜像的签名和加载
      • 17_OPTEE-OS_应用之(二)密码学算法和安全存储
      • 18_OPTEE-OS_应用之(三)可信应用的开发
      • 19_OPTEE-OS_应用之(四)安全驱动开发
      • 20_OPTEE-OS_应用之(五)终端密钥在线下发系统
    • Binary
      • 01_ELF文件_目标文件格式
      • 02_ELF文件结构_浅析内部文件结构
      • 03_ELF文件_静态链接
      • 04_ELF文件_加载进程虚拟地址空间
      • 05_ELF文件_动态链接
      • 06_Linux的动态共享库
      • 07_ELF文件_堆和栈调用惯例以ARMv8为例
      • 08_ELF文件_运行库(入口、库、多线程)
      • 09_ELF文件_基于ARMv7的Linux系统调用原理
      • 10_ELF文件_ARM的镜像文件(.bin/.hex/.s19)
    • Build
      • 01_Script_makefile_summary
    • Rust
      • 02_SYS_RUST_文件IO
    • Security
      • Crypto
        • 1.0_Security_计算机安全概述及安全需求
        • 2.0_Security_随机数(伪随机数)
        • 3.0_Security_对称密钥算法加解密
        • 3.1_Security_对称密钥算法之AES
        • 3.2_Security_对称密钥算法之MAC(CMAC/HMAC)
        • 3.3_Security_对称密钥算法之AEAD
        • 8.0_Security_pkcs7(CMS)_embedded
        • 9.0_Security_pkcs11(HSM)_embedded
      • Tools
        • Openssl EVP to implement RSA and SM2 en/dec sign/verify
        • 基于Mac Silicon M1 的OpenSSL 编译
        • How to compile mbedtls library on Linux/Mac/Windows
    • Embedded
      • eMMC启动介质
  • 😃Design
    • Secure Boot
      • JY Secure Boot Desgin
    • FOTA
      • [FOTA] Module of ECUs' FOTA unit design
        • [FOTA] Tech key point: OSTree Deployment
        • [FOTA] Tech key point: repositories role for onboard
        • [FOTA] Tech key point: metadata management
        • [FOTA] Tech key point: ECU verifying and Decrpting
        • [FOTA] Tech key point: time server
      • [FOTA] Local-OTA for Embedded Linux System
    • Provisioning
      • [X-Shield] Module of the Embedded Boards initialization
    • Report
由 GitBook 提供支持
在本页
  • 1. Hardware
  • 1.1 Components layout
  • 2. Software
  • 2.1 System Booting
  • 2.2 Toolchains/SDK/IDE
  • 3. Burning Image
  • 3.1 XIP and non-XIP
  • 3.2 Using non-XIP
  • 3.3 Using XIP mode
  • 3.4 Serial Boot (For provisioning)
  • 4. Knowledge
  • 4.1 FlexRAM
  1. ECUs
  2. RT117x_Documents

[RT-117x] Going through the MX-RT1170 hard/soft platform

Going through the MX-RT1170 hard/soft platform

上一页[RT-117x]IMX RT1170 Provisioning Guideline下一页[RT-117x] i.MX-RT1170's Secure Boot

最后更新于1年前

1. Hardware

1.1 Components layout

The reference board quick guide is shown in the link: and

Plug the power adapter wire into the MIMXRT1170-EVK board 5V DC IN header (J43) and switch on 5V DC IN (SW5).

As an embedded developer, you may pay more attention to the following:

  • Serial port: the Debug USB port will map the onboard linker service and serial port /dev/ttyACM0.

  • Debug port:

    • Onboard linker service (DAP-Link)

    • External J-Link.

The OpenSDA circuit (CMSIS–DAP) is an open-standard serial and debug adapter. It bridges serial and debug communications between a USB host and an embedded target processor

CMSIS-DAP features a Mass Storage Device (MSD) bootloader, which provides a quick and easy mechanism for loading different CMSIS-DAP Applications such as flash programmers, run-control debug interfaces, serial-to-USB converters, etc. Two or more CMSIS-DAP applications can run simultaneously. For example, run-control debug application and serial-to-USB converter run in parallel to provide a virtual COM communication interface while allowing code debugging via CMSIS-DAP with just a single USB connection.

For the IMXRT1170 EVK board, J11 is the connector between the USB host and the target processor. Jumper to serial downloader mode uses the stable DAP-Link debugger function. If developer wants to make OpenSDA going to the bootloader mode, jumper J27 to 1-2 and press SW3 when power on. Meanwhile, the OpenSDA supports drag/drop feature for U-Disk.

2. Software

2.1 System Booting

2.1.1 Boot overview

The boot process begins at the Power-On Reset (POR) where the hardware reset logic forces the ARM core to begin the execution starting from the on-chip boot ROM. The boot ROM uses the state of the BOOT_MODE register and eFUSEs to determine the boot device. The boot ROM code also allows to download the programs to be run on the device. The example is a provisioning program that can make further use of the serial connection to provide a boot device with a new image.

Device Configuration Data (DCD). DCD feature allows the boot ROM code to obtain the SOC configuration data from an external program image residing on the boot device. As an example, the DCD can be used to program the SDRAM controller (SEMC) for optimal settings, improving the boot performance. The DCD is restricted to the memory areas and peripheral addresses that are considered essential for the boot purposes.

The imx-rt1160 bootflow is shown in the following figure:

Boot ROM stage

The figure found here show the high-level boot ROM code flow:

The mainly features of the Boot Rom include:

  • Support for booting from various boot device

  • Serial downloader support (USB OTG and UART)

  • Device Configuration Data (DCD) and plugin

  • Digital signature and encryption based High-Assurance Boot (HAB)

  • Wake-up from the low-power modes

  • Encrypted eXecute In Place (XIP) on Serial NOR via FlexSPI interface powered by Bus Encryption Engine (BEE)

  • Encrypted boot on devices except the Serial NOR by Data Co-Processor (DCP) controller The Boot Rom supports these boot devices:

    • Serial NOR Flash via FlexSPI

    • Serial NAND Flash via FlexSPI

    • Parallel NOR Flash via Smart External Memory Controller (SEMC)

    • RAWNAND Flash via SEMC

    • SD/MMC

    • SPI NOR/EEPROM

Secondary bootable Image stage

Overview

  • Normal boot image: This type of image can boot directly by boot ROM.

  • Plugin boot image: This type of image can be used to load a boot image from devices that are not natively supported by boot ROM.

Both types of image can be unsigned, signed, and encrypted for different production phases and different security level requirements:

  • Unsigned Image: The image does not contain authentication-related data and is used during development phase.

  • Signed Image: The image contains authentication-related data (CSF section) and is used during production phase. For more information, please refer to

Boot Options

The FlexSPI NOR Boot flow is shown in the following diagram:

The on-chip RAM = FlexRAM (512KB + 256KB) + OCRAM(1.25MB)

RAM boot

boot source

The boot sources of the RAM boot as follows:

  • FlexSPI NOR/NAND Flash or EEPROM

  • SD/eMMC

  • Serial (USB/UART)

boot destination

The boot destination of the RAM boot as follows:

  • System RAM (ITCM/OCRAM)

  • External SDRAM.

The figure shows the process of the non-XIP boot:

  • Stage 1: Bootable image is in the external flash.

  • Stage 2: BootROM loads the starting 4 KB of data from the bootable image to the internal SRAM (OCRAM). It includes the IVT and BD information and will be used for the application image loading.

  • Stage 3: BootROM transfers the starting 4 KB of data from the internal SRAM (OCRAM) to the destination address space of the bootable image.

  • Stage 4: BootROM continues loading the rest of the bootable image from the external flash to the destination address space and starts up the application binary.

XIP boot

The XIP mode is boot directly from:

  • FlexSPI NOR Flash

  • SEMC Parallel NOR Flash

Serial(1-bit SPI) NOR via Flexcomm SPI (Design for Recovery boot)

There are many types NOR Flash can be selected:

Adesto AT25SF641-SUB-T          (NOR Flash, Multiple I/O, 104MHz,     256B Page/4-32-64KB Sector/64Mb Device)
Micron MT25QL128ABA1ESE-OSIT    (NOR Flash, Multiple I/O, 133MHz-STR, 64B Page/4-32-64KB Sector/128Mb Device)
Spansion S25FL129P              (NOR Flash, Multiple I/O, 80MHz,      256B Page/4-8-64-256KB Sector/128Mb Device)

Boot related address

Boot settings

The BOOT_MODE is initialized by sampling the BOOT_MODE0 and BOOT_MODE1 inputs on the rising edge of the POR_B and stored in the internal BOOT_MODE register (can be read from SRC_SBMR2[BMOD[1:0]]).

Typically, the internal boot is selected for normal boot, which is configured by external BOOT_CFG GPIOs. The Table 4shows the typical Boot Mode and Boot Device settings.

Boot Image consists

The Boot Image consists of:

  • Image Vector Table (IVT): A list of pointers located at a fixed address that the ROM examines to determine where the other components of the program image are located.

  • Boot Data: A table that indicates the program image location, program image size in bytes, and the plugin flag.

  • Device Configuration Data (DCD): IC configuration data (ex: SDRAM register config).

  • User code and data.

Each bootable image starts with appropriate IVT. In general, for the external memory devices that support the XIP feature, the IVT offset is 0x1000, otherwise, it is 0x400. For example, for FlexSPI NOR on RT1052, the IVT must start at address 0x60001000 (start address is 0x6000_0000, IVT offset is 0x1000).

The IVT data structure is shown in the following table:

Offset

Field

Description

0x00 - 0x03

header

0x04 - 0x07

entry

Absolute address of the first instruction to execute from the image, or thevector address of the image

0x08 - 0x0b

reserved1

Reserved for future use, set to 0

0x0c - 0x0f

dcd

Absolute address of the image DCD. It is optional, so this field can be set to NULL if no DCD is required.

0x10 - 0x13

boot_data

Absolute address of the boot data

0x14 - 0x17

self

Absolute address of the IVT.

0x18 - 0x1b

csf

Absolute address of the Command Sequence File (CSF) used by the HAB library.

0x1c - 0x1f

reserved2

Reserved, set to 0

The Boot data structure is shown in the following table:

Offset

Field

Description

0x00-0x03

start

Absolute address of the bootable image

0x04-0x07

length

Size of the bootable image

0x08-0x0b

plugin

Plugin flag, set to 0 if it is a normal boot image

How to generate a secondary bootable image?

It also can generate wrapped binary file with command sequences and bootable image together called SB file, using corresponding options and proper command file called BD file. (MFGTool using this .sb file)

How to burn a secondary bootable image?

  • DAP-Link (OpenSDA MSD drag/drop)

  • MFG tool

Recovery Boot

The chip supports recovery devices. If the primary boot device fails, the boot ROM tries to boot from the recovery device using one of the LPSPI ports. To enable the recovery device, the recovery boot fuse must be set. Additionally, the serial EEPROM fuses must be set as described in Serial NOR/EEPROM through LPSPI. The boot ROM code determines the type of device using the following parameters, provided by the eFUSE settings during boot.

2.2 Toolchains/SDK/IDE

The following figure shows the relationship of tools and IDE:

2.2.1 Toolchains

2.2.2 SDK

2.2.3 IDE

2.2.4 Program tools

DAP-Link (OpenSDA MSD drag/drop)

  • QSPI Flash on EVK only.

  • Binary file supports only.

MFG tool

mcu-boot-utility

3. Burning Image

This section will introduce the three boot modes:

  • Using non-XIP.

  • Using XIP mode.

  • Using serial mode. (For provisioning and image flash-loader)

Serial NOR can be said to be the most familiar startup device. Although this device can support two types of apps (XIP and non-XIP) to start, it is undoubtedly XIP App that you use most. Because the length of the app code under XIP can be as large as the capacity of Flash, which is very important for applications with complex functions. However, there are some points to pay attention to when writing XIP App code, For example, there are some restrictions when configuring the system clock (which cannot affect the FlexSPI module) or when writing Flash (if RWW is not supported, it needs to be copied to RAM for execution).

As for non-XIP, compared with XIP, there will be one more app copy process, and the startup time will inevitably become longer. There are many types of copy target devices, which can be internal RAM (including TCM and OCRAM) or external RAM (SDRAM or HyperRAM). In order to improve the efficiency of code execution, it is usually moved to the internal TCM for execution. Of course, it can also be moved to external SDRAM for execution. However, in this case, the DCD function needs to be used additionally to complete the initialization of the SEMC module before moving.

3.2 Using non-XIP

3.2.1 Booting from Nor FLASH

Note, the Nor FLASH is QSPI NorFlash, the QSPI Flash chip is shown in the following figure:

Hardware Design

It is the most common case to use a flash in system design. The flash is responsible for storing the application code (so-called Code Flash). i.MXRT can be executed in the original place of Flash, and can also copy the application program to internal RAM for execution.

Memmap

In the non-XIP mode, the image will load to the RAM from the Nor FLASH when the board powers on. So the BootROM must basically know what is the image start address and size. Therefore, a bootable image containing the boot header is storing information of the image start address, size and configurations.

For the non-XIP mode, the RAM mapping is shown in the following figure:

  • The 0x2020_0000 - 0x2020_7FFF, is reserved by the BootROM.

  • The 0x2020_8000 - 0x2020_8FFF, is reserved by the initial non-XIP image.

  • The XIP .ro/.bss/stack sections should be linked to the over the 0x2020_9000.

Generating Application

Disable the XIP_BOOT_HEADER_ENABLE

Changing the RAM mapping

According to the above figure non-XIP mode RAM mapping, we should load the application to the RAM memory that can be the on-chip RAM (OCRAM or TCM) or the external RAM (SDRAM).

According to the above the stage 3 of non-XIP processes, we should reserved the at least 2KB RAM space for the boot header of the BootROM copied from the OCRAM. As a result, the RAM address to be linked are showing in the following:

Note, The order of RAM items is meaningful. The first item is the application’s vector linking.

The next is set the Link application to RAM, it will ignore the FLASH type on the above RAM list figure.

When you compiled the application, you would confirm the isr_vector is matching your SRAM_ITC item.

You also can select the external RAM, such as the SDRAM. The SDRAM is mapped to 0x8000_0000 address. However, there are many types of external SDRAM, the BootROM cannot know what is the SDRAM used in your board. Therefore, the BootROM loads the named DCD data file to initialize the external SDRAM.

MCUXpreeo IDE has integrated DCD config tool that is shown in the following figure:

Note, it will change your source code.

Then uses the boot utility:

This part referenced:

3.2.3 Booting from eMMC/SD

Code Section

Data Section

I-TCM

D-TCM

The boot method cannot be implemented, because hardware does not support it. No eMMC on the board, and when use the SD, the hardware should be modified.

3.2.4 Booting from NAND FLASH (OCTAL Flash)

The boot method cannot be implemented, because hardware does not support it. No NAND FLASH on the board.

3.3 Using XIP mode

If boots device from the XIP mode, the source memory is serial NOR Flash (1-bit SPI or QSPI) or parallel NOR Flash.

The HyperFlash or Nor FLASH XIP Boot Image layout is shown in the following figure:

The following table shows three macros that are added in flexspi_nor targets to support XIP:

MACRO IN SDK

Description

XIP_EXTERNAL_FLASH

1: Exclude the code which will change the clock of flexspi. 0: make no changes.

XIP_BOOT_HEADER_ENABLE

1: Add flexspi configuration block, image vector table, boot data and device configuration data(optional) to the image by default. 0: Add nothing to the image by default.

XIP_BOOT_HEADER_DCD_ENABLE

1: Add device configuration data to the image. 0: Do NOT add device configuration data to the image.

If you want to use the QSPI Flash, the onboard Hyper Flash should be removed, otherwise it will impact the QSPI Flash read and write timing. As the result, only one type FLASH can be enabled on one board.

3.3.1 Booting from the Hyper Flash

On the IMXRT1170 EVK board, there is one 512 Mbit Hyper Flash device. If the developer wants to boot from the Hyper Flash. By default, the Hyper Flash is not used. To enable the onboard Hyper FLASH, the settings must be changed.

  • Remove resistors: R380/R399/R386/R390/R392/R385.

  • Weld 0 Ω resistors: R381/R378/R382/R389/R402/R377/R388/R391.

The boot method cannot be implemented, because hardware does not support it.

Code Section

Data Section

Code XIP in Hyper Flash

Data in D-TCM

Code XIP in Hyper Flash

Data in SDRAM

3.3.2 Booting from the Serial Nor FLASH (up to 504MB)

For programming the QSPI FLASH, you can make use of the DAP-Link(OpenSDA MSD drag/drop) or MFG tool(uuu). For the DAP-Link, the QSPI Flash on EVK only and Binary file supports only.

Hardware

Memmap

For the XIP mode, the RAM mapping is shown in the following figure:

  • The 0x2020_0000 - 0x2020_7FFF, is reserved by the BootROM.

  • The XIP .ro/.bss/stack sections should be linked to the over the 0x2020_8000.

Application

When we use the mode of the XIP, the instructions (program) are loaded by the CPU’s i-cache directly. In contrast to non-XIP mode, the BootROM does not need to be aware of the application start address. As a result, XIP_BOOT_HEADER_ENABLE=0 is set for the project.

Using the IDE

The MCU config is shown in the following figure:

using the ARMCC

In the `flags.cmake` file:

download

3.3.3 Booting from the Parallel Nor FLASH (up to 16MB)

The boot method cannot be implemented, because hardware does not support it. No parallel NOR FLASH on the board.

3.4 Serial Boot (For provisioning)

4. Knowledge

4.1 FlexRAM

The memory system includes support for the connection of local Tightly Coupled Memory called ITCM and DTCM. The ITCM has one 64-bit memory interface and the DTCM has two 32-bit memory interfaces, D0TCM and D1TCM, selected on bit[2] of the request address. Each TCM interface is a physical connection on the processor that is suitable for connection to SRAM with minimal glue logic. These ports are optimized for low-latency memory.

The flexRAM cannot be accessed before the releasing the M7, when use the M4 as primary boot.

RT1170 crossover MCUs are part of the EdgeVerse™ platform and are setting speed records at 1 GHz. The dual core RT1170 MCU runs on the Arm® Cortex®-M7 core at 1 GHz and Arm Cortex-M4 at 400 MHz. For more information, please refer to .

There are two types of MCU bootable image:

Encrypted Image: The image contains encrypted application data and authentication-related data and is used during the production phase with higher security requirement. For more information, please refer to

The imx RT family supports a number of different boot sources and includes the option for memory to be copied to on-chip or external destination memory, as well as for some interfaces. For more information, please refer to .

The RAM boot mode is an option for external to be copied to an on-chip or external , then executes the boot image from the on-chip or external RAM.

With BootROM, the RT can boot from various external flash devices in the XIP (NOR-only) or non-XIP modes. Based on the IVT and BD information in the Bootable image, the bootROM either starts up the application binary directly (XIP) or copies the bootable image to the RAM and starts up the application binary (non-XIP).

Execute in place (XIP) is a method of executing programs directly from long-term storage rather than copying it into . It is an extension of using to reduce the total amount of memory required.

This is following the the .

CSF (optional): signature block for Secure Boot, generated by CST. For more information, please refer to

KeyBlob (optional) – a data structure consists of wrapped DEK for encrypt boot. For more information, please refer to

The Elftosb utility is a command-line host program used to generate the bootable image for the MCU boot ROM. Elftosb tool supports SREC input program images.

Please refer to the pdf file at .

We will use the elftosb in the

Use case:

There is many binary formats that are related to the NXP bare-mental platform, please refer to the link .

is a community supported pre-built GNU compiler toolchain for Arm based CPUs. :

On Linux host:

On Windows host:

The MCUXpresso software development kit (SDK) is complimentary and includes full source code under a permissive open-source license for all hardware abstraction and peripheral driver software. .

new MCUXpresso SDK projects, and also provides pin and clock tools to generate initialization C code for custom board support. It is fully integrated into MCUXpresso or you can download it as a separate tool. You can get it from the .

How to import hello world project, please refer to view the video from NXP . You can also get the user guide from .

The default firmware of DAP-Link on EVK supports Hyper Flash only. The firmware of DAP-Link should be replaced if the QSPI flash drag/drop is used. The firmware can be downloaded from

Window OS only. Don’t use it.) The MfgTool supports I.MXRT BootROM and KBOOT based Flashloader, it can be used in factory production environment. The Mfgtool can detect the presence of BootROM devices connected to PC and invokes “blhost” to program the image on target memory devices connected to MCU device. The blhost is a command-line host program used to interface with devices running KBOOT based Bootloader, part of MfgTool release .sb file support only. Download address:

3.1 XIP and non-XIP

The RAM boot mode is an option for external to be copied to an on-chip or external , then executes the boot image from the on-chip or external RAM.

In the demo’s design, the QSPI chip is . The rt1170’s flexSPI interface supports the two type of the connection methods (single flash and multi flashes). It is shown in the following figure:

For the detail reason, please refer to the . Meanwhile, disable the XIP_EXTERNAL_FLASH

You can refer to the link (3.4. MFG boot from Hyper Flash) to burn the OCTAL FLASH using the MFG tool, or (3.3. OpenSDA Drag/Drop and boot from Hyper Flash) using DAP-Link (OpenSDA MSD drag/drop).

For the hardware design, please refer to the link

Please refer to

The Flexible RAM Controller (FLEXRAM) provides access control, as well as Single-bit Error Correction and Dual-bit Error Detection (SEC-DED) ECC, from TCM/OCRAM to 512KB of on-chip RAM. Another 128KB of on-chip RAM is allocated to store ECC cipher or used by OCRAM to store normal data. You can refer to the pdf .

The TCM interfaces are designed to be connected to RAM, or RAM-like memory, that is, Normal-type memory in the Arm architecture. The processor can issue speculative read accesses on these interfaces. Therefore, read accesses through the TCM interfaces can be repeated, and can access uninitialized or nonexistent memory locations. This means that the TCM interfaces are generally not suitable for read-sensitive devices such as FIFOs. If an access is speculative, the processor ignores any error or retry signaled for the access, see .

🧔
i.MX
edge computing
i.MX
https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus/i-mx-rt1170-first-ghz-crossover-mcu-with-arm-cortex-m7-and-cortex-m4-cores:i.MX-RT1170
i.MX
https://app.gitbook.com/o/eTBeA3vhkOtihTJASkhd/s/tqiX1ZbXhRorHX3bwk1r/~/changes/13/rt1170_documents/rt-117x-i.mx-rt1170s-secure-boot
Execute in Place (XIP)
https://www.nxp.com/docs/en/application-note/AN12107.pdf
NVM
RAM
i.MX
RAM
shared memory
ARMv7-M Architecture Reference Manual - Address Mapping
https://app.gitbook.com/o/eTBeA3vhkOtihTJASkhd/s/tqiX1ZbXhRorHX3bwk1r/~/changes/13/rt1170_documents/rt-117x-i.mx-rt1170s-secure-boot
https://app.gitbook.com/o/eTBeA3vhkOtihTJASkhd/s/tqiX1ZbXhRorHX3bwk1r/~/changes/13/rt1170_documents/rt-117x-i.mx-rt1170s-secure-boot
i.MX
i.MX
https://drive.google.com/file/d/1Y16oT1R-JJcHb-pvpN51YiI8rOnjDpv5/view?usp=drive_link
https://app.gitbook.com/o/eTBeA3vhkOtihTJASkhd/s/tqiX1ZbXhRorHX3bwk1r/~/changes/13/rt1170_documents/rt-117x-i.mx-rt1170s-secure-boot
https://www.nxp.com/docs/en/nxp/application-notes/AN12238.pdf
https://mcuoneclipse.com/2017/03/29/mcuxpresso-ide-s-record-intel-hex-and-binary-files/
Arm GNU Toolchain
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
AArch32 bare-metal target (arm-none-eabi)
AArch32 bare-metal target (arm-none-eabi)
https://mcuxpresso.nxp.com/en/builder?hw=MIMXRT1170-EVK
link
https://www.nxp.com/document/guide/getting-started-with-the-i-mx-rt1170-evaluation-kit:GS-MIMXRT1170-EVK#title3_1
https://drive.google.com/file/d/139VHbo-dKn2ovUIOdJZzyQaRVg4JUjUq/view?usp=drive_link
https://drive.google.com/file/d/1BqRt33RNvixfIt6PPuf7axTCj7_IFY9L/view?usp=drive_link
i.MX
https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/lpcxpresso-boards/mcu-bootloader-for-nxp-microcontrollers:MCUBOOT
NVM
RAM
IS25WP128-JBLE
https://community.nxp.com/t5/i-MX-RT/XIP-BOOT-HEADER-ENABLE-Symbol-Effect/m-p/1391290
i.MX RT10502 5-NXP-MCUBootUtility(RT1170)
https://mcuoneclipse.com/2019/01/22/tutorial-booting-the-nxp-i-mx-rt-from-micro-sd-card/
https://drive.google.com/file/d/1mCbtAAQ0Z34a8Iq3ay8qJbCjOP8vg5_A/view?usp=drive_link
https://app.gitbook.com/o/eTBeA3vhkOtihTJASkhd/s/tqiX1ZbXhRorHX3bwk1r/~/changes/13/rt1170_documents/rt-117x-imx-rt1170-provisioning-guideline
https://drive.google.com/file/d/1QXkQ0qL3eg0b3rxxH3PCgK5PeKgzS-lK/view?usp=drive_link
TCM interface protocol
#3.3.2-booting-from-the-serial-nor-flash-up-to-504mb
https://www.nxp.com.cn/docs/en/quick-reference-guide/MIMXRT1170-EVK-QSG.pdf
https://www.nxp.com/document/guide/getting-started-with-the-i-mx-rt1170-evaluation-kit:GS-MIMXRT1170-EVK#title3_1
relationship of tools and IDE
QSPI Flash Chip
non-XIP mode RAM mapping
FLEXRAM block diagram
https://github.com/nxp-mcuxpresso/mcu-boot-utility