1 option(SHUTDOWN_CONFIRMATION "Shutdown confirmation" OFF)
2 option(LCD_DUAL_BUFFER "Dual LCD Buffer" OFF)
3 option(PXX1 "PXX1 protocol support" ON)
4 option(PXX2 "PXX2 protocol support" OFF)
5 option(INTERNAL_MODULE_PPM "Support for PPM internal module" OFF)
6 option(AUTOUPDATE "Auto update internal chips from SD" OFF)
9 option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" ON)
10 option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" OFF)
11 set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
12 set(STICKS "STANDARD" CACHE STRING "Sticks type (STANDARD/HORUS)")
14 set(CPU_TYPE_FULL STM32F407xE) # for size report
15 set(LINKER_SCRIPT targets/taranis/stm32f4_flash.ld)
16 add_definitions(-DSTM32F40_41xxx)
18 set(LUA_EXPORT lua_export_x9e)
20 add_definitions(-DPCBX9E -DPCBX9)
21 add_definitions(-DEEPROM_VARIANT=0x8000)
22 add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
23 set(FIRMWARE_TARGET_SRC
24 ${FIRMWARE_TARGET_SRC}
26 startup_stm32f40_41xxx.s
28 set(AUX_SERIAL_DRIVER ../common/arm/stm32/aux_serial_driver.cpp)
29 if(STICKS STREQUAL HORUS)
30 add_definitions(-DHORUS_STICKS)
33 set(NAVIGATION_TYPE x9d)
34 set(BITMAPS_TARGET taranis_bitmaps)
35 set(FONTS_TARGET taranis_fonts)
36 set(LCD_DRIVER lcd_driver_spi.cpp)
37 set(GVAR_SCREEN model_gvars.cpp)
39 elseif(PCB STREQUAL X9D+)
41 set(LUA_EXPORT lua_export_x9d)
42 add_definitions(-DPCBX9DP -DPCBX9)
43 add_definitions(-DEEPROM_VARIANT=0)
45 set(NAVIGATION_TYPE x9d)
46 set(BITMAPS_TARGET taranis_bitmaps)
47 set(FONTS_TARGET taranis_fonts)
48 set(LCD_DRIVER lcd_driver_spi.cpp)
49 set(GVAR_SCREEN model_gvars.cpp)
50 set(PCBREV 2014 CACHE STRING "PCB Revision")
51 add_definitions(-DPCBREV=${PCBREV})
52 if (${PCBREV} STREQUAL 2019)
53 option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" OFF)
54 option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" ON)
55 set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
57 set(CPU_TYPE_FULL STM32F407xE) # for size report
58 set(FIRMWARE_TARGET_SRC
59 ${FIRMWARE_TARGET_SRC}
60 startup_stm32f40_41xxx.s
62 set(LINKER_SCRIPT targets/taranis/stm32f4_flash.ld)
63 add_definitions(-DSTM32F40_41xxx)
64 add_definitions(-DSOFTWARE_VOLUME -DPWR_BUTTON_${PWR_BUTTON} -DHARDWARE_POWER_MANAGEMENT_UNIT)
67 set(PXX_FREQUENCY "HIGH")
70 option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" ON)
71 option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" OFF)
73 set(CPU_TYPE_FULL STM32F205xE) # for size report
74 set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
75 set(AUX_SERIAL_DRIVER ../common/arm/stm32/aux_serial_driver.cpp)
79 elseif(PCB STREQUAL X9D)
80 option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" ON)
81 option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" OFF)
83 set(CPU_TYPE_FULL STM32F205xE) # for size report
84 set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
85 option(HAPTIC "Haptic support" OFF)
86 set(LUA_EXPORT lua_export_x9d)
88 add_definitions(-DPCBX9D -DPCBX9)
89 add_definitions(-DEEPROM_VARIANT=0)
91 set(NAVIGATION_TYPE x9d)
92 set(BITMAPS_TARGET taranis_bitmaps)
93 set(FONTS_TARGET taranis_fonts)
94 set(LCD_DRIVER lcd_driver_aspi.cpp)
95 set(AUX_SERIAL_DRIVER ../common/arm/stm32/aux_serial_driver.cpp)
96 set(GVAR_SCREEN model_gvars.cpp)
98 elseif(PCB STREQUAL X7)
99 set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
100 set(CPU_TYPE STM32F2)
101 set(CPU_TYPE_FULL STM32F205xE) # for size report
102 set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
104 if(PCBREV STREQUAL T12)
105 set(LUA_EXPORT lua_export_t12)
107 set(NAVIGATION_TYPE 9x)
108 add_definitions(-DRADIO_T12)
109 add_definitions(-DEEPROM_VARIANT=0x4001)
110 option(INTERNAL_MODULE_MULTI "Support for MULTI internal module" OFF)
112 option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" ON)
113 option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" OFF)
114 set(LUA_EXPORT lua_export_x7)
116 set(NAVIGATION_TYPE x7)
117 add_definitions(-DRADIO_X7)
118 add_definitions(-DEEPROM_VARIANT=0x4000)
120 add_definitions(-DPCBX7 -DSOFTWARE_VOLUME)
121 add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
123 set(BITMAPS_TARGET 9x_bitmaps)
124 set(FONTS_TARGET 9x_fonts_1bit)
125 set(LCD_DRIVER lcd_driver_spi.cpp)
126 set(GVAR_SCREEN model_gvars.cpp)
128 elseif(PCB STREQUAL X9LITE)
129 option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" OFF)
130 option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" ON)
131 set(PXX_FREQUENCY "HIGH")
132 set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
133 set(CPU_TYPE STM32F2)
134 set(CPU_TYPE_FULL STM32F205xE) # for size report
135 set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
137 set(LUA_EXPORT lua_export_x9lite)
139 add_definitions(-DBOARD_NAME="x9lite")
140 add_definitions(-DPCBX9LITE -DPCBX9 -DSOFTWARE_VOLUME -DHARDWARE_POWER_MANAGEMENT_UNIT)
141 add_definitions(-DEEPROM_VARIANT=0x0800)
142 add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
145 set(NAVIGATION_TYPE x7)
146 set(BITMAPS_TARGET 9x_bitmaps)
147 set(FONTS_TARGET 9x_fonts_1bit)
148 set(LCD_DRIVER lcd_driver_spi.cpp)
149 set(GVAR_SCREEN model_gvars.cpp)
151 elseif(PCB STREQUAL X9LITES)
152 option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" OFF)
153 option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" ON)
154 set(PXX_FREQUENCY "HIGH")
155 set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
156 set(CPU_TYPE STM32F2)
157 set(CPU_TYPE_FULL STM32F205xE) # for size report
158 set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
160 set(LUA_EXPORT lua_export_x9lites)
162 add_definitions(-DBOARD_NAME="x9lites")
163 add_definitions(-DPCBX9LITES -DPCBX9LITE -DPCBX9 -DSOFTWARE_VOLUME -DHARDWARE_POWER_MANAGEMENT_UNIT)
164 add_definitions(-DEEPROM_VARIANT=0x0800)
165 add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
168 set(NAVIGATION_TYPE x7)
169 set(BITMAPS_TARGET 9x_bitmaps)
170 set(FONTS_TARGET 9x_fonts_1bit)
171 set(LCD_DRIVER lcd_driver_spi.cpp)
172 set(GVAR_SCREEN model_gvars.cpp)
174 elseif(PCB STREQUAL XLITE)
175 option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" ON)
176 option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" OFF)
177 set(PXX_FREQUENCY "HIGH" CACHE STRING "PXX frequency (LOW / HIGH)") # always use HIGH except on some prototype boards
178 set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
179 set(CPU_TYPE STM32F2)
180 set(CPU_TYPE_FULL STM32F205xE) # for size report
181 set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
183 set(LUA_EXPORT lua_export_xlite)
185 add_definitions(-DPCBXLITE -DSOFTWARE_VOLUME -DSTICKS_PWM)
186 add_definitions(-DEEPROM_VARIANT=0x2000)
187 add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
190 set(NAVIGATION_TYPE xlite)
191 set(BITMAPS_TARGET 9x_bitmaps)
192 set(FONTS_TARGET 9x_fonts_1bit)
193 set(LCD_DRIVER lcd_driver_spi.cpp)
194 set(GVAR_SCREEN model_gvars.cpp)
196 elseif(PCB STREQUAL XLITES)
197 option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" OFF)
198 option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" ON)
199 set(PXX_FREQUENCY "HIGH")
200 set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
201 set(CPU_TYPE STM32F2)
202 set(CPU_TYPE_FULL STM32F205xE) # for size report
203 set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
205 set(LUA_EXPORT lua_export_xlites)
207 add_definitions(-DPCBXLITES -DPCBXLITE -DSOFTWARE_VOLUME -DSTICKS_PWM -DHARDWARE_POWER_MANAGEMENT_UNIT)
208 add_definitions(-DEEPROM_VARIANT=0x1000)
209 add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
211 set(NAVIGATION_TYPE xlite)
212 set(BITMAPS_TARGET 9x_bitmaps)
213 set(FONTS_TARGET 9x_fonts_1bit)
214 set(LCD_DRIVER lcd_driver_spi.cpp)
215 set(GVAR_SCREEN model_gvars.cpp)
220 if(PCB STREQUAL XLITES)
221 add_definitions(-DGYRO)
224 ../common/arm/stm32/lsm6ds_driver.cpp
232 if(PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR PCB STREQUAL X9LITE OR PCB STREQUAL X9LITES OR (PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019))
233 add_definitions(-DINTERNAL_MODULE_SERIAL)
234 if(PXX_FREQUENCY STREQUAL HIGH)
235 add_definitions(-DPXX_FREQUENCY_HIGH)
239 ../common/arm/stm32/intmodule_serial_driver.cpp
241 elseif(NOT (PCB STREQUAL X7 AND PCBREV STREQUAL T12))
244 intmodule_pulses_driver.cpp
248 if(PCB STREQUAL X9E OR (PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019) OR (PCB STREQUAL X7 AND NOT (PCBREV STREQUAL T12)) OR PCB STREQUAL X9LITE OR PCB STREQUAL X9LITES)
251 ../common/arm/stm32/rotary_encoder_driver.cpp
255 if(PCB STREQUAL X9E OR (PCB STREQUAL X7 AND NOT PCBREV STREQUAL T12) OR PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR (PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019) OR PCB STREQUAL X9LITES)
256 add_definitions(-DBLUETOOTH)
259 ../common/arm/stm32/bluetooth_driver.cpp
268 add_definitions(-DAUTOUPDATE)
271 set(HSE_VALUE 12000000)
273 set(EEPROM EEPROM_RLC)
274 set(TARGET_DIR taranis)
275 set(PPM_LIMITS_SYMETRICAL YES)
277 if(SPLASH STREQUAL OFF)
278 message(FATAL_ERROR "Option SPLASH=OFF not supported on Taranis")
281 add_definitions(-DPCBTARANIS)
282 add_definitions(-DAUDIO -DVOICE -DRTCLOCK)
286 io/frsky_firmware_update.cpp
287 io/multi_firmware_update.cpp
304 set(LED_DRIVER led_driver.cpp)
318 ../common/arm/stm32/timers_driver.cpp
319 ../common/arm/stm32/audio_dac_driver.cpp
320 ../common/arm/stm32/adc_driver.cpp
321 ../common/arm/stm32/heartbeat_driver.cpp
324 if(PCB STREQUAL XLITE OR PCB STREQUAL XLITES)
327 ../common/arm/stm32/sticks_pwm_driver.cpp
331 set(FIRMWARE_TARGET_SRC
332 ${FIRMWARE_TARGET_SRC}
337 ../common/arm/loadboot.cpp
341 add_definitions(-DLCD_DUAL_BUFFER)
344 if(INTERNAL_MODULE_PXX1)
345 add_definitions(-DHARDWARE_INTERNAL_MODULE)
346 add_definitions(-DINTERNAL_MODULE_PXX1)
349 if(INTERNAL_MODULE_PXX2)
351 add_definitions(-DHARDWARE_INTERNAL_MODULE)
352 add_definitions(-DINTERNAL_MODULE_PXX2)
355 if(INTERNAL_MODULE_MULTI)
356 add_definitions(-DHARDWARE_INTERNAL_MODULE)
357 add_definitions(-DINTERNAL_MODULE_MULTI)
360 ../common/arm/stm32/intmodule_serial_driver.cpp
364 if(INTERNAL_MODULE_PPM)
365 add_definitions(-DHARDWARE_INTERNAL_MODULE)
366 add_definitions(-DINTERNAL_MODULE_PPM)
369 set(RADIO_DEPENDENCIES ${RADIO_DEPENDENCIES} ${BITMAPS_TARGET})