Skip to content

Commit 802de91

Browse files
simbit18lupyuen
authored andcommitted
boards/arm/stm32l5: CMake added boards
CMake added boards: - nucleo-l552ze - stm32l562e-dk Signed-off-by: simbit18 <simbit18@gmail.com>
1 parent 6b62199 commit 802de91

4 files changed

Lines changed: 128 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ##############################################################################
2+
# boards/arm/stm32l5/nucleo-l552ze/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: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# ##############################################################################
2+
# boards/arm/stm32l5/nucleo-l552ze/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 stm32_boot.c stm32_bringup.c)
24+
25+
if(CONFIG_ARCH_LEDS)
26+
list(APPEND SRCS stm32_autoleds.c)
27+
else()
28+
list(APPEND SRCS stm32_userleds.c)
29+
endif()
30+
31+
if(CONFIG_ARCH_BUTTONS)
32+
list(APPEND SRCS stm32_buttons.c)
33+
endif()
34+
35+
if(CONFIG_BOARDCTL)
36+
list(APPEND SRCS stm32_appinit.c)
37+
endif()
38+
39+
target_sources(board PRIVATE ${SRCS})
40+
41+
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ##############################################################################
2+
# boards/arm/stm32l5/stm32l562e-dk/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: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# ##############################################################################
2+
# boards/arm/stm32l5/stm32l562e-dk/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 stm32_boot.c stm32_bringup.c stm32_clockconfig.c)
24+
25+
if(CONFIG_ARCH_LEDS)
26+
list(APPEND SRCS stm32_autoleds.c)
27+
else()
28+
list(APPEND SRCS stm32_userleds.c)
29+
endif()
30+
31+
if(CONFIG_ARCH_BUTTONS)
32+
list(APPEND SRCS stm32_buttons.c)
33+
endif()
34+
35+
if(CONFIG_BOARDCTL)
36+
list(APPEND SRCS stm32_appinit.c)
37+
endif()
38+
39+
target_sources(board PRIVATE ${SRCS})
40+
41+
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/tfm-ns.ld")

0 commit comments

Comments
 (0)