bootload compile fixes for B&W radios, compiles, but does not linkm due to libc errors
This commit is contained in:
committed by
Raphael Coeffic
parent
89ff8c53f4
commit
0eb11ae4b6
@@ -20,7 +20,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <limits.h>
|
#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/fonts.h"
|
||||||
#include "gui/common/stdlcd/utf8.h"
|
#include "gui/common/stdlcd/utf8.h"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include "opentx.h"
|
#include <memory.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include "lcd.h"
|
||||||
#include "common/stdlcd/fonts.h"
|
#include "common/stdlcd/fonts.h"
|
||||||
#include "common/stdlcd/utf8.h"
|
#include "common/stdlcd/utf8.h"
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "board.h"
|
||||||
|
|
||||||
#if !defined(BOOT)
|
#if !defined(BOOT)
|
||||||
Fifo<uint8_t, BT_TX_FIFO_SIZE> btTxFifo;
|
Fifo<uint8_t, BT_TX_FIFO_SIZE> btTxFifo;
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ else()
|
|||||||
set(BOOTLOADER_SRC
|
set(BOOTLOADER_SRC
|
||||||
${BOOTLOADER_SRC}
|
${BOOTLOADER_SRC}
|
||||||
../../../../../gui/common/stdlcd/fonts.cpp
|
../../../../../gui/common/stdlcd/fonts.cpp
|
||||||
|
../../../../../gui/common/stdlcd/utf8.cpp
|
||||||
../../../../../targets/${TARGET_DIR}/i2c_driver.cpp
|
../../../../../targets/${TARGET_DIR}/i2c_driver.cpp
|
||||||
)
|
)
|
||||||
remove_definitions(-DDEBUG)
|
remove_definitions(-DDEBUG)
|
||||||
|
|||||||
@@ -19,7 +19,11 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <strings.h>
|
||||||
|
#include <memory.h>
|
||||||
|
|
||||||
#include "boot.h"
|
#include "boot.h"
|
||||||
|
#include "board.h"
|
||||||
#include "sdcard.h"
|
#include "sdcard.h"
|
||||||
#include "bin_files.h"
|
#include "bin_files.h"
|
||||||
#include "fw_version.h"
|
#include "fw_version.h"
|
||||||
|
|||||||
@@ -23,7 +23,10 @@
|
|||||||
#define _bin_files_h_
|
#define _bin_files_h_
|
||||||
|
|
||||||
#include <FatFs/ff.h>
|
#include <FatFs/ff.h>
|
||||||
|
#include "sdcard.h"
|
||||||
|
#if defined(COLORLCD)
|
||||||
#include "bitmapbuffer.h"
|
#include "bitmapbuffer.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
enum MemoryType {
|
enum MemoryType {
|
||||||
MEM_FLASH,
|
MEM_FLASH,
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
#include "bin_files.h"
|
#include "bin_files.h"
|
||||||
#include "dataconstants.h"
|
#include "dataconstants.h"
|
||||||
#include "lcd.h"
|
#include "lcd.h"
|
||||||
|
#include "keys.h"
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
#if defined(PCBXLITE)
|
#if defined(PCBXLITE)
|
||||||
#define BOOTLOADER_KEYS 0x0F
|
#define BOOTLOADER_KEYS 0x0F
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
|
#include "hal.h"
|
||||||
|
#include "board_common.h"
|
||||||
|
|
||||||
static uint8_t rotencPosition;
|
static uint8_t rotencPosition;
|
||||||
volatile rotenc_t rotencValue;
|
volatile rotenc_t rotencValue;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "board.h"
|
||||||
|
|
||||||
#if !defined(BACKLIGHT_GPIO)
|
#if !defined(BACKLIGHT_GPIO)
|
||||||
// no backlight
|
// no backlight
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "board.h"
|
||||||
|
|
||||||
|
|
||||||
bool setBindProtocolSelection()
|
bool setBindProtocolSelection()
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
* GNU General Public License for more details.
|
* 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 "hal/adc_driver.h"
|
||||||
#include "stm32_hal_adc.h"
|
#include "stm32_hal_adc.h"
|
||||||
@@ -51,7 +53,7 @@ void watchdogInit(unsigned int duration)
|
|||||||
IWDG->KR = 0xCCCC; // start
|
IWDG->KR = 0xCCCC; // start
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SPORT_UPDATE_PWR_GPIO)
|
#if defined(SPORT_UPDATE_PWR_GPIO) && !defined(BOOT)
|
||||||
void sportUpdateInit()
|
void sportUpdateInit()
|
||||||
{
|
{
|
||||||
GPIO_InitTypeDef GPIO_InitStructure;
|
GPIO_InitTypeDef GPIO_InitStructure;
|
||||||
@@ -349,6 +351,7 @@ void boardOff()
|
|||||||
#define VOLTAGE_DROP 20
|
#define VOLTAGE_DROP 20
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(BOOT)
|
||||||
uint16_t getBatteryVoltage()
|
uint16_t getBatteryVoltage()
|
||||||
{
|
{
|
||||||
int32_t instant_vbat = anaIn(TX_VOLTAGE); // using filtered ADC value on purpose
|
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!
|
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;
|
return (uint16_t)instant_vbat;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#if defined(AUDIO_SPEAKER_ENABLE_GPIO)
|
#if defined(AUDIO_SPEAKER_ENABLE_GPIO)
|
||||||
void initSpeakerEnable()
|
void initSpeakerEnable()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,13 +23,13 @@
|
|||||||
#define _BOARD_H_
|
#define _BOARD_H_
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
#include "hal.h"
|
||||||
|
#include "hal/serial_port.h"
|
||||||
|
#include "watchdog_driver.h"
|
||||||
|
|
||||||
#include "definitions.h"
|
#include "definitions.h"
|
||||||
#include "opentx_constants.h"
|
#include "opentx_constants.h"
|
||||||
#include "board_common.h"
|
#include "board_common.h"
|
||||||
#include "hal.h"
|
|
||||||
#include "hal/serial_port.h"
|
|
||||||
|
|
||||||
#include "watchdog_driver.h"
|
|
||||||
|
|
||||||
#if defined(RADIO_TX12) || defined(RADIO_ZORRO)
|
#if defined(RADIO_TX12) || defined(RADIO_ZORRO)
|
||||||
#define NAVIGATION_X7_TX12
|
#define NAVIGATION_X7_TX12
|
||||||
|
|||||||
@@ -19,7 +19,12 @@
|
|||||||
* GNU General Public License for more details.
|
* 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/boot.h"
|
||||||
#include "../../common/arm/stm32/bootloader/bin_files.h"
|
#include "../../common/arm/stm32/bootloader/bin_files.h"
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "board.h"
|
||||||
|
#include "debug.h"
|
||||||
#include "FatFs/diskio.h"
|
#include "FatFs/diskio.h"
|
||||||
#include "FatFs/ff.h"
|
#include "FatFs/ff.h"
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "board.h"
|
||||||
|
|
||||||
#if defined(HAPTIC_PWM)
|
#if defined(HAPTIC_PWM)
|
||||||
// TODO test Haptic on X7 (I added PWM support)
|
// TODO test Haptic on X7 (I added PWM support)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "board.h"
|
||||||
|
|
||||||
uint32_t readKeys()
|
uint32_t readKeys()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "board.h"
|
||||||
|
#include "lcd.h"
|
||||||
|
|
||||||
#define CONTRAST_OFS 5
|
#define CONTRAST_OFS 5
|
||||||
#define RESET_WAIT_DELAY_MS 1300 // Wait time after LCD reset before first command
|
#define RESET_WAIT_DELAY_MS 1300 // Wait time after LCD reset before first command
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
* GNU General Public License for more details.
|
* 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)
|
#if defined(RADIO_FAMILY_JUMPER_T12) || defined(RADIO_TX12) || defined(RADIO_ZORRO) || defined(RADIO_T8) || defined(RADIO_TPRO)
|
||||||
#define LCD_CONTRAST_OFFSET -10
|
#define LCD_CONTRAST_OFFSET -10
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "board.h"
|
||||||
|
|
||||||
void ledInit()
|
void ledInit()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,8 +19,7 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "board.h"
|
||||||
#include "aux_serial_driver.h"
|
|
||||||
|
|
||||||
Fifo<uint8_t, TELEMETRY_FIFO_SIZE> telemetryFifo;
|
Fifo<uint8_t, TELEMETRY_FIFO_SIZE> telemetryFifo;
|
||||||
uint32_t telemetryErrors = 0;
|
uint32_t telemetryErrors = 0;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
* GNU General Public License for more details.
|
* 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_HIGH() TOPLCD_GPIO->BSRRL = TOPLCD_GPIO_PIN_CS1
|
||||||
#define CS1_LOW() TOPLCD_GPIO->BSRRH = 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.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "board.h"
|
||||||
|
|
||||||
void usbChargerInit()
|
void usbChargerInit()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user