Skip to content

Commit 519ac98

Browse files
committed
CMake: add STM32L4 targets
1 parent 93e35a0 commit 519ac98

File tree

26 files changed

+499
-1
lines changed

26 files changed

+499
-1
lines changed

targets/TARGET_STM/TARGET_STM32L4/CMakeLists.txt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,30 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
if("STM32L475xG" IN_LIST MBED_TARGET_LABELS)
4+
if("STM32L432xC" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_STM32L432xC)
6+
elseif("STM32L433xC" IN_LIST MBED_TARGET_LABELS)
7+
add_subdirectory(TARGET_STM32L433xC)
8+
elseif("STM32L443xC" IN_LIST MBED_TARGET_LABELS)
9+
add_subdirectory(TARGET_STM32L443xC)
10+
elseif("STM32L452xE" IN_LIST MBED_TARGET_LABELS)
11+
add_subdirectory(TARGET_STM32L452xE)
12+
elseif("STM32L471xG" IN_LIST MBED_TARGET_LABELS)
13+
add_subdirectory(TARGET_STM32L471xG)
14+
elseif("STM32L475xG" IN_LIST MBED_TARGET_LABELS)
515
add_subdirectory(TARGET_STM32L475xG)
16+
elseif("STM32L476xG" IN_LIST MBED_TARGET_LABELS)
17+
add_subdirectory(TARGET_STM32L476xG)
18+
elseif("STM32L486xG" IN_LIST MBED_TARGET_LABELS)
19+
add_subdirectory(TARGET_STM32L486xG)
20+
elseif("STM32L496xG" IN_LIST MBED_TARGET_LABELS)
21+
add_subdirectory(TARGET_STM32L496xG)
22+
elseif("STM32L4R5xI" IN_LIST MBED_TARGET_LABELS)
23+
add_subdirectory(TARGET_STM32L4R5xI)
24+
elseif("STM32L4R9xI" IN_LIST MBED_TARGET_LABELS)
25+
add_subdirectory(TARGET_STM32L4R9xI)
26+
elseif("STM32L4S5xI" IN_LIST MBED_TARGET_LABELS)
27+
add_subdirectory(TARGET_STM32L4S5xI)
628
endif()
729

830
add_subdirectory(STM32Cube_FW)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if("NUCLEO_L432KC" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_NUCLEO_L432KC)
6+
endif()
7+
8+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
9+
set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l432xx.S)
10+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l432xc.ld)
11+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
12+
set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l432xx.S)
13+
set(LINKER_FILE TOOLCHAIN_ARM/stm32l432xc.sct)
14+
endif()
15+
16+
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
17+
18+
target_sources(mbed-core
19+
INTERFACE
20+
${STARTUP_FILE}
21+
)
22+
23+
target_include_directories(mbed-core
24+
INTERFACE
25+
.
26+
)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
target_sources(mbed-core
5+
INTERFACE
6+
PeripheralPins.c
7+
)
8+
9+
target_include_directories(mbed-core
10+
INTERFACE
11+
.
12+
)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if("NUCLEO_L433RC_P" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_NUCLEO_L433RC_P)
6+
endif()
7+
8+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
9+
set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l433xx.S)
10+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l433xc.ld)
11+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
12+
set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l433xx.S)
13+
set(LINKER_FILE TOOLCHAIN_ARM/stm32l433xc.sct)
14+
endif()
15+
16+
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
17+
18+
target_sources(mbed-core
19+
INTERFACE
20+
${STARTUP_FILE}
21+
)
22+
23+
target_include_directories(mbed-core
24+
INTERFACE
25+
.
26+
)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if("ADV_WISE_1510" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_ADV_WISE_1510)
6+
endif()
7+
8+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
9+
set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l443xx.S)
10+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l443xc.ld)
11+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
12+
set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l443xx.S)
13+
set(LINKER_FILE TOOLCHAIN_ARM/stm32l443xc.sct)
14+
endif()
15+
16+
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
17+
18+
target_sources(mbed-core
19+
INTERFACE
20+
${STARTUP_FILE}
21+
)
22+
23+
target_include_directories(mbed-core
24+
INTERFACE
25+
.
26+
)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
target_sources(mbed-core
5+
INTERFACE
6+
PeripheralPins.c
7+
)
8+
9+
target_include_directories(mbed-core
10+
INTERFACE
11+
.
12+
)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if("NUCLEO_L452RE_P" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_NUCLEO_L452RE_P)
6+
endif()
7+
8+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
9+
set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l452xx.S)
10+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l452xe.ld)
11+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
12+
set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l452xx.S)
13+
set(LINKER_FILE TOOLCHAIN_ARM/stm32l452xe.sct)
14+
endif()
15+
16+
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
17+
18+
target_sources(mbed-core
19+
INTERFACE
20+
system_clock.c
21+
${STARTUP_FILE}
22+
)
23+
24+
target_include_directories(mbed-core
25+
INTERFACE
26+
.
27+
)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
target_sources(mbed-core
5+
INTERFACE
6+
PeripheralPins.c
7+
)
8+
9+
target_include_directories(mbed-core
10+
INTERFACE
11+
.
12+
)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if("MTS_DRAGONFLY_L471QG" IN_LIST MBED_TARGET_LABELS)
5+
add_subdirectory(TARGET_MTS_DRAGONFLY_L471QG)
6+
endif()
7+
8+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
9+
set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l471xx.S)
10+
set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l471xg.ld)
11+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
12+
set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l471xx.S)
13+
set(LINKER_FILE TOOLCHAIN_ARM/stm32l471xg.sct)
14+
endif()
15+
16+
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
17+
18+
target_sources(mbed-core
19+
INTERFACE
20+
system_clock.c
21+
${STARTUP_FILE}
22+
)
23+
24+
target_include_directories(mbed-core
25+
INTERFACE
26+
.
27+
)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
target_sources(mbed-core
5+
INTERFACE
6+
mtqn_low_power.c
7+
ONBOARD_SARA4_PPP.cpp
8+
ublox_low_level_api.c
9+
PeripheralPins.c
10+
)
11+
12+
target_include_directories(mbed-core
13+
INTERFACE
14+
.
15+
)

0 commit comments

Comments
 (0)