Skip to content

Commit 109dbd0

Browse files
committed
Update MCUXpresso SDK to new refactor
Updates targets using the deprecated https://github.com/nxp-mcuxpresso/legacy-mcux-sdk to use https://github.com/nxp-mcuxpresso/mcuxsdk-manifests instead.
1 parent 810be2d commit 109dbd0

8 files changed

Lines changed: 119 additions & 43 deletions

File tree

.github/workflows/test-configs.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,22 +199,25 @@ jobs:
199199
make-args: CROSS_COMPILE=aarch64-linux-gnu-
200200

201201
nxp_mcxa_test:
202-
uses: ./.github/workflows/test-build-mcux-sdk.yml
202+
uses: ./.github/workflows/test-build-mcux-sdk-manifests.yml
203203
with:
204204
arch: arm
205205
config-file: ./config/examples/mcxa.config
206+
board-name: frdmmcxa153
206207

207208
nxp_mcxw_test:
208-
uses: ./.github/workflows/test-build-mcux-sdk.yml
209+
uses: ./.github/workflows/test-build-mcux-sdk-manifests.yml
209210
with:
210211
arch: arm
211212
config-file: ./config/examples/mcxw.config
213+
board-name: frdmmcxw71
212214

213215
nxp_mcxw_tz_test:
214-
uses: ./.github/workflows/test-build-mcux-sdk.yml
216+
uses: ./.github/workflows/test-build-mcux-sdk-manifests.yml
215217
with:
216218
arch: arm
217219
config-file: ./config/examples/mcxw-tz.config
220+
board-name: frdmmcxw71
218221

219222
nxp_mcxn_test:
220223
uses: ./.github/workflows/test-build-mcux-sdk-manifests.yml

arch.mk

Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,8 @@ ifeq ($(TARGET),mcxa)
689689
-I$(MCUXPRESSO_DRIVERS) \
690690
-I$(MCUXPRESSO_DRIVERS)/drivers \
691691
-I$(MCUXPRESSO_DRIVERS)/drivers/common \
692+
-I$(MCUXPRESSO_DRIVERS)/drivers/romapi \
693+
-I$(MCUXPRESSO_DRIVERS)/../periph \
692694
-I$(MCUXPRESSO)/drivers \
693695
-I$(MCUXPRESSO)/drivers/common \
694696
-I$(MCUXPRESSO_CMSIS)/Include \
@@ -707,7 +709,7 @@ ifeq ($(TARGET),mcxa)
707709
OBJS+=\
708710
$(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o \
709711
$(MCUXPRESSO)/drivers/mcx_spc/fsl_spc.o \
710-
$(MCUXPRESSO_DRIVERS)/project_template/clock_config.o
712+
$(MCUXPRESSO_PROJECT_TEMPLATE)/clock_config.o
711713
endif
712714

713715
ifeq ($(TARGET),mcxw)
@@ -718,7 +720,8 @@ ifeq ($(TARGET),mcxw)
718720
CFLAGS+=\
719721
-I$(MCUXPRESSO_DRIVERS) \
720722
-I$(MCUXPRESSO_DRIVERS)/drivers \
721-
-I$(MCUXPRESSO_DRIVERS)/periph2 \
723+
-I$(MCUXPRESSO_DRIVERS)/drivers/romapi \
724+
-I$(MCUXPRESSO_DRIVERS)/../periph2 \
722725
-I$(MCUXPRESSO)/drivers \
723726
-I$(MCUXPRESSO)/drivers/flash_k4 \
724727
-I$(MCUXPRESSO)/drivers/ccm32k \
@@ -739,9 +742,9 @@ ifeq ($(TARGET),mcxw)
739742
OBJS+=\
740743
$(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o \
741744
$(MCUXPRESSO)/drivers/spc/fsl_spc.o \
742-
$(MCUXPRESSO_DRIVERS)/project_template/clock_config.o \
745+
$(MCUXPRESSO_PROJECT_TEMPLATE)/clock_config.o \
743746
$(MCUXPRESSO)/drivers/ccm32k/fsl_ccm32k.o \
744-
$(MCUXPRESSO_DRIVERS)/drivers/fsl_romapi.o
747+
$(MCUXPRESSO_DRIVERS)/drivers/romapi/fsl_romapi.o
745748
endif
746749

747750
ifeq ($(TARGET),mcxn)
@@ -987,22 +990,34 @@ ifeq ($(TARGET),ti_hercules)
987990
endif
988991

989992
ifeq ($(TARGET),lpc)
990-
CFLAGS+=\
991-
-I$(MCUXPRESSO_DRIVERS) \
992-
-I$(MCUXPRESSO_DRIVERS)/drivers \
993-
-I$(MCUXPRESSO)/drivers \
994-
-I$(MCUXPRESSO)/drivers/common \
995-
-I$(MCUXPRESSO_CMSIS)/Include \
996-
-I$(MCUXPRESSO_CMSIS)/Core/Include
997-
CFLAGS+=\
998-
-DCPU_$(MCUXPRESSO_CPU) -DDEBUG_CONSOLE_ASSERT_DISABLE=1
999-
OBJS+=\
1000-
$(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o \
1001-
$(MCUXPRESSO_DRIVERS)/drivers/fsl_power.o \
1002-
$(MCUXPRESSO_DRIVERS)/drivers/fsl_reset.o
1003-
LIBS+=\
1004-
$(MCUXPRESSO_DRIVERS)/mcuxpresso/libpower_softabi.a
1005993
ifeq ($(MCUXSDK),1)
994+
# Some targets in the SDK use drivers from a different target
995+
MCUXPRESSO_DRIVERS_SHARED?=$(MCUXPRESSO_DRIVERS)
996+
ifneq (,$(filter LPC54628%,$(MCUXPRESSO_CPU)))
997+
MCUXPRESSO_DRIVERS_SHARED=$(MCUXPRESSO)/devices/LPC/LPC54000/LPC54628
998+
else ifneq (,$(filter LPC54605% LPC54606% LPC54607% LPC54608% LPC54616% LPC54618%,$(MCUXPRESSO_CPU)))
999+
MCUXPRESSO_DRIVERS_SHARED=$(MCUXPRESSO)/devices/LPC/LPC54000/LPC54608
1000+
else ifneq (,$(filter LPC54018M% LPC54S018M%,$(MCUXPRESSO_CPU)))
1001+
MCUXPRESSO_DRIVERS_SHARED=$(MCUXPRESSO)/devices/LPC/LPC54000/LPC54S018M
1002+
else ifneq (,$(filter LPC54005% LPC54016% LPC54018% LPC54S005% LPC54S016% LPC54S018%,$(MCUXPRESSO_CPU)))
1003+
MCUXPRESSO_DRIVERS_SHARED=$(MCUXPRESSO)/devices/LPC/LPC54000/LPC54S018
1004+
endif
1005+
CFLAGS+=\
1006+
-I$(MCUXPRESSO_DRIVERS) \
1007+
-I$(MCUXPRESSO_DRIVERS_SHARED)/drivers \
1008+
-I$(MCUXPRESSO_DRIVERS)/../periph \
1009+
-I$(MCUXPRESSO)/drivers \
1010+
-I$(MCUXPRESSO)/drivers/common \
1011+
-I$(MCUXPRESSO)/drivers/flashiap \
1012+
-I$(MCUXPRESSO_CMSIS)/Include \
1013+
-I$(MCUXPRESSO_CMSIS)/Core/Include
1014+
CFLAGS+=\
1015+
-DCPU_$(MCUXPRESSO_CPU) -DDEBUG_CONSOLE_ASSERT_DISABLE=1
1016+
CFLAGS+=-DDCB=CoreDebug -DDCB_DEMCR_TRCENA_Msk=CoreDebug_DEMCR_TRCENA_Msk
1017+
OBJS+=\
1018+
$(MCUXPRESSO_DRIVERS_SHARED)/drivers/fsl_clock.o \
1019+
$(MCUXPRESSO_DRIVERS_SHARED)/drivers/fsl_power.o \
1020+
$(MCUXPRESSO_DRIVERS_SHARED)/drivers/fsl_reset.o
10061021
CFLAGS+=\
10071022
-I$(MCUXPRESSO)/drivers/flashiap \
10081023
-I$(MCUXPRESSO)/drivers/flexcomm
@@ -1013,11 +1028,26 @@ ifeq ($(TARGET),lpc)
10131028
$(MCUXPRESSO)/drivers/flexcomm/usart/fsl_usart.o \
10141029
$(MCUXPRESSO)/drivers/flexcomm/fsl_flexcomm.o
10151030
else
1031+
CFLAGS+=\
1032+
-I$(MCUXPRESSO_DRIVERS) \
1033+
-I$(MCUXPRESSO_DRIVERS)/drivers \
1034+
-I$(MCUXPRESSO)/drivers \
1035+
-I$(MCUXPRESSO)/drivers/common \
1036+
-I$(MCUXPRESSO_CMSIS)/Include \
1037+
-I$(MCUXPRESSO_CMSIS)/Core/Include
1038+
CFLAGS+=\
1039+
-DCPU_$(MCUXPRESSO_CPU) -DDEBUG_CONSOLE_ASSERT_DISABLE=1
1040+
OBJS+=\
1041+
$(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o \
1042+
$(MCUXPRESSO_DRIVERS)/drivers/fsl_power.o \
1043+
$(MCUXPRESSO_DRIVERS)/drivers/fsl_reset.o
1044+
LIBS+=\
1045+
$(MCUXPRESSO_DRIVERS)/mcuxpresso/libpower_softabi.a
10161046
OBJS+=\
1017-
$(MCUXPRESSO_DRIVERS)/drivers/fsl_common.o \
1018-
$(MCUXPRESSO_DRIVERS)/drivers/fsl_flashiap.o \
1019-
$(MCUXPRESSO_DRIVERS)/drivers/fsl_usart.o \
1020-
$(MCUXPRESSO_DRIVERS)/drivers/fsl_flexcomm.o
1047+
$(MCUXPRESSO_DRIVERS)/drivers/fsl_common.o \
1048+
$(MCUXPRESSO_DRIVERS)/drivers/fsl_flashiap.o \
1049+
$(MCUXPRESSO_DRIVERS)/drivers/fsl_usart.o \
1050+
$(MCUXPRESSO_DRIVERS)/drivers/fsl_flexcomm.o
10211051
endif
10221052
endif
10231053

config/examples/lpc54606j512.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
ARCH?=ARM
22
TARGET?=lpc
33
SIGN?=ECC256
4-
MCUXSDK?=0
5-
MCUXPRESSO?=$(PWD)/../FRDM-K64F
6-
MCUXPRESSO_CMSIS?=$(MCUXPRESSO)/CMSIS
4+
MCUXSDK?=1
5+
MCUXPRESSO?=$(PWD)/../NXP/mcuxpresso-sdk/mcuxsdk
6+
MCUXPRESSO_CMSIS?=$(PWD)/../NXP/CMSIS_5/CMSIS
77
MCUXPRESSO_CPU?=LPC54606J512BD208
8-
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/LPC54606
8+
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/LPC/LPC54000/LPC54606
99
DEBUG?=0
1010
HASH?=SHA256
1111
VTOR?=1

config/examples/mcxa.config

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ TARGET?=mcxa
33
SIGN?=ECC256
44
HASH?=SHA256
55
MCUXSDK?=1
6-
MCUXPRESSO?=$(PWD)/../NXP/mcux-sdk
6+
#MCUXPRESSO?=$(PWD)/../NXP/mcux-sdk
7+
MCUXPRESSO?=$(PWD)/../NXP/mcuxpresso-sdk/mcuxsdk
78
MCUXPRESSO_CMSIS?=$(PWD)/../NXP/CMSIS_5/CMSIS
89
MCUXPRESSO_CPU?=MCXA153VLH
9-
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MCXA153
10+
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MCX/MCXA/MCXA153
11+
MCUXPRESSO_PROJECT_TEMPLATE?=$(MCUXPRESSO)/examples/_boards/frdmmcxa153/project_template
1012
DEBUG?=0
1113
VTOR?=1
1214
CORTEX_M0?=0

config/examples/mcxw-tz.config

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ TARGET?=mcxw
44
SIGN?=ECC256
55
HASH?=SHA256
66
MCUXSDK?=1
7-
MCUXPRESSO?=$(PWD)/../NXP/mcux-sdk
7+
MCUXPRESSO?=$(PWD)/../NXP/mcuxpresso-sdk/mcuxsdk
88
MCUXPRESSO_CMSIS?=$(PWD)/../NXP/CMSIS_5/CMSIS
99
MCUXPRESSO_CPU?=MCXW716CMFTA
10-
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MCXW716C
10+
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MCX/MCXW/MCXW716C
11+
MCUXPRESSO_PROJECT_TEMPLATE?=$(MCUXPRESSO)/examples/_boards/frdmmcxw71/project_template
1112
DEBUG?=0
1213
VTOR?=1
1314
CORTEX_M0?=0

config/examples/mcxw.config

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ TARGET?=mcxw
33
SIGN?=ECC256
44
HASH?=SHA256
55
MCUXSDK?=1
6-
MCUXPRESSO?=$(PWD)/../NXP/mcux-sdk
6+
MCUXPRESSO?=$(PWD)/../NXP/mcuxpresso-sdk/mcuxsdk
77
MCUXPRESSO_CMSIS?=$(PWD)/../NXP/CMSIS_5/CMSIS
88
MCUXPRESSO_CPU?=MCXW716CMFTA
9-
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MCXW716C
9+
MCUXPRESSO_DRIVERS?=$(MCUXPRESSO)/devices/MCX/MCXW/MCXW716C
10+
MCUXPRESSO_PROJECT_TEMPLATE?=$(MCUXPRESSO)/examples/_boards/frdmmcxw71/project_template
1011
DEBUG?=0
1112
VTOR?=1
1213
CORTEX_M0?=0

docs/Targets.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3220,8 +3220,27 @@ thread break: Stopped, 0x0, 0x0, cpuPowerPCBig, Connected (state, tid, pid, cpu
32203220
NXP MCXA153 is a Cortex-M33 microcontroller running at 96MHz.
32213221
The support has been tested using FRDM-MCXA153 with the onboard MCU-Link configured in JLink mode.
32223222

3223-
This requires the MCXA SDK from the NXP MCUXpresso SDK Builder. We tested using `SDK_2.14.2_MCXA153` and placed into `../NXP/MCXA153` by default (see .config or set with `MCUXPRESSO`).
3224-
MCUXpresso SDK Builder
3223+
This requires the [NXP MCUXpresso SDK](https://github.com/nxp-mcuxpresso/mcuxsdk-manifests),
3224+
placed into `../NXP/mcuxpresso-sdk` by default (see .config or set with
3225+
`MCUXPRESSO`).
3226+
3227+
To set up the MCUXpresso SDK:
3228+
3229+
```
3230+
cd ../NXP
3231+
3232+
# Install west
3233+
python -m venv west-venv
3234+
source west-venv/bin/activate
3235+
pip install west
3236+
3237+
# Set up the repository
3238+
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git mcuxpresso-sdk
3239+
cd mcuxpresso-sdk
3240+
west update_board --set board frdmmcxa153
3241+
3242+
deactivate
3243+
```
32253244

32263245
### MCX A: Configuring and compiling
32273246

@@ -3307,8 +3326,28 @@ c
33073326
NXP MCXW716 is a Cortex-M33 microcontroller running at 96MHz.
33083327
The support has been tested using FRDM-MCXW716 with the onboard MCU-Link configured in JLink mode.
33093328

3310-
This requires the MCXW SDK from the NXP MCUXpresso SDK Builder. We tested using [mcux-sdk](https://github.com/nxp-mcuxpresso/mcux-sdk) and [CMSIS_5](https://github.com/nxp-mcuxpresso/CMSIS_5)
3311-
placed under "../NXP". Adjust the MCUXPRESSO and MCUXPRESSO_CMSIS variables in your .config file according to your paths.
3329+
This requires the NXP MCUXpresso SDK. We tested using [mcuxsdk-manifests](https://github.com/nxp-mcuxpresso/mcuxsdk-manifests)
3330+
and [CMSIS_5](https://github.com/nxp-mcuxpresso/CMSIS_5) placed under "../NXP".
3331+
Adjust the MCUXPRESSO and MCUXPRESSO_CMSIS variables in your .config file
3332+
according to your paths.
3333+
3334+
To set up the MCUXpresso SDK:
3335+
3336+
```
3337+
cd ../NXP
3338+
3339+
# Install west
3340+
python -m venv west-venv
3341+
source west-venv/bin/activate
3342+
pip install west
3343+
3344+
# Set up the repository
3345+
west init -m https://github.com/nxp-mcuxpresso/mcuxsdk-manifests.git mcuxpresso-sdk
3346+
cd mcuxpresso-sdk
3347+
west update_board --set board frdmmcxw71
3348+
3349+
deactivate
3350+
```
33123351

33133352
### MCX W: Configuring and compiling
33143353

test-app/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ endif
351351

352352
ifeq ($(TARGET),mcxa)
353353
LSCRIPT_TEMPLATE=ARM-mcxa.ld
354-
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/project_template/clock_config.o
354+
APP_OBJS+=$(MCUXPRESSO_PROJECT_TEMPLATE)/clock_config.o
355355
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o
356356
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/drivers/fsl_reset.o
357357
APP_OBJS+=$(MCUXPRESSO)/drivers/gpio/fsl_gpio.o
@@ -378,9 +378,9 @@ ifeq ($(TARGET),mcxw)
378378
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/drivers/fsl_clock.o
379379
APP_OBJS+=$(MCUXPRESSO)/drivers/gpio/fsl_gpio.o
380380
APP_OBJS+=$(MCUXPRESSO)/drivers/spc/fsl_spc.o
381-
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/project_template/clock_config.o
381+
APP_OBJS+=$(MCUXPRESSO_PROJECT_TEMPLATE)/clock_config.o
382382
APP_OBJS+=$(MCUXPRESSO)/drivers/ccm32k/fsl_ccm32k.o
383-
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/drivers/fsl_romapi.o
383+
APP_OBJS+=$(MCUXPRESSO_DRIVERS)/drivers/romapi/fsl_romapi.o
384384
LDFLAGS+=--specs=nosys.specs
385385
endif
386386

0 commit comments

Comments
 (0)