Skip to content

Commit

Permalink
Merge pull request #445 from MulattoKid/imxrt_dcp
Browse files Browse the repository at this point in the history
Fix compilation issues when using PKA=1 for i.MX RT targets
  • Loading branch information
dgarske authored Apr 29, 2024
2 parents 9126150 + d4df974 commit 672e90b
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 4 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test-configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,34 @@ jobs:
arch: arm
config-file: ./config/examples/imx-rt1064.config

imx_rt1040_test_pka:
uses: ./.github/workflows/test-build-mcux-sdk.yml
with:
arch: arm
config-file: ./config/examples/imx-rt1040.config
make-args: PKA=1

imx_rt1050_test_pka:
uses: ./.github/workflows/test-build-mcux-sdk.yml
with:
arch: arm
config-file: ./config/examples/imx-rt1050.config
make-args: PKA=1

imx_rt1060_test_pka:
uses: ./.github/workflows/test-build-mcux-sdk.yml
with:
arch: arm
config-file: ./config/examples/imx-rt1060.config
make-args: PKA=1

imx_rt1064_test_pka:
uses: ./.github/workflows/test-build-mcux-sdk.yml
with:
arch: arm
config-file: ./config/examples/imx-rt1064.config
make-args: PKA=1

kinetis_k64f_test:
uses: ./.github/workflows/test-build-mcux-sdk.yml
with:
Expand Down
9 changes: 7 additions & 2 deletions arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,17 @@ ifeq ($(TARGET),imx_rt)

ifeq ($(PKA),1)
ifeq ($(MCUXSDK),1)
PKA_EXTRA_OBJS+= $(MCUXPRESSO)/drivers/fsl_dcp.o
PKA_EXTRA_OBJS+= $(MCUXPRESSO)/drivers/cache/armv7-m7/fsl_cache.o
PKA_EXTRA_OBJS+= $(MCUXPRESSO)/drivers/dcp/fsl_dcp.o
else
PKA_EXTRA_OBJS+= $(MCUXPRESSO_DRIVERS)/drivers/fsl_cache.o
PKA_EXTRA_OBJS+= $(MCUXPRESSO_DRIVERS)/drivers/fsl_dcp.o
endif
PKA_EXTRA_OBJS+=./lib/wolfssl/wolfcrypt/src/port/nxp/dcp_port.o
PKA_EXTRA_CFLAGS+=-DWOLFSSL_IMXRT_DCP
PKA_EXTRA_CFLAGS+=\
-DWOLFSSL_IMXRT_DCP \
-I$(MCUXPRESSO)/drivers/cache/armv7-m7 \
-I$(MCUXPRESSO)/drivers/dcp
endif
endif

Expand Down
2 changes: 1 addition & 1 deletion config/examples/imx-rt1040.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x60050000
WOLFBOOT_SMALL_STACK?=1

# Flash Options
CFLAGS_EXTRA+=-DCONFIG_HYPERFLASH
CFLAGS_EXTRA+=-DCONFIG_HYPERFLASH -DDCP_USE_DCACHE=0
#CFLAGS_EXTRA+=-DCONFIG_FLASH_IS25WP064A
#CFLAGS_EXTRA+=-DCONFIG_FLASH_W25Q64JV
2 changes: 1 addition & 1 deletion config/examples/imx-rt1050.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x60050000
WOLFBOOT_SMALL_STACK?=1

# Flash Options
CFLAGS_EXTRA+=-DCONFIG_HYPERFLASH
CFLAGS_EXTRA+=-DCONFIG_HYPERFLASH -DDCP_USE_DCACHE=0
#CFLAGS_EXTRA+=-DCONFIG_FLASH_IS25WP064A
#CFLAGS_EXTRA+=-DCONFIG_FLASH_W25Q64JV
2 changes: 2 additions & 0 deletions config/examples/imx-rt1060.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x60010000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x60030000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x60050000
WOLFBOOT_SMALL_STACK?=1

CFLAGS_EXTRA+=-DDCP_USE_DCACHE=0
2 changes: 2 additions & 0 deletions config/examples/imx-rt1064.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x70010000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x70030000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x70050000
WOLFBOOT_SMALL_STACK?=1

CFLAGS_EXTRA+=-DDCP_USE_DCACHE=0

0 comments on commit 672e90b

Please sign in to comment.