Skip to content

Commit 6f4d610

Browse files
simbit18xiaoxiang781216
authored andcommitted
boards/arm/kl: CMake build for Freedom-kl25z, Freedom-kl26z and Teensy-lc boards
- CMake added board NXP Freedom-KL25Z - CMake added board NXP Freedom-KL26Z - CMake added board PJRC Teensy-LC Signed-off-by: simbit18 <[email protected]>
1 parent 0af5318 commit 6f4d610

File tree

6 files changed

+237
-0
lines changed

6 files changed

+237
-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/kl/freedom-kl25z/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: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# ##############################################################################
2+
# boards/arm/kl/freedom-kl25z/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 kl_boardinitialize.c)
24+
25+
if(CONFIG_BOARDCTL)
26+
list(APPEND SRCS kl_appinit.c)
27+
endif()
28+
29+
if(CONFIG_KL_TSI)
30+
list(APPEND SRCS kl_tsi.c)
31+
endif()
32+
33+
if(CONFIG_KL_SPI0)
34+
list(APPEND SRCS kl_spi.c)
35+
else()
36+
if(CONFIG_KL_SPI1)
37+
list(APPEND SRCS kl_spi.c)
38+
endif()
39+
endif()
40+
41+
if(CONFIG_ARCH_LEDS)
42+
list(APPEND SRCS kl_led.c)
43+
endif()
44+
45+
if(CONFIG_KL_USBOTG)
46+
list(APPEND SRCS kl_usb.c)
47+
endif()
48+
49+
if(CONFIG_PWM)
50+
list(APPEND SRCS kl_pwm.c)
51+
endif()
52+
53+
if(CONFIG_SENSORS_QENCODER)
54+
list(APPEND SRCS kl_qencoder.c)
55+
endif()
56+
57+
if(CONFIG_WATCHDOG)
58+
list(APPEND SRCS kl_watchdog.c)
59+
endif()
60+
61+
if(CONFIG_SENSORS_ADXL345)
62+
list(APPEND SRCS kl_adxl345.c)
63+
endif()
64+
65+
target_sources(board PRIVATE ${SRCS})
66+
67+
set_property(GLOBAL PROPERTY LD_SCRIPT
68+
"${NUTTX_BOARD_DIR}/scripts/freedom-kl25z.ld")
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ##############################################################################
2+
# boards/arm/kl/freedom-kl26z/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: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# ##############################################################################
2+
# boards/arm/kl/freedom-kl26z/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 kl_boardinitialize.c)
24+
25+
if(CONFIG_BOARDCTL)
26+
list(APPEND SRCS kl_appinit.c)
27+
endif()
28+
29+
if(CONFIG_KL_TSI)
30+
list(APPEND SRCS kl_tsi.c)
31+
endif()
32+
33+
if(CONFIG_KL_SPI0)
34+
list(APPEND SRCS kl_spi.c)
35+
else()
36+
if(CONFIG_KL_SPI1)
37+
list(APPEND SRCS kl_spi.c)
38+
endif()
39+
endif()
40+
41+
if(CONFIG_ARCH_LEDS)
42+
list(APPEND SRCS kl_led.c)
43+
endif()
44+
45+
if(CONFIG_PWM)
46+
list(APPEND SRCS kl_pwm.c)
47+
endif()
48+
49+
target_sources(board PRIVATE ${SRCS})
50+
51+
set_property(GLOBAL PROPERTY LD_SCRIPT
52+
"${NUTTX_BOARD_DIR}/scripts/freedom-kl26z.ld")
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ##############################################################################
2+
# boards/arm/kl/teensy-lc/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: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# ##############################################################################
2+
# boards/arm/kl/teensy-lc/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 kl_boardinitialize.c)
24+
25+
if(CONFIG_BOARDCTL)
26+
list(APPEND SRCS kl_appinit.c)
27+
endif()
28+
29+
if(CONFIG_KL_SPI0)
30+
list(APPEND SRCS kl_spi.c)
31+
else()
32+
if(CONFIG_KL_SPI1)
33+
list(APPEND SRCS kl_spi.c)
34+
endif()
35+
endif()
36+
37+
if(CONFIG_ARCH_LEDS)
38+
list(APPEND SRCS kl_led.c)
39+
endif()
40+
41+
if(CONFIG_PWM)
42+
list(APPEND SRCS kl_pwm.c)
43+
endif()
44+
45+
target_sources(board PRIVATE ${SRCS})
46+
47+
set_property(GLOBAL PROPERTY LD_SCRIPT
48+
"${NUTTX_BOARD_DIR}/scripts/teensy-lc.ld")

0 commit comments

Comments
 (0)