Skip to content

Commit 80c679c

Browse files
committed
MAX32625: Fix CMake build
* Correct board CMake target name to match board name * Make MAX32625 depend on MAXIM CMake target to inherit its include dirs * Correct path to linker files
1 parent 29cfcd6 commit 80c679c

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

targets/TARGET_Maxim/TARGET_MAX32625/CMakeLists.txt

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

44
add_subdirectory(TARGET_MAX32625MBED EXCLUDE_FROM_ALL)
@@ -70,3 +70,5 @@ target_sources(mbed-max32625
7070

7171
${STARTUP_FILE}
7272
)
73+
74+
target_link_libraries(mbed-max32625 INTERFACE mbed-maxim)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_library(mbed-sdt32625bp INTERFACE)
4+
add_library(mbed-sdt32625b INTERFACE)
55

6-
target_include_directories(mbed-sdt32625bp
6+
target_include_directories(mbed-sdt32625b
77
INTERFACE
88
.
99
)
1010

11-
target_link_libraries(mbed-sdt32625bp INTERFACE mbed-max32625 mbed-max32625-no-boot)
11+
target_link_libraries(mbed-sdt32625b INTERFACE mbed-max32625-no-boot)

targets/TARGET_Maxim/TARGET_MAX32625/device/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ endif()
1111

1212
mbed_set_linker_script(mbed-max32625-boot ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE_BOOT})
1313

14+
target_link_libraries(mbed-max32625-boot INTERFACE mbed-max32625)
15+
1416
add_library(mbed-max32625-no-boot INTERFACE)
1517

1618
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
17-
set(LINKER_FILE_NO_BOOT device/TOOLCHAIN_GCC_ARM/TARGET_MAX32625_NO_BOOT/max32625.ld)
19+
set(LINKER_FILE_NO_BOOT TOOLCHAIN_GCC_ARM/TARGET_MAX32625_NO_BOOT/max32625.ld)
1820
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
19-
set(LINKER_FILE_NO_BOOT device/TOOLCHAIN_ARM_STD/TARGET_MAX32625_NO_BOOT/MAX32625.sct)
21+
set(LINKER_FILE_NO_BOOT TOOLCHAIN_ARM_STD/TARGET_MAX32625_NO_BOOT/MAX32625.sct)
2022
endif()
2123

2224
mbed_set_linker_script(mbed-max32625-no-boot ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE_NO_BOOT})
25+
26+
target_link_libraries(mbed-max32625-no-boot INTERFACE mbed-max32625)

0 commit comments

Comments
 (0)