Skip to content

Commit 4591c99

Browse files
committed
hal_nxp: Sync 25.06 arch to hal_nxp
Signed-off-by: Zhaoxiang Jin <[email protected]>
1 parent 283a0f8 commit 4591c99

33 files changed

+1005
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright 2024 NXP
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
if (CONFIG_MCUX_PRJSEG_config.kinetis.shared)
6+
mcux_add_iar_configuration(
7+
AS "-M\"<>\" -w+ -s -j"
8+
CC "--diag_suppress=Pa082,Pa050 --endian=little -e --use_c++_inline --silent"
9+
CX "--diag_suppress=Pa082,Pa050 --endian=little -e --c++ --silent"
10+
)
11+
12+
mcux_add_mdk_configuration(
13+
CC "-std=c99 -fshort-enums -fshort-wchar -ffunction-sections -fno-common -fdata-sections -fno-builtin -mthumb -fno-rtti"
14+
CX "-std=c++11 -fshort-enums -fshort-wchar -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -fno-rtti -fno-exceptions"
15+
LD "--remove --entry=Reset_Handler --map --xref --callgraph --symbols --info=sizes,totals,unused,veneers --strict --diag_suppress=6314"
16+
)
17+
18+
mcux_add_armgcc_configuration(
19+
AS "-mthumb"
20+
CC "--specs=nano.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -std=gnu99"
21+
CX "--specs=nano.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -fno-rtti -fno-exceptions"
22+
LD "--specs=nosys.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -Wl,--gc-sections -Wl,-static -Wl,--print-memory-usage"
23+
LIB "-lm -lc -lgcc -lnosys"
24+
)
25+
26+
mcux_add_mcux_configuration(
27+
CC "-c -fno-common -ffunction-sections -fdata-sections -fno-builtin -std=gnu99"
28+
CX "-c -fno-common -ffunction-sections -fdata-sections -fno-builtin -fno-rtti -std=gnu++11 -fno-exceptions"
29+
LD "--specs=nano.specs -fno-common -ffunction-sections -fdata-sections -fno-builtin -nostdlib -Xlinker -no-warn-rwx-segments"
30+
)
31+
32+
include(${SdkRootDirPath}/arch/arm/configuration/common.cmake)
33+
endif()
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright 2024 NXP
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
mcux_add_cmakelists(${SdkRootDirPath}/arch/arm/CMSIS OPTIONAL)
6+
7+
if (CONFIG_MCUX_PRJSEG_config.arm.shared)
8+
# Create map file
9+
mcux_add_armgcc_configuration(
10+
LD "-Xlinker -Map=output.map"
11+
)
12+
13+
mcux_add_iar_configuration(
14+
LD "--map output.map"
15+
)
16+
17+
mcux_add_mdk_configuration(
18+
LD "--list output.map"
19+
)
20+
endif()
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright 2024 NXP
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
if (CONFIG_MCUX_PRJSEG_config.kinetis.shared)
6+
mcux_add_iar_configuration(
7+
AS "-M\"<>\" -w+ -s -j"
8+
CC "--diag_suppress=Pa082,Pa050 --endian=little -e --use_c++_inline --silent"
9+
CX "--diag_suppress=Pa082,Pa050 --endian=little -e --c++ --silent"
10+
)
11+
12+
mcux_add_mdk_configuration(
13+
CC "-std=c99 -fshort-enums -fshort-wchar -ffunction-sections -fno-common -fdata-sections -fno-builtin -mthumb -fno-rtti"
14+
CX "-std=c++11 -fshort-enums -fshort-wchar -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -fno-rtti -fno-exceptions"
15+
LD "--remove --entry=Reset_Handler --map --xref --callgraph --symbols --info=sizes,totals,unused,veneers --strict --diag_suppress=6314"
16+
)
17+
18+
mcux_add_armgcc_configuration(
19+
AS "-mthumb"
20+
CC "--specs=nano.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -std=gnu99"
21+
CX "--specs=nano.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -fno-rtti -fno-exceptions"
22+
LD "--specs=nosys.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -Wl,--gc-sections -Wl,-static -Wl,--print-memory-usage"
23+
LIB "-lm -lc -lgcc -lnosys"
24+
)
25+
26+
mcux_add_mcux_configuration(
27+
CC "-c -fno-common -ffunction-sections -fdata-sections -fno-builtin -std=gnu99"
28+
CX "-c -fno-common -ffunction-sections -fdata-sections -fno-builtin -fno-rtti -std=gnu++11 -fno-exceptions"
29+
LD "--specs=nano.specs -fno-common -ffunction-sections -fdata-sections -fno-builtin -nostdlib -Xlinker -no-warn-rwx-segments"
30+
)
31+
32+
include(${SdkRootDirPath}/arch/arm/configuration/common.cmake)
33+
endif()
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright 2024 NXP
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
if (CONFIG_MCUX_PRJSEG_config.kinetis.shared)
6+
mcux_add_iar_configuration(
7+
AS "-M\"<>\" -w+ -s -j"
8+
CC "--diag_suppress=Pa082,Pa050 --endian=little -e --use_c++_inline --silent"
9+
CX "--diag_suppress=Pa082,Pa050 --endian=little -e --c++ --silent"
10+
)
11+
12+
mcux_add_mdk_configuration(
13+
CC "-std=c99 -fshort-enums -fshort-wchar -ffunction-sections -fno-common -fdata-sections -fno-builtin -mthumb -fno-rtti"
14+
CX "-std=c++11 -fshort-enums -fshort-wchar -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -fno-rtti -fno-exceptions"
15+
LD "--remove --entry=Reset_Handler --map --xref --callgraph --symbols --info=sizes,totals,unused,veneers --strict --diag_suppress=6314"
16+
)
17+
18+
mcux_add_armgcc_configuration(
19+
AS "-mthumb"
20+
CC "--specs=nano.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -std=gnu99"
21+
CX "--specs=nano.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -fno-rtti -fno-exceptions"
22+
LD "--specs=nosys.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -Wl,--gc-sections -Wl,-static -Wl,--print-memory-usage"
23+
LIB "-lm -lc -lgcc -lnosys"
24+
)
25+
26+
mcux_add_mcux_configuration(
27+
CC "-c -fno-common -ffunction-sections -fdata-sections -fno-builtin -std=gnu99"
28+
CX "-c -fno-common -ffunction-sections -fdata-sections -fno-builtin -fno-rtti -std=gnu++11 -fno-exceptions"
29+
LD "--specs=nano.specs -fno-common -ffunction-sections -fdata-sections -fno-builtin -nostdlib -Xlinker -no-warn-rwx-segments"
30+
)
31+
32+
include(${SdkRootDirPath}/arch/arm/configuration/common.cmake)
33+
endif()
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright 2024 NXP
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
if (CONFIG_MCUX_PRJSEG_config.kinetis.shared)
6+
mcux_add_iar_configuration(
7+
AS "-M\"<>\" -w+ -s -j"
8+
CC "--diag_suppress=Pa082,Pa050 --endian=little -e --use_c++_inline --silent"
9+
CX "--diag_suppress=Pa082,Pa050 --endian=little -e --c++ --silent"
10+
)
11+
12+
mcux_add_mdk_configuration(
13+
CC "-std=c99 -fshort-enums -fshort-wchar -ffunction-sections -fno-common -fdata-sections -fno-builtin -mthumb -fno-rtti"
14+
CX "-std=c++11 -fshort-enums -fshort-wchar -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -fno-rtti -fno-exceptions"
15+
LD "--remove --entry=Reset_Handler --map --xref --callgraph --symbols --info=sizes,totals,unused,veneers --strict --diag_suppress=6314"
16+
)
17+
18+
mcux_add_armgcc_configuration(
19+
AS "-mthumb"
20+
CC "--specs=nano.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -std=gnu99"
21+
CX "--specs=nano.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -fno-rtti -fno-exceptions"
22+
LD "--specs=nosys.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -Wl,--gc-sections -Wl,-static -Wl,--print-memory-usage"
23+
LIB "-lm -lc -lgcc -lnosys"
24+
)
25+
26+
mcux_add_mcux_configuration(
27+
CC "-c -fno-common -ffunction-sections -fdata-sections -fno-builtin -std=gnu99"
28+
CX "-c -fno-common -ffunction-sections -fdata-sections -fno-builtin -fno-rtti -std=gnu++11 -fno-exceptions"
29+
LD "--specs=nano.specs -fno-common -ffunction-sections -fdata-sections -fno-builtin -nostdlib -Xlinker -no-warn-rwx-segments"
30+
)
31+
32+
include(${SdkRootDirPath}/arch/arm/configuration/common.cmake)
33+
endif()
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright 2024 NXP
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
if (CONFIG_MCUX_PRJSEG_config.wireless.shared)
6+
mcux_add_iar_configuration(
7+
AS "-M\"<>\" -w+ -s -j"
8+
CC "--diag_suppress=Pa082,Pa050 --endian=little -e --use_c++_inline --silent"
9+
CX "--diag_suppress=Pa082,Pa050 --endian=little -e --c++ --silent"
10+
)
11+
12+
mcux_add_mdk_configuration(
13+
CC "-std=c99 -fshort-enums -fshort-wchar -ffunction-sections -fno-common -fdata-sections -fno-builtin -mthumb -fno-rtti"
14+
CX "-std=c++11 -fshort-enums -fshort-wchar -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -fno-rtti -fno-exceptions"
15+
LD "--remove --entry=Reset_Handler --map --xref --callgraph --symbols --info=sizes,totals,unused,veneers --strict --diag_suppress=6314"
16+
)
17+
18+
mcux_add_armgcc_configuration(
19+
AS "-mthumb"
20+
CC "--specs=nano.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -std=gnu99"
21+
CX "--specs=nano.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -fno-rtti -fno-exceptions"
22+
LD "--specs=nosys.specs -Wall -fno-common -ffunction-sections -fdata-sections -fno-builtin -mthumb -mapcs -Wl,--gc-sections -Wl,-static -Wl,--print-memory-usage"
23+
LIB "-lm -lc -lgcc -lnosys"
24+
)
25+
26+
mcux_add_mcux_configuration(
27+
CC "-c -fno-common -ffunction-sections -fdata-sections -fno-builtin -std=gnu99"
28+
CX "-c -fno-common -ffunction-sections -fdata-sections -fno-builtin -fno-rtti -std=gnu++11 -fno-exceptions"
29+
LD "--specs=nano.specs -fno-common -ffunction-sections -fdata-sections -fno-builtin -nostdlib -Xlinker -no-warn-rwx-segments"
30+
)
31+
32+
include(${SdkRootDirPath}/arch/arm/configuration/common.cmake)
33+
endif()
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2024 NXP
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
if (CONFIG_MCUX_PRJSEG_config.arm.core.cm0p)
6+
7+
mcux_add_iar_configuration(
8+
AS "--cpu=cortex-M0+"
9+
CC "--cpu=cortex-M0+"
10+
CX "--cpu=cortex-M0+"
11+
LD "--cpu=cortex-M0+"
12+
)
13+
14+
mcux_add_mdk_configuration(
15+
AS "-mcpu=cortex-m0plus --target=arm-arm-none-eabi"
16+
CC "-mcpu=cortex-m0plus"
17+
CX "-mcpu=cortex-m0plus"
18+
LD "--cpu Cortex-M0plus"
19+
)
20+
21+
mcux_add_armgcc_mcux_configuration(
22+
AS "-mcpu=cortex-m0plus"
23+
CC "-mcpu=cortex-m0plus"
24+
CX "-mcpu=cortex-m0plus"
25+
LD "-mcpu=cortex-m0plus"
26+
)
27+
28+
endif()
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright 2024 NXP
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
# for Cm3 with SAU
6+
if (CONFIG_MCUX_PRJSEG_config.arm.core.cm3)
7+
8+
mcux_add_iar_configuration(
9+
AS "--cpu=cortex-m3"
10+
CC "--cpu=cortex-m3"
11+
CX "--cpu=cortex-m3"
12+
LD "--cpu=cortex-m3"
13+
)
14+
15+
mcux_add_mdk_configuration(
16+
AS "-mcpu=cortex-m3 --target=arm-arm-none-eabi"
17+
CC "-mcpu=cortex-m3"
18+
CX "-mcpu=cortex-m3"
19+
LD "--cpu=Cortex-m3"
20+
)
21+
22+
mcux_add_armgcc_mcux_configuration(
23+
AS "-mcpu=cortex-m3"
24+
CC "-mcpu=cortex-m3"
25+
CX "-mcpu=cortex-m3"
26+
LD "-mcpu=cortex-m3"
27+
)
28+
29+
endif()
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Copyright 2024 NXP
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
# for CM33 with DSP and SAU
6+
if (CONFIG_MCUX_PRJSEG_config.arm.core.cm33)
7+
8+
mcux_add_iar_configuration(
9+
AS "--cpu=cortex-m33.no_se"
10+
CC "--cpu=cortex-m33.no_se"
11+
CX "--cpu=cortex-m33.no_se"
12+
LD "--cpu=cortex-m33.no_se"
13+
)
14+
15+
mcux_add_mdk_configuration(
16+
AS "-mcpu=cortex-m33 --target=arm-arm-none-eabi"
17+
CC "-mcpu=cortex-m33"
18+
CX "-mcpu=cortex-m33"
19+
LD "--cpu=Cortex-M33"
20+
)
21+
22+
mcux_add_armgcc_mcux_configuration(
23+
AS "-mcpu=cortex-m33"
24+
CC "-mcpu=cortex-m33"
25+
CX "-mcpu=cortex-m33"
26+
LD "-mcpu=cortex-m33"
27+
)
28+
29+
endif()
30+
31+
# for CM33 without DSP and SAU
32+
if (CONFIG_MCUX_PRJSEG_config.arm.core.cm33_nodsp_nosau)
33+
34+
mcux_add_iar_configuration(
35+
AS "--cpu=cortex-m33.no_dsp.no_se"
36+
CC "--cpu=cortex-m33.no_dsp.no_se"
37+
CX "--cpu=cortex-m33.no_dsp.no_se"
38+
LD "--cpu=cortex-m33.no_dsp.no_se"
39+
)
40+
41+
mcux_add_mdk_configuration(
42+
AS "-mcpu=cortex-m33+nodsp --target=arm-arm-none-eabi"
43+
CC "-mcpu=cortex-m33+nodsp"
44+
CX "-mcpu=cortex-m33+nodsp"
45+
LD "--cpu=Cortex-M33.no_dsp"
46+
)
47+
48+
mcux_add_armgcc_mcux_configuration(
49+
AS "-mcpu=cortex-m33+nodsp"
50+
CC "-mcpu=cortex-m33+nodsp"
51+
CX "-mcpu=cortex-m33+nodsp"
52+
LD "-mcpu=cortex-m33+nodsp"
53+
)
54+
55+
endif()
56+
57+
# for CM33 with DSP but no SAU
58+
if (CONFIG_MCUX_PRJSEG_config.arm.core.cm33_dsp_nosau)
59+
60+
mcux_add_iar_configuration(
61+
AS "--cpu=cortex-m33.no_se"
62+
CC "--cpu=cortex-m33.no_se"
63+
CX "--cpu=cortex-m33.no_se"
64+
LD "--cpu=cortex-m33.no_se"
65+
)
66+
67+
mcux_add_mdk_configuration(
68+
AS "-mcpu=cortex-m33 --target=arm-arm-none-eabi"
69+
CC "-mcpu=cortex-m33"
70+
CX "-mcpu=cortex-m33"
71+
LD "--cpu=Cortex-M33"
72+
)
73+
74+
mcux_add_armgcc_mcux_configuration(
75+
AS "-mcpu=cortex-m33"
76+
CC "-mcpu=cortex-m33"
77+
CX "-mcpu=cortex-m33"
78+
LD "-mcpu=cortex-m33"
79+
)
80+
81+
endif()
82+
83+
# for CM33 with no DSP but with SAU
84+
if (CONFIG_MCUX_PRJSEG_config.arm.core.cm33_nodsp_sau)
85+
86+
mcux_add_iar_configuration(
87+
AS "--cpu=Cortex-M33.no_dsp"
88+
CC "--cpu=Cortex-M33.no_dsp"
89+
CX "--cpu=Cortex-M33.no_dsp"
90+
LD "--cpu=Cortex-M33.no_dsp"
91+
)
92+
93+
mcux_add_mdk_configuration(
94+
AS "-mcpu=cortex-m33+nodsp --target=arm-arm-none-eabi"
95+
CC "-mcpu=cortex-m33+nodsp"
96+
CX "-mcpu=cortex-m33+nodsp"
97+
LD "--cpu=Cortex-M33.no_dsp"
98+
)
99+
100+
mcux_add_armgcc_mcux_configuration(
101+
AS "-mcpu=cortex-m33+nodsp"
102+
CC "-mcpu=cortex-m33+nodsp"
103+
CX "-mcpu=cortex-m33+nodsp"
104+
LD "-mcpu=cortex-m33+nodsp"
105+
)
106+
107+
108+
endif()
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2024 NXP
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
if (CONFIG_MCUX_PRJSEG_config.arm.core.cm4)
6+
7+
mcux_add_iar_configuration(
8+
AS "--cpu=cortex-m4"
9+
CC "--cpu=cortex-m4"
10+
CX "--cpu=cortex-m4"
11+
LD "--cpu=cortex-m4"
12+
)
13+
14+
mcux_add_mdk_configuration(
15+
AS "-mcpu=cortex-m4 --target=arm-arm-none-eabi"
16+
CC "-mcpu=cortex-m4"
17+
CX "-mcpu=cortex-m4"
18+
LD "--cpu=Cortex-M4"
19+
)
20+
21+
mcux_add_armgcc_mcux_configuration(
22+
AS "-mcpu=cortex-m4"
23+
CC "-mcpu=cortex-m4"
24+
CX "-mcpu=cortex-m4"
25+
LD "-mcpu=cortex-m4"
26+
)
27+
28+
endif()

0 commit comments

Comments
 (0)