bootload compile fixes for B&W radios, compiles, but does not linkm due to libc errors

This commit is contained in:
gagarinlg
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent 89ff8c53f4
commit 0eb11ae4b6
22 changed files with 51 additions and 23 deletions
+4 -1
View File
@@ -20,7 +20,10 @@
*/
#include <limits.h>
#include "opentx.h"
#include <memory.h>
#include <assert.h>
#include "lcd.h"
#include "thirdparty/libopenui/src/bitfield.h"
#include "gui/common/stdlcd/fonts.h"
#include "gui/common/stdlcd/utf8.h"
+3 -1
View File
@@ -20,7 +20,9 @@
*/
#include <limits.h>
#include "opentx.h"
#include <memory.h>
#include <assert.h>
#include "lcd.h"
#include "common/stdlcd/fonts.h"
#include "common/stdlcd/utf8.h"
@@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "board.h"
#if !defined(BOOT)
Fifo<uint8_t, BT_TX_FIFO_SIZE> btTxFifo;
@@ -156,6 +156,7 @@ else()
set(BOOTLOADER_SRC
${BOOTLOADER_SRC}
../../../../../gui/common/stdlcd/fonts.cpp
../../../../../gui/common/stdlcd/utf8.cpp
../../../../../targets/${TARGET_DIR}/i2c_driver.cpp
)
remove_definitions(-DDEBUG)
@@ -19,7 +19,11 @@
* GNU General Public License for more details.
*/
#include <strings.h>
#include <memory.h>
#include "boot.h"
#include "board.h"
#include "sdcard.h"
#include "bin_files.h"
#include "fw_version.h"
@@ -23,7 +23,10 @@
#define _bin_files_h_
#include <FatFs/ff.h>
#include "sdcard.h"
#if defined(COLORLCD)
#include "bitmapbuffer.h"
#endif
enum MemoryType {
MEM_FLASH,
@@ -24,6 +24,8 @@
#include "bin_files.h"
#include "dataconstants.h"
#include "lcd.h"
#include "keys.h"
#include "debug.h"
#if defined(PCBXLITE)
#define BOOTLOADER_KEYS 0x0F
@@ -20,6 +20,8 @@
*/
#include "board.h"
#include "hal.h"
#include "board_common.h"
static uint8_t rotencPosition;
volatile rotenc_t rotencValue;
@@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "board.h"
#if !defined(BACKLIGHT_GPIO)
// no backlight
@@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "board.h"
bool setBindProtocolSelection()
+6 -3
View File
@@ -19,7 +19,9 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "board.h"
#include "debug.h"
#include "rtc.h"
#include "hal/adc_driver.h"
#include "stm32_hal_adc.h"
@@ -51,7 +53,7 @@ void watchdogInit(unsigned int duration)
IWDG->KR = 0xCCCC; // start
}
#if defined(SPORT_UPDATE_PWR_GPIO)
#if defined(SPORT_UPDATE_PWR_GPIO) && !defined(BOOT)
void sportUpdateInit()
{
GPIO_InitTypeDef GPIO_InitStructure;
@@ -349,6 +351,7 @@ void boardOff()
#define VOLTAGE_DROP 20
#endif
#if !defined(BOOT)
uint16_t getBatteryVoltage()
{
int32_t instant_vbat = anaIn(TX_VOLTAGE); // using filtered ADC value on purpose
@@ -356,7 +359,7 @@ uint16_t getBatteryVoltage()
instant_vbat += VOLTAGE_DROP; // add voltage drop because of the diode TODO check if this is needed, but removal will break existing calibrations!
return (uint16_t)instant_vbat;
}
#endif
#if defined(AUDIO_SPEAKER_ENABLE_GPIO)
void initSpeakerEnable()
{
+4 -4
View File
@@ -23,13 +23,13 @@
#define _BOARD_H_
#include <inttypes.h>
#include "hal.h"
#include "hal/serial_port.h"
#include "watchdog_driver.h"
#include "definitions.h"
#include "opentx_constants.h"
#include "board_common.h"
#include "hal.h"
#include "hal/serial_port.h"
#include "watchdog_driver.h"
#if defined(RADIO_TX12) || defined(RADIO_ZORRO)
#define NAVIGATION_X7_TX12
@@ -19,7 +19,12 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include <string.h>
#include "board.h"
#include "lcd.h"
#include "fw_version.h"
#include "translations.h"
#include "../../common/arm/stm32/bootloader/boot.h"
#include "../../common/arm/stm32/bootloader/bin_files.h"
+2 -1
View File
@@ -19,7 +19,8 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "board.h"
#include "debug.h"
#include "FatFs/diskio.h"
#include "FatFs/ff.h"
+1 -1
View File
@@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "board.h"
#if defined(HAPTIC_PWM)
// TODO test Haptic on X7 (I added PWM support)
+1 -1
View File
@@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "board.h"
uint32_t readKeys()
{
@@ -19,7 +19,8 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "board.h"
#include "lcd.h"
#define CONTRAST_OFS 5
#define RESET_WAIT_DELAY_MS 1300 // Wait time after LCD reset before first command
+3 -1
View File
@@ -19,7 +19,9 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "board.h"
#include "debug.h"
#include "lcd.h"
#if defined(RADIO_FAMILY_JUMPER_T12) || defined(RADIO_TX12) || defined(RADIO_ZORRO) || defined(RADIO_T8) || defined(RADIO_TPRO)
#define LCD_CONTRAST_OFFSET -10
+1 -1
View File
@@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "board.h"
void ledInit()
{
@@ -19,8 +19,7 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "aux_serial_driver.h"
#include "board.h"
Fifo<uint8_t, TELEMETRY_FIFO_SIZE> telemetryFifo;
uint32_t telemetryErrors = 0;
+1 -1
View File
@@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "board.h"
#define CS1_HIGH() TOPLCD_GPIO->BSRRL = TOPLCD_GPIO_PIN_CS1
#define CS1_LOW() TOPLCD_GPIO->BSRRH = TOPLCD_GPIO_PIN_CS1
@@ -19,7 +19,7 @@
* GNU General Public License for more details.
*/
#include "opentx.h"
#include "board.h"
void usbChargerInit()
{