From 8d86fc879b2531732360f74a27d84a4180033099 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 23 Apr 2023 01:47:56 +0200 Subject: [PATCH] fix: Building TX16s firmware with -DDEBUG=YES -DCMAKE_BUILD_TYPE=Debug fails (#3510) * fixes #3509 Changes: - change to order of include files - remove unnecessary include * revert deletion of include, some radios seem to use it. * exclude code for CONFIGURABLE_MODULE_PORT for target bootloader --- radio/src/serial.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/radio/src/serial.cpp b/radio/src/serial.cpp index 2899ba9fb..303deb603 100644 --- a/radio/src/serial.cpp +++ b/radio/src/serial.cpp @@ -29,7 +29,7 @@ #include "hal/serial_port.h" -#if defined(CONFIGURABLE_MODULE_PORT) +#if defined(CONFIGURABLE_MODULE_PORT) and !defined(BOOT) #include "hal/module_port.h" #include "tasks/mixer_task.h" #endif @@ -256,7 +256,7 @@ static void serialSetCallBacks(int mode, void* ctx, const etx_serial_port_t* por break; #endif -#if defined(CONFIGURABLE_MODULE_PORT) +#if defined(CONFIGURABLE_MODULE_PORT) and !defined(BOOT) case UART_MODE_EXT_MODULE: if (port && !ctx) { // de-init etx_module_port_t mod_port; @@ -400,7 +400,7 @@ void serialInit(uint8_t port_nr, int mode) memset(state, 0, sizeof(SerialPortState)); } -#if defined(CONFIGURABLE_MODULE_PORT) +#if defined(CONFIGURABLE_MODULE_PORT) and !defined(BOOT) if (mode == UART_MODE_EXT_MODULE) { etx_module_port_t mod_port = { .port = ETX_MOD_PORT_UART,