Directories moved
This commit is contained in:
@@ -0,0 +1,131 @@
|
||||
option(TIMERS "Timers count" 2)
|
||||
option(CLI "Command Line Interface" OFF)
|
||||
option(DEBUG "Debug mode" OFF)
|
||||
option(LOG_TELEMETRY "Telemetry Logs on SD card" OFF)
|
||||
option(TRACE_SD_CARD "Traces SD enabled" OFF)
|
||||
option(TRACE_FATFS "Traces FatFS enabled" OFF)
|
||||
option(TRACE_AUDIO "Traces audio enabled" OFF)
|
||||
option(DEBUG_TRACE_BUFFER "Debug Trace Screen" OFF)
|
||||
option(MULTIMODULE "DIY Multiprotocol TX Module (https://github.com/pascallanger/DIY-Multiprotocol-TX-Module)" OFF)
|
||||
option(SUPPORT_D16_EU_ONLY "XJT module only supports D16-EU and LR12-EU" OFF) # TODO rename to XJT_EU_ONLY
|
||||
option(DEBUG_INTERRUPTS "Count interrupts" OFF)
|
||||
option(DEBUG_TASKS "Task switching statistics" OFF)
|
||||
option(DEBUG_TIMERS "Time critical parts of the code" OFF)
|
||||
|
||||
if(TIMERS EQUAL 3)
|
||||
add_definitions(-DTIMERS=3)
|
||||
else()
|
||||
add_definitions(-DTIMERS=2)
|
||||
endif()
|
||||
if(LOG_TELEMETRY)
|
||||
add_definitions(-DLOG_TELEMETRY)
|
||||
endif()
|
||||
if(TRACE_SD_CARD)
|
||||
add_definitions(-DTRACE_SD_CARD)
|
||||
set(DEBUG ON)
|
||||
set(DEBUG_TRACE_BUFFER ON)
|
||||
endif()
|
||||
if(TRACE_FATFS)
|
||||
add_definitions(-DTRACE_FATFS)
|
||||
set(DEBUG ON)
|
||||
set(DEBUG_TRACE_BUFFER ON)
|
||||
endif()
|
||||
if(TRACE_AUDIO)
|
||||
add_definitions(-DTRACE_AUDIO)
|
||||
set(DEBUG ON)
|
||||
set(DEBUG_TRACE_BUFFER ON)
|
||||
endif()
|
||||
if(DEBUG_TRACE_BUFFER)
|
||||
add_definitions(-DDEBUG_TRACE_BUFFER)
|
||||
endif()
|
||||
if(DEBUG_INTERRUPTS)
|
||||
add_definitions(-DDEBUG_INTERRUPTS)
|
||||
set(DEBUG ON)
|
||||
endif()
|
||||
if(DEBUG_TASKS)
|
||||
add_definitions(-DDEBUG_TASKS)
|
||||
set(DEBUG ON)
|
||||
endif()
|
||||
if(DEBUG_TIMERS)
|
||||
add_definitions(-DDEBUG_TIMERS)
|
||||
set(DEBUG ON)
|
||||
endif()
|
||||
if(CLI)
|
||||
add_definitions(-DCLI)
|
||||
set(FIRMWARE_SRC ${FIRMWARE_SRC} cli.cpp)
|
||||
set(SRC ${SRC} dump.cpp)
|
||||
elseif(DEBUG)
|
||||
set(SRC ${SRC} dump.cpp)
|
||||
endif()
|
||||
if(DEBUG)
|
||||
add_definitions(-DDEBUG)
|
||||
endif()
|
||||
if(SUPPORT_D16_EU_ONLY)
|
||||
add_definitions(-DMODULE_D16_EU_ONLY_SUPPORT)
|
||||
endif()
|
||||
if(HAPTIC)
|
||||
add_definitions(-DHAPTIC)
|
||||
set(SRC ${SRC} haptic.cpp)
|
||||
set(TARGET_SRC ${TARGET_SRC} haptic_driver.cpp)
|
||||
endif()
|
||||
if(MULTIMODULE)
|
||||
add_definitions(-DMULTIMODULE)
|
||||
set(SRC ${SRC} pulses/multi_arm.cpp telemetry/spektrum.cpp)
|
||||
endif()
|
||||
add_definitions(-DCPUARM)
|
||||
add_definitions(-DFRSKY -DFRSKY_SPORT -DFRSKY_HUB -DGPS -DPXX -DDSM2)
|
||||
add_definitions(-DBOLD_FONT -DBATTGRAPH -DTHRTRACE)
|
||||
include_directories(targets/${TARGET_DIR} ${THIRDPARTY_DIR})
|
||||
include_directories(${COOS_DIR} ${COOS_DIR}/kernel ${COOS_DIR}/portable)
|
||||
foreach(LANGUAGE ${TTS_LANGUAGES})
|
||||
set(SRC ${SRC} translations/tts_${LANGUAGE}.cpp)
|
||||
endforeach()
|
||||
set(SRC
|
||||
${SRC}
|
||||
main_arm.cpp
|
||||
tasks_arm.cpp
|
||||
audio_arm.cpp
|
||||
telemetry/telemetry.cpp
|
||||
telemetry/telemetry_holders.cpp
|
||||
telemetry/telemetry_sensors.cpp
|
||||
telemetry/frsky.cpp
|
||||
telemetry/frsky_d_arm.cpp
|
||||
telemetry/frsky_sport.cpp
|
||||
crc16.cpp
|
||||
vario.cpp
|
||||
)
|
||||
set(FIRMWARE_TARGET_SRC
|
||||
${FIRMWARE_TARGET_SRC}
|
||||
diskio.cpp
|
||||
)
|
||||
set(TARGET_SRC
|
||||
${TARGET_SRC}
|
||||
pulses_driver.cpp
|
||||
keys_driver.cpp
|
||||
adc_driver.cpp
|
||||
trainer_driver.cpp
|
||||
audio_driver.cpp
|
||||
serial2_driver.cpp
|
||||
telemetry_driver.cpp
|
||||
)
|
||||
set(FIRMWARE_SRC
|
||||
${FIRMWARE_SRC}
|
||||
${COOS_DIR}/kernel/core.c
|
||||
${COOS_DIR}/kernel/hook.c
|
||||
${COOS_DIR}/kernel/task.c
|
||||
${COOS_DIR}/kernel/event.c
|
||||
${COOS_DIR}/kernel/time.c
|
||||
${COOS_DIR}/kernel/timer.c
|
||||
${COOS_DIR}/kernel/flag.c
|
||||
${COOS_DIR}/kernel/mutex.c
|
||||
${COOS_DIR}/kernel/serviceReq.c
|
||||
${COOS_DIR}/portable/GCC/port.c
|
||||
${COOS_DIR}/portable/arch.c
|
||||
)
|
||||
set(PULSES_SRC
|
||||
${PULSES_SRC}
|
||||
pulses_arm.cpp
|
||||
ppm_arm.cpp
|
||||
pxx_arm.cpp
|
||||
dsm2_arm.cpp
|
||||
)
|
||||
Reference in New Issue
Block a user