Skip to content

Commit 6b57fd4

Browse files
committed
STM32L1 : targets restructuration
- alignment with other STM32 families
1 parent 95ebb3d commit 6b57fd4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+342
-766
lines changed
Lines changed: 6 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
add_subdirectory(TARGET_MOTE_L152RC EXCLUDE_FROM_ALL)
5-
add_subdirectory(TARGET_NUCLEO_L152RE EXCLUDE_FROM_ALL)
6-
add_subdirectory(TARGET_XDOT_L151CC EXCLUDE_FROM_ALL)
4+
add_subdirectory(TARGET_STM32L151xC EXCLUDE_FROM_ALL)
5+
add_subdirectory(TARGET_STM32L152xC EXCLUDE_FROM_ALL)
6+
add_subdirectory(TARGET_STM32L152xE EXCLUDE_FROM_ALL)
7+
8+
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
79

810
add_library(mbed-stm32l1 INTERFACE)
911

@@ -16,73 +18,11 @@ target_sources(mbed-stm32l1
1618
pwmout_device.c
1719
serial_device.c
1820
spi_api.c
19-
20-
device/stm32l1xx_hal.c
21-
device/stm32l1xx_hal_adc.c
22-
device/stm32l1xx_hal_adc_ex.c
23-
device/stm32l1xx_hal_comp.c
24-
device/stm32l1xx_hal_cortex.c
25-
device/stm32l1xx_hal_crc.c
26-
device/stm32l1xx_hal_cryp.c
27-
device/stm32l1xx_hal_cryp_ex.c
28-
device/stm32l1xx_hal_dac.c
29-
device/stm32l1xx_hal_dac_ex.c
30-
device/stm32l1xx_hal_dma.c
31-
device/stm32l1xx_hal_flash.c
32-
device/stm32l1xx_hal_flash_ex.c
33-
device/stm32l1xx_hal_flash_ramfunc.c
34-
device/stm32l1xx_hal_gpio.c
35-
device/stm32l1xx_hal_i2c.c
36-
device/stm32l1xx_hal_i2s.c
37-
device/stm32l1xx_hal_irda.c
38-
device/stm32l1xx_hal_iwdg.c
39-
device/stm32l1xx_hal_lcd.c
40-
device/stm32l1xx_hal_nor.c
41-
device/stm32l1xx_hal_opamp.c
42-
device/stm32l1xx_hal_opamp_ex.c
43-
device/stm32l1xx_hal_pcd.c
44-
device/stm32l1xx_hal_pcd_ex.c
45-
device/stm32l1xx_hal_pwr.c
46-
device/stm32l1xx_hal_pwr_ex.c
47-
device/stm32l1xx_hal_rcc.c
48-
device/stm32l1xx_hal_rcc_ex.c
49-
device/stm32l1xx_hal_rtc.c
50-
device/stm32l1xx_hal_rtc_ex.c
51-
device/stm32l1xx_hal_sd.c
52-
device/stm32l1xx_hal_smartcard.c
53-
device/stm32l1xx_hal_spi.c
54-
device/stm32l1xx_hal_spi_ex.c
55-
device/stm32l1xx_hal_sram.c
56-
device/stm32l1xx_hal_tim.c
57-
device/stm32l1xx_hal_tim_ex.c
58-
device/stm32l1xx_hal_uart.c
59-
device/stm32l1xx_hal_usart.c
60-
device/stm32l1xx_hal_wwdg.c
61-
device/stm32l1xx_ll_adc.c
62-
device/stm32l1xx_ll_comp.c
63-
device/stm32l1xx_ll_crc.c
64-
device/stm32l1xx_ll_dac.c
65-
device/stm32l1xx_ll_dma.c
66-
device/stm32l1xx_ll_exti.c
67-
device/stm32l1xx_ll_fsmc.c
68-
device/stm32l1xx_ll_gpio.c
69-
device/stm32l1xx_ll_i2c.c
70-
device/stm32l1xx_ll_opamp.c
71-
device/stm32l1xx_ll_pwr.c
72-
device/stm32l1xx_ll_rcc.c
73-
device/stm32l1xx_ll_rtc.c
74-
device/stm32l1xx_ll_sdmmc.c
75-
device/stm32l1xx_ll_spi.c
76-
device/stm32l1xx_ll_tim.c
77-
device/stm32l1xx_ll_usart.c
78-
device/stm32l1xx_ll_utils.c
79-
device/system_stm32l1xx.c
8021
)
8122

8223
target_include_directories(mbed-stm32l1
8324
INTERFACE
8425
.
85-
device
8626
)
8727

88-
target_link_libraries(mbed-stm32l1 INTERFACE mbed-stm)
28+
target_link_libraries(mbed-stm32l1 INTERFACE mbed-stm mbed-stm32l1cube-fw)

targets/TARGET_STM/TARGET_STM32L1/TARGET_NUCLEO_L152RE/PeripheralNames.h renamed to targets/TARGET_STM/TARGET_STM32L1/PeripheralNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,12 @@ typedef enum {
4848
UART_1 = (int)USART1_BASE,
4949
UART_2 = (int)USART2_BASE,
5050
UART_3 = (int)USART3_BASE,
51+
#if defined UART4_BASE
5152
UART_4 = (int)UART4_BASE,
53+
#endif
54+
#if defined UART5_BASE
5255
UART_5 = (int)UART5_BASE
56+
#endif
5357
} UARTName;
5458

5559
#define DEVICE_SPI_COUNT 3

targets/TARGET_STM/TARGET_STM32L1/STM32Cube_FW/CMakeLists.txt

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

4-
target_sources(mbed-core
4+
add_library(mbed-stm32l1cube-fw INTERFACE)
5+
6+
target_sources(mbed-stm32l1cube-fw
57
INTERFACE
68
STM32L1xx_HAL_Driver/stm32l1xx_hal.c
79
STM32L1xx_HAL_Driver/stm32l1xx_hal_adc.c
@@ -65,7 +67,7 @@ target_sources(mbed-core
6567
system_stm32l1xx.c
6668
)
6769

68-
target_include_directories(mbed-core
70+
target_include_directories(mbed-stm32l1cube-fw
6971
INTERFACE
7072
.
7173
CMSIS

targets/TARGET_STM/TARGET_STM32L1/TARGET_MOTE_L152RC/CMakeLists.txt

Lines changed: 0 additions & 29 deletions
This file was deleted.

targets/TARGET_STM/TARGET_STM32L1/TARGET_MOTE_L152RC/PeripheralNames.h

Lines changed: 0 additions & 79 deletions
This file was deleted.

targets/TARGET_STM/TARGET_STM32L1/TARGET_MOTE_L152RC/cmsis_nvic.h

Lines changed: 0 additions & 41 deletions
This file was deleted.

targets/TARGET_STM/TARGET_STM32L1/TARGET_MOTE_L152RC/objects.h

Lines changed: 0 additions & 64 deletions
This file was deleted.

targets/TARGET_STM/TARGET_STM32L1/TARGET_NUCLEO_L152RE/CMakeLists.txt

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)