mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 01:35:21 +03:00
Travis using cmake for build tests
This commit is contained in:
parent
7faa7c79bf
commit
12af6a8a19
5 changed files with 77 additions and 60 deletions
|
@ -11,4 +11,3 @@ install:
|
|||
|
||||
script:
|
||||
- radio/util/commit-tests.sh
|
||||
- mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=TARANIS .. && cmake --build .
|
||||
|
|
|
@ -79,16 +79,6 @@ if(PCB STREQUAL HORUS)
|
|||
led_driver.cpp
|
||||
)
|
||||
set(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
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_sdio.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_fmc.c
|
||||
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_ltdc.c
|
||||
|
@ -108,6 +98,7 @@ elseif(PCB STREQUAL TARANIS)
|
|||
set(FLAVOUR taranis-x9e)
|
||||
add_definitions(-DSTM32F40_41xxx -DREVPLUS -DREV9E)
|
||||
add_definitions(-DEEPROM_VARIANT=32768)
|
||||
set(FIRMWARE_TARGET_SRC ${FIRMWARE_TARGET_SRC} top_lcd_driver.cpp bluetooth_driver.cpp)
|
||||
elseif(PCBREV STREQUAL REVPLUS)
|
||||
set(CPU_TYPE STM32F2)
|
||||
set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
|
||||
|
@ -244,6 +235,16 @@ if(CPU_TYPE STREQUAL STM32F4)
|
|||
set(STM32LIB_SRC
|
||||
${STM32LIB_SRC}
|
||||
CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f40_41xxx.s
|
||||
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)
|
||||
endif()
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "string.h"
|
||||
#include "../../fifo.h"
|
||||
#include "board_taranis.h"
|
||||
#include "../../opentx.h"
|
||||
|
||||
Fifo<64> btTxFifo;
|
||||
Fifo<64> btRxFifo;
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "board_taranis.h"
|
||||
#include "../../opentx.h"
|
||||
|
||||
#define CS1_HIGH() TOPLCD_GPIO->BSRRL = TOPLCD_GPIO_PIN_CS1
|
||||
#define CS1_LOW() TOPLCD_GPIO->BSRRH = TOPLCD_GPIO_PIN_CS1
|
||||
|
|
|
@ -4,7 +4,49 @@
|
|||
set -e
|
||||
set -x
|
||||
|
||||
cd radio/src/
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
# OpenTX on Taranis and Companion
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=TARANIS -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES ..
|
||||
make -j2
|
||||
make -j2 firmware.bin
|
||||
make -j2 simu
|
||||
make -j2 gtests
|
||||
./gtests
|
||||
|
||||
# OpenTX on Taranis X9E
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=TARANIS -DPCBREV=REV9E -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES ..
|
||||
make -j2 firmware.bin
|
||||
make -j2 simu
|
||||
make -j2 gtests
|
||||
./gtests
|
||||
|
||||
# OpenTX on Taranis Plus
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=TARANIS -DPCBREV=REVPLUS -DHELI=YES -DLUA=YES -DWARNINGS_AS_ERRORS=YES ..
|
||||
make -j2 firmware.bin
|
||||
make -j2 simu
|
||||
make -j2 gtests
|
||||
./gtests
|
||||
|
||||
# OpenTX on Horus
|
||||
rm -rf *
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=HORUS -DHELI=NO -DUSB=SERIAL -DCLI=YES -DDEBUG=YES ..
|
||||
make -j2 firmware.bin
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DPCB=HORUS -DHELI=NO -DUSB=SERIAL -DCLI=NO -DDEBUG=YES ..
|
||||
make -j2 simu
|
||||
#make gtests
|
||||
#./gtests
|
||||
|
||||
|
||||
# Old, not yet converted
|
||||
|
||||
|
||||
cd ../radio/src/
|
||||
|
||||
|
||||
# OpenTX on 9X stock
|
||||
make clean
|
||||
|
@ -13,30 +55,11 @@ make simu PCB=9X EXT=FRSKY HELI=YES
|
|||
make gtests EXT=FRSKY HELI=YES
|
||||
./gtests
|
||||
|
||||
|
||||
# OpenTX on 9X stock with MAVLINK
|
||||
make clean
|
||||
make PCB=9X EXT=MAVLINK HELI=YES
|
||||
|
||||
# OpenTX on Taranis X9E
|
||||
make clean
|
||||
make PCB=TARANIS PCBREV=REV9E HELI=YES GVARS=YES LUA=YES WARNINGS_AS_ERRORS=YES
|
||||
make simu PCB=TARANIS PCBREV=REV9E HELI=YES GVARS=YES LUA=YES
|
||||
make gtests PCB=TARANIS PCBREV=REV9E HELI=YES GVARS=YES LUA=YES
|
||||
./gtests
|
||||
|
||||
# OpenTX on Taranis Plus
|
||||
make clean
|
||||
make PCB=TARANIS PCBREV=REVPLUS HELI=YES LUA=YES WARNINGS_AS_ERRORS=YES
|
||||
make simu PCB=TARANIS PCBREV=REVPLUS HELI=YES LUA=YES
|
||||
make gtests PCB=TARANIS PCBREV=REVPLUS HELI=YES LUA=YES
|
||||
./gtests
|
||||
|
||||
# OpenTX on Taranis
|
||||
make clean
|
||||
make PCB=TARANIS HELI=YES LUA=YES WARNINGS_AS_ERRORS=YES
|
||||
make simu PCB=TARANIS HELI=YES LUA=YES
|
||||
make gtests PCB=TARANIS HELI=YES LUA=YES
|
||||
./gtests
|
||||
|
||||
# OpenTX on Sky9x
|
||||
make clean
|
||||
|
@ -58,7 +81,3 @@ make PCB=MEGA2560
|
|||
make clean
|
||||
make PCB=MEGA2560 EXT=MAVLINK
|
||||
|
||||
# OpenTX on Horus
|
||||
make clean
|
||||
make PCB=HORUS HELI=NO USB=SERIAL CLI=YES DEBUG=YES
|
||||
make simu PCB=HORUS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue