Skip to content

Commit

Permalink
Merge pull request #199 from danielinux/i.mx-rt1050
Browse files Browse the repository at this point in the history
Added support for NXP i.MX-RT105x
  • Loading branch information
dgarske authored Apr 27, 2022
2 parents 6d524a2 + 1c9e3fd commit 5762714
Show file tree
Hide file tree
Showing 10 changed files with 527 additions and 116 deletions.
47 changes: 30 additions & 17 deletions arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,28 @@ ifeq ($(TARGET),imx_rt)
-I$(MCUXPRESSO)/components/flash/nor \
-I$(MCUXPRESSO)/components/flash/nor/flexspi \
-I$(MCUXPRESSO)/components/serial_manager/ \
-DCPU_$(MCUXPRESSO_CPU) -I$(MCUXPRESSO_CMSIS)/Include -DDEBUG_CONSOLE_ASSERT_DISABLE=1 -I$(MCUXPRESSO_DRIVERS)/project_template/ \
-I$(MCUXPRESSO)/boards/evkmimxrt1060/xip/ -DXIP_EXTERNAL_FLASH=1 -DDEBUG_CONSOLE_ASSERT_DISABLE=1 -DPRINTF_ADVANCED_ENABLE=1 \
-DCPU_$(MCUXPRESSO_CPU) -I$(MCUXPRESSO_CMSIS)/Include \
-DCPU_$(MCUXPRESSO_CPU) -I$(MCUXPRESSO_CMSIS)/Core/Include \
-DDEBUG_CONSOLE_ASSERT_DISABLE=1 -I$(MCUXPRESSO_DRIVERS)/project_template/ \
-DXIP_EXTERNAL_FLASH=1 -DDEBUG_CONSOLE_ASSERT_DISABLE=1 -DPRINTF_ADVANCED_ENABLE=1 \
-DSCANF_ADVANCED_ENABLE=1 -DSERIAL_PORT_TYPE_UART=1 -DNDEBUG=1

OBJS+= $(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o $(MCUXPRESSO_DRIVERS)/drivers/fsl_flexspi.o
ifeq ($(MCUXPRESSO_CPU),MIMXRT1052DVJ6B)
CFLAGS+=-I$(MCUXPRESSO)/boards/evkmimxrt1060/xip/
ifeq ($(PKA),1)
PKA_EXTRA_OBJS+= $(MCUXPRESSO)/devices/MIMXRT1062/drivers/fsl_dcp.o
endif
else
CFLAGS+=-I$(MCUXPRESSO)/boards/evkmimxrt1050/xip/
ifeq ($(PKA),1)
PKA_EXTRA_OBJS+= $(MCUXPRESSO)/devices/MIMXRT1052/drivers/fsl_dcp.o
endif
endif

ifeq ($(PKA),1)
PKA_EXTRA_OBJS+= \
$(MCUXPRESSO)/devices/MIMXRT1062/drivers/fsl_dcp.o \
./lib/wolfssl/wolfcrypt/src/port/nxp/dcp_port.o
PKA_EXTRA_CFLAGS+=-DWOLFSSL_IMXRT_DCP
PKA_EXTRA_OBJS+=./lib/wolfssl/wolfcrypt/src/port/nxp/dcp_port.o
PKA_EXTRA_CFLAGS+=-DWOLFSSL_IMXRT_DCP
endif
endif

Expand Down Expand Up @@ -298,17 +311,17 @@ ifeq ($(TARGET),psoc6)
$(CYPRESS_PDL)/drivers/source/TOOLCHAIN_GCC_ARM/cy_syslib_gcc.o \
$(CYPRESS_PDL)/devices/templates/COMPONENT_MTB/COMPONENT_CM0P/system_psoc6_cm0plus.o
PSOC6_CRYPTO_OBJS=./lib/wolfssl/wolfcrypt/src/port/cypress/psoc6_crypto.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_vu.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_ecc_domain_params.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_ecc_nist_p.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_ecc_ecdsa.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_sha_v2.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_sha_v1.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_mem_v2.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_mem_v1.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_hw.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_hw_v1.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto.o
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_vu.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_ecc_domain_params.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_ecc_nist_p.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_ecc_ecdsa.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_sha_v2.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_sha_v1.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_mem_v2.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_mem_v1.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_hw.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto_core_hw_v1.o \
$(CYPRESS_PDL)/drivers/source/cy_crypto.o

CFLAGS+=-I$(CYPRESS_PDL)/drivers/include/ \
-I$(CYPRESS_PDL)/devices/include \
Expand Down
29 changes: 29 additions & 0 deletions config/examples/imx-rt1050.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ARCH?=ARM
TARGET?=imx_rt
SIGN?=ECC256
HASH?=SHA256
MCUXPRESSO?=$(PWD)/../SDK_2_11_0_EVKB-IMXRT1050
MCUXPRESSO_CPU?=MIMXRT1052DVJ6B
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MIMXRT1052
MCUXPRESSO_CMSIS?=$(MCUXPRESSO)/CMSIS
DEBUG?=0
VTOR?=1
CORTEX_M0?=0
NO_ASM?=0
NO_MPU=1
EXT_FLASH?=0
SPI_FLASH?=0
ALLOW_DOWNGRADE?=0
NVM_FLASH_WRITEONCE?=1
WOLFBOOT_VERSION?=0
V?=0
SPMATH?=1
RAM_CODE?=0
DUALBANK_SWAP?=0
PKA?=0
WOLFBOOT_PARTITION_SIZE?=0x20000
WOLFBOOT_SECTOR_SIZE?=0x1000
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x60010000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x60030000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x60050000
WOLFBOOT_SMALL_STACK?=1
2 changes: 1 addition & 1 deletion config/examples/imx-rt1060.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARCH?=ARM
TARGET?=imx_rt
SIGN?=ECC256
HASH?=SHA256
MCUXPRESSO?=$(PWD)/../SDK-2.8.2_EVK-MIMXRT1060
MCUXPRESSO?=$(PWD)/../SDK-2.11.0_EVK-MIMXRT1060
MCUXPRESSO_CPU?=MIMXRT1062DVL6A
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MIMXRT1062
MCUXPRESSO_CMSIS?=$(MCUXPRESSO)/CMSIS
Expand Down
13 changes: 8 additions & 5 deletions docs/Targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -972,22 +972,25 @@ the monitor command sequence below:

## NXP iMX-RT

NXP RT1060/1062 (RT1060-EVK)
NXP RT1060/1062 and RT1050

The NXP iMX-RT1060 is a Cortex-M7 with a DCP coprocessor for SHA256 acceleration.
Example configuration for this target is provided in [/config/examples/imx-rt1060.config](/config/examples/imx-rt1060.config).

### Building wolfBoot

MCUXpresso SDK is required by wolfBoot to access device drivers on this platform.
A package can be obtained from the [MCUXpresso SDK Builder](https://mcuxpresso.nxp.com/en/welcome), by selecting `EVK-MIMXRT1060` as target, and keeping the default choice of components.
A package can be obtained from the [MCUXpresso SDK Builder](https://mcuxpresso.nxp.com/en/welcome), by selecting a target and keeping the default choice of components.

Set the `MCUXPRESSO` configuration variable to the path where the SDK package is extracted, then build wolfBoot normally by running `make`.
* For the RT1060 use `EVKB-IMXRT1060`. See configuration example in `config/examples/imx-rt1060.config`.
* For the RT1050 use `EVKB-IMXRT1050`. See configuration example in `config/examples/imx-rt1050.config`.

wolfBoot support for iMX-RT1060 has been tested using MCUXpresso SDK version 2.8.2.
Set the wolfBoot `MCUXPRESSO` configuration variable to the path where the SDK package is extracted, then build wolfBoot normally by running `make`.

wolfBoot support for iMX-RT1060/iMX-RT1050 has been tested using MCUXpresso SDK version 2.11.1.

DCP support (hardware acceleration for SHA256 operations) can be enabled by using PKA=1 in the configuration file.
Firmware can be directly uploaded to the target by copying `factory.bin` to the virtual USB drive associated to the device (RT1060-EVK).
Firmware can be directly uploaded to the target by copying `factory.bin` to the virtual USB drive associated to the device.


## NXP Kinetis
Expand Down
Loading

0 comments on commit 5762714

Please sign in to comment.