Directories moved
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
set(LUA "NO" CACHE STRING "Lua scripts (YES/NO/NO_MODEL_SCRIPTS)")
|
||||
set(USB "JOYSTICK" CACHE STRING "USB option (JOYSTICK/MASSSTORAGE/SERIAL)")
|
||||
set(ARCH ARM)
|
||||
set(STM32USB_DIR ${THIRDPARTY_DIR}/STM32_USB-Host-Device_Lib_V2.1.0/Libraries)
|
||||
add_definitions(-DCPUSTM32)
|
||||
add_definitions(-DSBUS -DCROSSFIRE)
|
||||
include_directories(${STM32USB_DIR}/STM32_USB_OTG_Driver/inc)
|
||||
include_directories(${STM32USB_DIR}/STM32_USB_Device_Library/Core/inc)
|
||||
include_directories(${STM32USB_DIR}/STM32_USB_Device_Library/Class/msc/inc)
|
||||
include_directories(${STM32USB_DIR}/STM32_USB_Device_Library/Class/hid/inc)
|
||||
include_directories(${STM32USB_DIR}/STM32_USB_Device_Library/Class/cdc/inc)
|
||||
set(STM32USB_SRC
|
||||
STM32_USB_OTG_Driver/src/usb_core.c
|
||||
STM32_USB_OTG_Driver/src/usb_dcd.c
|
||||
STM32_USB_OTG_Driver/src/usb_dcd_int.c
|
||||
STM32_USB_Device_Library/Core/src/usbd_core.c
|
||||
STM32_USB_Device_Library/Core/src/usbd_ioreq.c
|
||||
STM32_USB_Device_Library/Core/src/usbd_req.c
|
||||
)
|
||||
set(FIRMWARE_TARGET_SRC
|
||||
${FIRMWARE_TARGET_SRC}
|
||||
usb_bsp.c
|
||||
usbd_desc.c
|
||||
usbd_usr.cpp
|
||||
)
|
||||
if(USB STREQUAL SERIAL)
|
||||
add_definitions(-DUSB_SERIAL)
|
||||
set(FIRMWARE_TARGET_SRC
|
||||
${FIRMWARE_TARGET_SRC}
|
||||
usbd_cdc.cpp
|
||||
)
|
||||
set(STM32USB_SRC
|
||||
${STM32USB_SRC}
|
||||
STM32_USB_Device_Library/Class/cdc/src/usbd_cdc_core.c
|
||||
)
|
||||
elseif(USB STREQUAL MASSSTORAGE)
|
||||
add_definitions(-DUSB_MASS_STORAGE)
|
||||
set(STM32USB_SRC
|
||||
${STM32USB_SRC}
|
||||
STM32_USB_Device_Library/Class/msc/src/usbd_msc_data.c
|
||||
STM32_USB_Device_Library/Class/msc/src/usbd_msc_scsi.c
|
||||
STM32_USB_Device_Library/Class/msc/src/usbd_msc_bot.c
|
||||
STM32_USB_Device_Library/Class/msc/src/usbd_msc_core.c
|
||||
)
|
||||
set(FIRMWARE_TARGET_SRC
|
||||
${FIRMWARE_TARGET_SRC}
|
||||
usbd_storage_msd.cpp
|
||||
)
|
||||
else()
|
||||
add_definitions(-DUSB_JOYSTICK)
|
||||
set(FIRMWARE_TARGET_SRC
|
||||
${FIRMWARE_TARGET_SRC}
|
||||
usbd_hid_joystick.c
|
||||
)
|
||||
endif()
|
||||
if(GVARS)
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
menu_model_gvars.cpp
|
||||
)
|
||||
endif()
|
||||
set(FIRMWARE_SRC
|
||||
${FIRMWARE_SRC}
|
||||
serial.cpp
|
||||
syscalls.c
|
||||
)
|
||||
foreach(FILE ${STM32LIB_SRC})
|
||||
set(FIRMWARE_SRC
|
||||
${FIRMWARE_SRC}
|
||||
${STM32LIB_DIR}/${FILE}
|
||||
)
|
||||
endforeach()
|
||||
foreach(FILE ${STM32USB_SRC})
|
||||
set(FIRMWARE_SRC
|
||||
${FIRMWARE_SRC}
|
||||
${STM32USB_DIR}/${FILE}
|
||||
)
|
||||
endforeach()
|
||||
set(SRC
|
||||
${SRC}
|
||||
sbus.cpp
|
||||
telemetry/crossfire.cpp
|
||||
)
|
||||
set(PULSES_SRC
|
||||
${PULSES_SRC}
|
||||
crossfire.cpp
|
||||
)
|
||||
@@ -0,0 +1,22 @@
|
||||
set(CPU_FAMILY STM32)
|
||||
set(MCU cortex-m3)
|
||||
set(STM32LIB_DIR ${THIRDPARTY_DIR}/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries)
|
||||
include_directories(${STM32LIB_DIR}/STM32F2xx_StdPeriph_Driver/inc)
|
||||
include_directories(${STM32LIB_DIR}/CMSIS/Device/ST/STM32F2xx/Include)
|
||||
include_directories(${STM32LIB_DIR}/CMSIS/include)
|
||||
set(STM32LIB_SRC
|
||||
${STM32LIB_SRC}
|
||||
CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc_ride7/startup_stm32f2xx.s
|
||||
STM32F2xx_StdPeriph_Driver/src/misc.c
|
||||
STM32F2xx_StdPeriph_Driver/src/stm32f2xx_gpio.c
|
||||
STM32F2xx_StdPeriph_Driver/src/stm32f2xx_dbgmcu.c
|
||||
STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rcc.c
|
||||
STM32F2xx_StdPeriph_Driver/src/stm32f2xx_spi.c
|
||||
STM32F2xx_StdPeriph_Driver/src/stm32f2xx_i2c.c
|
||||
STM32F2xx_StdPeriph_Driver/src/stm32f2xx_dma.c
|
||||
STM32F2xx_StdPeriph_Driver/src/stm32f2xx_rtc.c
|
||||
STM32F2xx_StdPeriph_Driver/src/stm32f2xx_pwr.c
|
||||
STM32F2xx_StdPeriph_Driver/src/stm32f2xx_usart.c
|
||||
)
|
||||
set(FIRMWARE_TARGET_SRC ${FIRMWARE_TARGET_SRC} system_stm32f2xx.c)
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
set(CPU_FAMILY STM32)
|
||||
set(MCU cortex-m4)
|
||||
set(STM32LIB_DIR ${THIRDPARTY_DIR}/STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries)
|
||||
include_directories(${STM32LIB_DIR}/STM32F4xx_StdPeriph_Driver/inc)
|
||||
include_directories(${STM32LIB_DIR}/CMSIS/Device/ST/STM32F4xx/Include)
|
||||
include_directories(${STM32LIB_DIR}/CMSIS/include)
|
||||
add_definitions(-DSTM32F4)
|
||||
set(STM32LIB_SRC
|
||||
${STM32LIB_SRC}
|
||||
STM32F4xx_StdPeriph_Driver/src/misc.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dbgmcu.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_i2c.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rtc.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_pwr.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_usart.c
|
||||
)
|
||||
set(FIRMWARE_TARGET_SRC ${FIRMWARE_TARGET_SRC} system_stm32f4xx.c)
|
||||
|
||||
Reference in New Issue
Block a user