Skip to content

Commit cdbd455

Browse files
hugueskamba0xc0170
authored andcommitted
CMake: Add support for WIO_3G target
1 parent d173733 commit cdbd455

File tree

9 files changed

+692
-0
lines changed

9 files changed

+692
-0
lines changed
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+
target_sources(mbed-os
5+
PRIVATE
6+
analogin_device.c
7+
analogout_device.c
8+
flash_api.c
9+
gpio_irq_device.c
10+
pwmout_device.c
11+
serial_device.c
12+
spi_api.c
13+
14+
15+
)
16+
17+
add_subdirectory(STM32Cube_FW)
18+
mbed_add_cmake_directory_if_labels("TARGET")
19+
20+
target_include_directories(mbed-os
21+
PUBLIC
22+
${CMAKE_CURRENT_SOURCE_DIR}
23+
${CMAKE_CURRENT_SOURCE_DIR}/STM32Cube_FW
24+
${CMAKE_CURRENT_SOURCE_DIR}/STM32Cube_FW/CMSIS
25+
${CMAKE_CURRENT_SOURCE_DIR}/STM32Cube_FW/STM32F4xx_HAL_Driver
26+
${CMAKE_CURRENT_SOURCE_DIR}/STM32Cube_FW/STM32F4xx_HAL_Driver/Legacy
27+
)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
target_include_directories(mbed-os
5+
PUBLIC
6+
${CMAKE_CURRENT_SOURCE_DIR}
7+
)
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+
add_subdirectory(STM32F4xx_HAL_Driver)
5+
6+
target_sources(mbed-os
7+
PRIVATE
8+
system_stm32f4xx.c
9+
)
10+
11+
target_include_directories(mbed-os
12+
PUBLIC
13+
${CMAKE_CURRENT_SOURCE_DIR}
14+
${CMAKE_CURRENT_SOURCE_DIR}/CMSIS
15+
)
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
add_subdirectory(Legacy)
5+
6+
target_sources(mbed-os
7+
PRIVATE
8+
stm32f4xx_hal.c
9+
stm32f4xx_hal_adc.c
10+
stm32f4xx_hal_adc_ex.c
11+
stm32f4xx_hal_can.c
12+
stm32f4xx_hal_cec.c
13+
stm32f4xx_hal_cortex.c
14+
stm32f4xx_hal_crc.c
15+
stm32f4xx_hal_cryp.c
16+
stm32f4xx_hal_cryp_ex.c
17+
stm32f4xx_hal_dac.c
18+
stm32f4xx_hal_dac_ex.c
19+
stm32f4xx_hal_dcmi.c
20+
stm32f4xx_hal_dcmi_ex.c
21+
stm32f4xx_hal_dfsdm.c
22+
stm32f4xx_hal_dma.c
23+
stm32f4xx_hal_dma2d.c
24+
stm32f4xx_hal_dma_ex.c
25+
stm32f4xx_hal_dsi.c
26+
stm32f4xx_hal_eth.c
27+
stm32f4xx_hal_exti.c
28+
stm32f4xx_hal_flash.c
29+
stm32f4xx_hal_flash_ex.c
30+
stm32f4xx_hal_flash_ramfunc.c
31+
stm32f4xx_hal_fmpi2c.c
32+
stm32f4xx_hal_fmpi2c_ex.c
33+
stm32f4xx_hal_fmpsmbus.c
34+
stm32f4xx_hal_gpio.c
35+
stm32f4xx_hal_hash.c
36+
stm32f4xx_hal_hash_ex.c
37+
stm32f4xx_hal_hcd.c
38+
stm32f4xx_hal_i2c.c
39+
stm32f4xx_hal_i2c_ex.c
40+
stm32f4xx_hal_i2s.c
41+
stm32f4xx_hal_i2s_ex.c
42+
stm32f4xx_hal_irda.c
43+
stm32f4xx_hal_iwdg.c
44+
stm32f4xx_hal_lptim.c
45+
stm32f4xx_hal_ltdc.c
46+
stm32f4xx_hal_ltdc_ex.c
47+
stm32f4xx_hal_mmc.c
48+
stm32f4xx_hal_nand.c
49+
stm32f4xx_hal_nor.c
50+
stm32f4xx_hal_pccard.c
51+
stm32f4xx_hal_pcd.c
52+
stm32f4xx_hal_pcd_ex.c
53+
stm32f4xx_hal_pwr.c
54+
stm32f4xx_hal_pwr_ex.c
55+
stm32f4xx_hal_qspi.c
56+
stm32f4xx_hal_rcc.c
57+
stm32f4xx_hal_rcc_ex.c
58+
stm32f4xx_hal_rng.c
59+
stm32f4xx_hal_rtc.c
60+
stm32f4xx_hal_rtc_ex.c
61+
stm32f4xx_hal_sai.c
62+
stm32f4xx_hal_sai_ex.c
63+
stm32f4xx_hal_sd.c
64+
stm32f4xx_hal_sdram.c
65+
stm32f4xx_hal_smartcard.c
66+
stm32f4xx_hal_smbus.c
67+
stm32f4xx_hal_spdifrx.c
68+
stm32f4xx_hal_spi.c
69+
stm32f4xx_hal_sram.c
70+
stm32f4xx_hal_tim.c
71+
stm32f4xx_hal_tim_ex.c
72+
stm32f4xx_hal_uart.c
73+
stm32f4xx_hal_usart.c
74+
stm32f4xx_hal_wwdg.c
75+
stm32f4xx_ll_adc.c
76+
stm32f4xx_ll_crc.c
77+
stm32f4xx_ll_dac.c
78+
stm32f4xx_ll_dma.c
79+
stm32f4xx_ll_dma2d.c
80+
stm32f4xx_ll_exti.c
81+
stm32f4xx_ll_fmc.c
82+
stm32f4xx_ll_fmpi2c.c
83+
stm32f4xx_ll_fsmc.c
84+
stm32f4xx_ll_gpio.c
85+
stm32f4xx_ll_i2c.c
86+
stm32f4xx_ll_lptim.c
87+
stm32f4xx_ll_pwr.c
88+
stm32f4xx_ll_rcc.c
89+
stm32f4xx_ll_rng.c
90+
stm32f4xx_ll_rtc.c
91+
stm32f4xx_ll_sdmmc.c
92+
stm32f4xx_ll_spi.c
93+
stm32f4xx_ll_tim.c
94+
stm32f4xx_ll_usart.c
95+
stm32f4xx_ll_usb.c
96+
stm32f4xx_ll_utils.c
97+
)
98+
99+
target_include_directories(mbed-os
100+
PUBLIC
101+
${CMAKE_CURRENT_SOURCE_DIR}
102+
)
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-os
5+
PRIVATE
6+
stm32f4xx_hal_can_legacy.c
7+
)
8+
9+
target_include_directories(mbed-os
10+
PUBLIC
11+
${CMAKE_CURRENT_SOURCE_DIR}
12+
)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
function(_mbed_get_assembly_stm32f439xi)
5+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
6+
set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f439xx.S)
7+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
8+
set(STARTUP_FILE TOOLCHAIN_ARM_STD/startup_stm32f439xx.S)
9+
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
10+
set(STARTUP_FILE TOOLCHAIN_IAR/startup_stm32f439xx.S)
11+
endif()
12+
target_sources(mbed-os PRIVATE ${STARTUP_FILE})
13+
endfunction()
14+
15+
function(_mbed_set_linker_file)
16+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
17+
set(LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/TOOLCHAIN_GCC_ARM/STM32F439ZI.ld)
18+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
19+
set(LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/TOOLCHAIN_ARM_STD/stm32f439xx.sct)
20+
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
21+
set(LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/TOOLCHAIN_IAR/stm32f439xx_flash.icf)
22+
endif()
23+
set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${LINKER_FILE})
24+
endfunction()
25+
26+
_mbed_get_assembly_stm32f439xi()
27+
_mbed_set_linker_file()
28+
29+
mbed_add_cmake_directory_if_labels("TARGET")
30+
31+
target_include_directories(mbed-os
32+
PUBLIC
33+
${CMAKE_CURRENT_SOURCE_DIR}
34+
)
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-os
5+
PRIVATE
6+
ONBOARD_QUECTEL_UG96.cpp
7+
PeripheralPins.c
8+
PinNames.h
9+
system_clock.c
10+
)
11+
12+
target_include_directories(mbed-os
13+
PUBLIC
14+
${CMAKE_CURRENT_SOURCE_DIR}
15+
)

0 commit comments

Comments
 (0)