Skip to content

Commit 4838d71

Browse files
simbit18xiaoxiang781216
authored andcommitted
boards/arm/imxrt: CMake added imxrt1060-evk imxrt1064-evk imxrt1170-evk boards
Added CMake compilation for boards: imxrt1060-evk imxrt1064-evk imxrt1170-evk Signed-off-by: simbit18 <simbit18@gmail.com>
1 parent a3e5ae9 commit 4838d71

File tree

6 files changed

+400
-0
lines changed

6 files changed

+400
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# ##############################################################################
2+
# boards/arm/imxrt/imxrt1060-evk/CMakeLists.txt
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
7+
# license agreements. See the NOTICE file distributed with this work for
8+
# additional information regarding copyright ownership. The ASF licenses this
9+
# file to you under the Apache License, Version 2.0 (the "License"); you may not
10+
# use this file except in compliance with the License. You may obtain a copy of
11+
# the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18+
# License for the specific language governing permissions and limitations under
19+
# the License.
20+
#
21+
# ##############################################################################
22+
23+
add_subdirectory(src)
24+
25+
if(NOT CONFIG_BUILD_FLAT)
26+
add_subdirectory(kernel)
27+
set_property(
28+
GLOBAL PROPERTY LD_SCRIPT_USER ${CMAKE_CURRENT_LIST_DIR}/scripts/memory.ld
29+
${CMAKE_CURRENT_LIST_DIR}/scripts/user-space.ld)
30+
endif()
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# ##############################################################################
2+
# boards/arm/imxrt/imxrt1060-evk/src/CMakeLists.txt
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
7+
# license agreements. See the NOTICE file distributed with this work for
8+
# additional information regarding copyright ownership. The ASF licenses this
9+
# file to you under the Apache License, Version 2.0 (the "License"); you may not
10+
# use this file except in compliance with the License. You may obtain a copy of
11+
# the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18+
# License for the specific language governing permissions and limitations under
19+
# the License.
20+
#
21+
# ##############################################################################
22+
23+
set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c)
24+
25+
if(CONFIG_IMXRT_SDRAMC)
26+
list(APPEND SRCS imxrt_sdram.c)
27+
endif()
28+
29+
if(CONFIG_BOARDCTL)
30+
list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c)
31+
elseif(CONFIG_BOARD_LATE_INITIALIZE)
32+
list(APPEND SRCS imxrt_bringup.c)
33+
endif()
34+
35+
if(CONFIG_ARCH_LEDS)
36+
list(APPEND SRCS imxrt_autoleds.c)
37+
else()
38+
list(APPEND SRCS imxrt_userleds.c)
39+
endif()
40+
41+
if(CONFIG_ARCH_BUTTONS)
42+
list(APPEND SRCS imxrt_buttons.c)
43+
endif()
44+
45+
if(CONFIG_IMXRT_ENET)
46+
list(APPEND SRCS imxrt_ethernet.c)
47+
endif()
48+
49+
if(CONFIG_IMXRT_LPSPI)
50+
list(APPEND SRCS imxrt_spi.c)
51+
endif()
52+
53+
if(CONFIG_MMCSD_SPI)
54+
list(APPEND SRCS imxrt_mmcsd_spi.c)
55+
endif()
56+
57+
if(CONFIG_DEV_GPIO)
58+
list(APPEND SRCS imxrt_gpio.c)
59+
endif()
60+
61+
if(CONFIG_IMXRT_ADC)
62+
list(APPEND SRCS imxrt_adc.c)
63+
endif()
64+
65+
if(CONFIG_INPUT_FT5X06)
66+
list(APPEND SRCS imxrt_ft5x06.c)
67+
endif()
68+
69+
if(CONFIG_IMXRT_LCD)
70+
list(APPEND SRCS imxrt_lcd.c)
71+
endif()
72+
73+
if(CONFIG_IMXRT_USBOTG)
74+
list(APPEND SRCS imxrt_usbhost.c)
75+
endif()
76+
77+
if(CONFIG_IMXRT_FLEXCAN)
78+
list(APPEND SRCS imxrt_flexcan.c)
79+
endif()
80+
81+
target_sources(board PRIVATE ${SRCS})
82+
83+
if(CONFIG_BOOT_RUNFROMFLASH)
84+
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")
85+
elseif(CONFIG_BOOT_RUNFROMISRAM)
86+
set_property(GLOBAL PROPERTY LD_SCRIPT
87+
"${NUTTX_BOARD_DIR}/scripts/flash-ocram.ld")
88+
endif()
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# ##############################################################################
2+
# boards/arm/imxrt/imxrt1064-evk/CMakeLists.txt
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
7+
# license agreements. See the NOTICE file distributed with this work for
8+
# additional information regarding copyright ownership. The ASF licenses this
9+
# file to you under the Apache License, Version 2.0 (the "License"); you may not
10+
# use this file except in compliance with the License. You may obtain a copy of
11+
# the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18+
# License for the specific language governing permissions and limitations under
19+
# the License.
20+
#
21+
# ##############################################################################
22+
23+
add_subdirectory(src)
24+
25+
if(NOT CONFIG_BUILD_FLAT)
26+
add_subdirectory(kernel)
27+
set_property(
28+
GLOBAL PROPERTY LD_SCRIPT_USER ${CMAKE_CURRENT_LIST_DIR}/scripts/memory.ld
29+
${CMAKE_CURRENT_LIST_DIR}/scripts/user-space.ld)
30+
endif()
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# ##############################################################################
2+
# boards/arm/imxrt/imxrt1064-evk/src/CMakeLists.txt
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
7+
# license agreements. See the NOTICE file distributed with this work for
8+
# additional information regarding copyright ownership. The ASF licenses this
9+
# file to you under the Apache License, Version 2.0 (the "License"); you may not
10+
# use this file except in compliance with the License. You may obtain a copy of
11+
# the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18+
# License for the specific language governing permissions and limitations under
19+
# the License.
20+
#
21+
# ##############################################################################
22+
23+
set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c)
24+
25+
if(CONFIG_IMXRT_SDRAMC)
26+
list(APPEND SRCS imxrt_sdram.c)
27+
endif()
28+
29+
if(CONFIG_BOARDCTL)
30+
list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c)
31+
elseif(CONFIG_BOARD_LATE_INITIALIZE)
32+
list(APPEND SRCS imxrt_bringup.c)
33+
endif()
34+
35+
if(CONFIG_ARCH_LEDS)
36+
list(APPEND SRCS imxrt_autoleds.c)
37+
else()
38+
list(APPEND SRCS imxrt_userleds.c)
39+
endif()
40+
41+
if(CONFIG_ARCH_BUTTONS)
42+
list(APPEND SRCS imxrt_buttons.c)
43+
endif()
44+
45+
if(CONFIG_IMXRT_ENET)
46+
list(APPEND SRCS imxrt_ethernet.c)
47+
endif()
48+
49+
if(CONFIG_IMXRT_LPSPI)
50+
list(APPEND SRCS imxrt_spi.c)
51+
endif()
52+
53+
if(CONFIG_MMCSD_SPI)
54+
list(APPEND SRCS imxrt_mmcsd_spi.c)
55+
endif()
56+
57+
if(CONFIG_DEV_GPIO)
58+
list(APPEND SRCS imxrt_gpio.c)
59+
endif()
60+
61+
if(CONFIG_IMXRT_ADC)
62+
list(APPEND SRCS imxrt_adc.c)
63+
endif()
64+
65+
if(CONFIG_INPUT_FT5X06)
66+
list(APPEND SRCS imxrt_ft5x06.c)
67+
endif()
68+
69+
if(CONFIG_IMXRT_LCD)
70+
list(APPEND SRCS imxrt_lcd.c)
71+
endif()
72+
73+
if(CONFIG_IMXRT_USBOTG)
74+
list(APPEND SRCS imxrt_usbhost.c)
75+
endif()
76+
77+
if(CONFIG_IMXRT_FLEXCAN)
78+
list(APPEND SRCS imxrt_flexcan.c)
79+
endif()
80+
81+
if(CONFIG_IMXRT1064_EVK_SDRAM)
82+
list(APPEND SRCS imxrt_sdram_ini_dcd.c)
83+
endif()
84+
85+
if(CONFIG_IMXRT_FLEXSPI)
86+
list(APPEND SRCS imxrt_flexspi_nor.c)
87+
endif()
88+
89+
if(CONFIG_IMXRT_PROGMEM)
90+
list(APPEND SRCS imxrt_progmem.c)
91+
endif()
92+
93+
if(CONFIG_BOARDCTL_RESET)
94+
list(APPEND SRCS imxrt_reset.c)
95+
endif()
96+
97+
if(CONFIG_BOARDCTL_BOOT_IMAGE)
98+
list(APPEND SRCS imxrt_boot_image.c)
99+
endif()
100+
101+
target_sources(board PRIVATE ${SRCS})
102+
103+
if(CONFIG_IMXRT_APP_FORMAT_MCUBOOT)
104+
if(CONFIG_MCUBOOT_BOOTLOADER)
105+
set_property(
106+
GLOBAL PROPERTY LD_SCRIPT
107+
"${NUTTX_BOARD_DIR}/scripts/flash-mcuboot-loader.ld")
108+
else()
109+
set_property(
110+
GLOBAL PROPERTY LD_SCRIPT
111+
"${NUTTX_BOARD_DIR}/scripts/flash-mcuboot-app.ld")
112+
endif()
113+
else()
114+
if(CONFIG_BOOT_RUNFROMFLASH)
115+
set_property(GLOBAL PROPERTY LD_SCRIPT
116+
"${NUTTX_BOARD_DIR}/scripts/flash.ld")
117+
elseif(CONFIG_BOOT_RUNFROMISRAM)
118+
set_property(GLOBAL PROPERTY LD_SCRIPT
119+
"${NUTTX_BOARD_DIR}/scripts/flash-ocram.ld")
120+
endif()
121+
endif()
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# ##############################################################################
2+
# boards/arm/imxrt/imxrt1170-evk/CMakeLists.txt
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
7+
# license agreements. See the NOTICE file distributed with this work for
8+
# additional information regarding copyright ownership. The ASF licenses this
9+
# file to you under the Apache License, Version 2.0 (the "License"); you may not
10+
# use this file except in compliance with the License. You may obtain a copy of
11+
# the License at
12+
#
13+
# http://www.apache.org/licenses/LICENSE-2.0
14+
#
15+
# Unless required by applicable law or agreed to in writing, software
16+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18+
# License for the specific language governing permissions and limitations under
19+
# the License.
20+
#
21+
# ##############################################################################
22+
23+
add_subdirectory(src)
24+
25+
if(NOT CONFIG_BUILD_FLAT)
26+
add_subdirectory(kernel)
27+
set_property(
28+
GLOBAL PROPERTY LD_SCRIPT_USER ${CMAKE_CURRENT_LIST_DIR}/scripts/memory.ld
29+
${CMAKE_CURRENT_LIST_DIR}/scripts/user-space.ld)
30+
endif()

0 commit comments

Comments
 (0)