Skip to content

Commit 9c6d502

Browse files
simbit18lupyuen
authored andcommitted
boards/arm/imxrt: CMake added imxrt1020-evk imxrt1050-evk boards
Added CMake build for boards: imxrt1020-evk imxrt1050-evk Signed-off-by: simbit18 <simbit18@gmail.com>
1 parent 4838d71 commit 9c6d502

File tree

4 files changed

+193
-0
lines changed

4 files changed

+193
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ##############################################################################
2+
# boards/arm/imxrt/imxrt1020-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)
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# ##############################################################################
2+
# boards/arm/imxrt/imxrt1020-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_flexspi_nor_flash.c imxrt_boot.c imxrt_flexspi_nor_boot.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_DEV_GPIO)
54+
list(APPEND SRCS imxrt_gpio.c)
55+
endif()
56+
57+
if(CONFIG_IMXRT_USBOTG)
58+
list(APPEND SRCS imxrt_usbhost.c)
59+
endif()
60+
61+
target_sources(board PRIVATE ${SRCS})
62+
63+
if(NOT CONFIG_ARMV7M_DTCM)
64+
set_property(GLOBAL PROPERTY LD_SCRIPT
65+
"${NUTTX_BOARD_DIR}/scripts/flash-ocram.ld")
66+
endif()
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# ##############################################################################
2+
# boards/arm/imxrt/imxrt1050-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: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# ##############################################################################
2+
# boards/arm/imxrt/imxrt1050-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_IMXRT_LCD)
54+
list(APPEND SRCS imxrt_lcd.c)
55+
endif()
56+
57+
if(CONFIG_MMCSD_SPI)
58+
list(APPEND SRCS imxrt_mmcsd_spi.c)
59+
endif()
60+
61+
if(CONFIG_DEV_GPIO)
62+
list(APPEND SRCS imxrt_gpio.c)
63+
endif()
64+
65+
if(CONFIG_IMXRT1050_EVK_SDRAM)
66+
list(APPEND SRCS imxrt_sdram_ini_dcd.c)
67+
endif()
68+
69+
target_sources(board PRIVATE ${SRCS})
70+
71+
if(NOT CONFIG_ARMV7M_DTCM)
72+
set_property(GLOBAL PROPERTY LD_SCRIPT
73+
"${NUTTX_BOARD_DIR}/scripts/flash-ocram.ld")
74+
endif()

0 commit comments

Comments
 (0)