|
1 |
| -# Copyright (c) 2020 ARM Limited. All rights reserved. |
| 1 | +# Copyright (c) 2020-2021 ARM Limited. All rights reserved. |
2 | 2 | # SPDX-License-Identifier: Apache-2.0
|
3 | 3 |
|
4 |
| -if("LPCXpresso" IN_LIST MBED_TARGET_LABELS) |
5 |
| - target_include_directories(mbed-core |
6 |
| - INTERFACE |
7 |
| - TARGET_LPCXpresso |
8 |
| - ) |
| 4 | +add_subdirectory(device/TARGET_LPC54114_M4 EXCLUDE_FROM_ALL) |
| 5 | +add_subdirectory(TARGET_LPCXpresso EXCLUDE_FROM_ALL) |
9 | 6 |
|
10 |
| - target_sources(mbed-core |
11 |
| - INTERFACE |
12 |
| - TARGET_LPCXpresso/PeripheralPins.c |
13 |
| - TARGET_LPCXpresso/clock_config.c |
14 |
| - TARGET_LPCXpresso/mbed_overrides.c |
15 |
| - ) |
16 |
| -endif() |
| 7 | +add_library(mbed-lpc54114 INTERFACE) |
17 | 8 |
|
18 |
| -if("LPC54114_M4" IN_LIST MBED_TARGET_LABELS) |
19 |
| - if(${MBED_TOOLCHAIN} STREQUAL "ARM") |
20 |
| - set(STARTUP_FILE device/TARGET_LPC54114_M4/TOOLCHAIN_ARM_STD/startup_LPC54114_cm4.S) |
21 |
| - set(LINKER_FILE device/TARGET_LPC54114_M4/TOOLCHAIN_ARM_STD/LPC54114J256_cm4.sct) |
22 |
| - set(LIB_POWER device/TARGET_LPC54114_M4/TOOLCHAIN_ARM_STD/libpower.ar) |
23 |
| - elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") |
24 |
| - set(STARTUP_FILE device/TARGET_LPC54114_M4/TOOLCHAIN_GCC_ARM/startup_LPC54114_cm4.S) |
25 |
| - set(LINKER_FILE device/TARGET_LPC54114_M4/TOOLCHAIN_GCC_ARM/LPC54114J256_cm4_flash.ld) |
26 |
| - set(LIB_POWER device/TARGET_LPC54114_M4/TOOLCHAIN_GCC_ARM/libpower.a) |
27 |
| - endif() |
28 |
| - |
29 |
| - target_link_libraries(mbed-core INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/${LIB_POWER}) |
30 |
| - |
31 |
| - target_include_directories(mbed-core |
32 |
| - INTERFACE |
33 |
| - device/TARGET_LPC54114_M4 |
34 |
| - ) |
35 |
| - |
36 |
| - target_sources(mbed-core |
37 |
| - INTERFACE |
38 |
| - device/TARGET_LPC54114_M4/system_LPC54114_cm4.c |
39 |
| - ) |
40 |
| -endif() |
41 |
| - |
42 |
| -set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) |
43 |
| - |
44 |
| -target_include_directories(mbed-core |
| 9 | +target_include_directories(mbed-lpc54114 |
45 | 10 | INTERFACE
|
46 | 11 | device
|
47 | 12 | drivers
|
48 | 13 | )
|
49 | 14 |
|
50 |
| -target_sources(mbed-core |
| 15 | +target_sources(mbed-lpc54114 |
51 | 16 | INTERFACE
|
52 | 17 | flash_api.c
|
53 | 18 |
|
@@ -81,6 +46,12 @@ target_sources(mbed-core
|
81 | 46 | drivers/fsl_usart_dma.c
|
82 | 47 | drivers/fsl_utick.c
|
83 | 48 | drivers/fsl_wwdt.c
|
| 49 | +) |
84 | 50 |
|
85 |
| - ${STARTUP_FILE} |
| 51 | +target_link_libraries(mbed-lpc54114 |
| 52 | + INTERFACE |
| 53 | + mbed-mcuxpresso-mcus |
| 54 | + mbed-lpc5114-xpresso |
| 55 | + mbed-lpc |
| 56 | + mbed-lpc54114-m4 |
86 | 57 | )
|
0 commit comments