first commit
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
project(stm32base)
|
||||
add_library(stm32base INTERFACE)
|
||||
|
||||
# Enable CMake support for ASM and C languages
|
||||
enable_language(C ASM)
|
||||
|
||||
target_compile_definitions(stm32base INTERFACE
|
||||
STM32F10X_HD
|
||||
$<$<CONFIG:Debug>:DEBUG>
|
||||
)
|
||||
|
||||
target_include_directories(stm32base INTERFACE
|
||||
../../Libraries/CMSIS/CM3/CoreSupport
|
||||
../../Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/inc
|
||||
../../USER/inc
|
||||
)
|
||||
|
||||
target_sources(stm32base INTERFACE
|
||||
../../USER/src/sys.c
|
||||
../../USER/src/main.c
|
||||
../../USER/src/stm32f10x_it.c
|
||||
../../USER/src/system_stm32f10x.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/misc.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_adc.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_bkp.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_can.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dbgmcu.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dma.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_exti.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_fsmc.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_gpio.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_i2c.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_iwdg.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_pwr.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_rtc.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_sdio.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_spi.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_tim.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_usart.c
|
||||
../../Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.c
|
||||
|
||||
../../Libraries/CMSIS/CM3/CoreSupport/core_cm3.c
|
||||
|
||||
../../Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/startup/gcc_ride7/startup_stm32f10x_md.s
|
||||
)
|
||||
|
||||
target_link_directories(stm32base INTERFACE
|
||||
)
|
||||
|
||||
target_link_libraries(stm32base INTERFACE
|
||||
)
|
||||
|
||||
# Validate that stm32base code is compatible with C standard
|
||||
if(CMAKE_C_STANDARD LESS 11)
|
||||
message(ERROR "Generated code requires C11 or higher")
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user