mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Added '-fno-common' build option, fixed resulting problems.
This commit is contained in:
parent
9d01a5681e
commit
4ec481a843
14 changed files with 21 additions and 19 deletions
1
Makefile
1
Makefile
|
@ -210,6 +210,7 @@ CFLAGS += $(ARCH_FLAGS) \
|
||||||
-Wall -Wextra -Wunsafe-loop-optimizations -Wdouble-promotion \
|
-Wall -Wextra -Wunsafe-loop-optimizations -Wdouble-promotion \
|
||||||
-ffunction-sections \
|
-ffunction-sections \
|
||||||
-fdata-sections \
|
-fdata-sections \
|
||||||
|
-fno-common \
|
||||||
-pedantic \
|
-pedantic \
|
||||||
$(DEVICE_FLAGS) \
|
$(DEVICE_FLAGS) \
|
||||||
-D_GNU_SOURCE \
|
-D_GNU_SOURCE \
|
||||||
|
|
|
@ -38,7 +38,8 @@ extern bool cmsInMenu;
|
||||||
|
|
||||||
// Device management
|
// Device management
|
||||||
bool cmsDisplayPortRegister(displayPort_t *pDisplay);
|
bool cmsDisplayPortRegister(displayPort_t *pDisplay);
|
||||||
displayPort_t *pCurrentDisplay;
|
|
||||||
|
extern displayPort_t *pCurrentDisplay;
|
||||||
|
|
||||||
// For main.c and scheduler
|
// For main.c and scheduler
|
||||||
void cmsInit(void);
|
void cmsInit(void);
|
||||||
|
|
|
@ -36,8 +36,6 @@
|
||||||
#include "drivers/nvic.h"
|
#include "drivers/nvic.h"
|
||||||
#include "drivers/rcc.h"
|
#include "drivers/rcc.h"
|
||||||
|
|
||||||
spiDevice_t spiDevice[SPIDEV_COUNT];
|
|
||||||
|
|
||||||
#ifndef SPI2_SCK_PIN
|
#ifndef SPI2_SCK_PIN
|
||||||
#define SPI2_NSS_PIN PB12
|
#define SPI2_NSS_PIN PB12
|
||||||
#define SPI2_SCK_PIN PB13
|
#define SPI2_SCK_PIN PB13
|
||||||
|
|
|
@ -33,8 +33,6 @@
|
||||||
#include "drivers/io.h"
|
#include "drivers/io.h"
|
||||||
#include "drivers/rcc.h"
|
#include "drivers/rcc.h"
|
||||||
|
|
||||||
spiDevice_t spiDevice[SPIDEV_COUNT];
|
|
||||||
|
|
||||||
void spiInitDevice(SPIDevice device)
|
void spiInitDevice(SPIDevice device)
|
||||||
{
|
{
|
||||||
spiDevice_t *spi = &(spiDevice[device]);
|
spiDevice_t *spi = &(spiDevice[device]);
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include "drivers/io.h"
|
#include "drivers/io.h"
|
||||||
#include "drivers/light_led.h"
|
#include "drivers/light_led.h"
|
||||||
#include "drivers/nvic.h"
|
#include "drivers/nvic.h"
|
||||||
|
#include "drivers/serial_usb_vcp.h"
|
||||||
#include "drivers/time.h"
|
#include "drivers/time.h"
|
||||||
#include "drivers/usb_msc.h"
|
#include "drivers/usb_msc.h"
|
||||||
|
|
||||||
|
@ -51,8 +52,6 @@
|
||||||
#include "usbd_msc.h"
|
#include "usbd_msc.h"
|
||||||
#include "msc/usbd_storage.h"
|
#include "msc/usbd_storage.h"
|
||||||
|
|
||||||
USBD_HandleTypeDef USBD_Device;
|
|
||||||
|
|
||||||
#define DEBOUNCE_TIME_MS 20
|
#define DEBOUNCE_TIME_MS 20
|
||||||
|
|
||||||
static IO_t mscButton;
|
static IO_t mscButton;
|
||||||
|
|
|
@ -41,7 +41,7 @@ enum {
|
||||||
INPUT_GIMBAL_PITCH,
|
INPUT_GIMBAL_PITCH,
|
||||||
INPUT_GIMBAL_ROLL,
|
INPUT_GIMBAL_ROLL,
|
||||||
INPUT_SOURCE_COUNT
|
INPUT_SOURCE_COUNT
|
||||||
} inputSource_e;
|
};
|
||||||
|
|
||||||
// target servo channels
|
// target servo channels
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
#include "drivers/display.h"
|
#include "drivers/display.h"
|
||||||
|
|
||||||
displayPort_t *displayPortHottInit();
|
displayPort_t *displayPortHottInit();
|
||||||
displayPort_t hottDisplayPort;
|
|
||||||
|
extern displayPort_t hottDisplayPort;
|
||||||
|
|
||||||
void hottDisplayportRegister();
|
void hottDisplayportRegister();
|
||||||
void hottCmsOpen();
|
void hottCmsOpen();
|
||||||
|
|
|
@ -21,4 +21,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
displayPort_t *displayPortSrxlInit();
|
displayPort_t *displayPortSrxlInit();
|
||||||
displayPort_t srxlDisplayPort;
|
|
||||||
|
extern displayPort_t srxlDisplayPort;
|
||||||
|
|
|
@ -77,6 +77,10 @@
|
||||||
|
|
||||||
PG_REGISTER_WITH_RESET_FN(ledStripConfig_t, ledStripConfig, PG_LED_STRIP_CONFIG, 0);
|
PG_REGISTER_WITH_RESET_FN(ledStripConfig_t, ledStripConfig, PG_LED_STRIP_CONFIG, 0);
|
||||||
|
|
||||||
|
hsvColor_t *colors;
|
||||||
|
const modeColorIndexes_t *modeColors;
|
||||||
|
specialColorIndexes_t specialColors;
|
||||||
|
|
||||||
static bool ledStripInitialised = false;
|
static bool ledStripInitialised = false;
|
||||||
static bool ledStripEnabled = true;
|
static bool ledStripEnabled = true;
|
||||||
|
|
||||||
|
|
|
@ -157,9 +157,9 @@ typedef struct ledStripConfig_s {
|
||||||
|
|
||||||
PG_DECLARE(ledStripConfig_t, ledStripConfig);
|
PG_DECLARE(ledStripConfig_t, ledStripConfig);
|
||||||
|
|
||||||
hsvColor_t *colors;
|
extern hsvColor_t *colors;
|
||||||
const modeColorIndexes_t *modeColors;
|
extern const modeColorIndexes_t *modeColors;
|
||||||
specialColorIndexes_t specialColors;
|
extern specialColorIndexes_t specialColors;
|
||||||
|
|
||||||
#define LF(name) LED_FUNCTION_ ## name
|
#define LF(name) LED_FUNCTION_ ## name
|
||||||
#define LO(name) LED_FLAG_OVERLAY(LED_OVERLAY_ ## name)
|
#define LO(name) LED_FLAG_OVERLAY(LED_OVERLAY_ ## name)
|
||||||
|
|
|
@ -43,8 +43,3 @@ void rcdeviceInit(void);
|
||||||
void rcdeviceUpdate(timeUs_t currentTimeUs);
|
void rcdeviceUpdate(timeUs_t currentTimeUs);
|
||||||
|
|
||||||
bool rcdeviceIsEnabled(void);
|
bool rcdeviceIsEnabled(void);
|
||||||
|
|
||||||
// used for unit test
|
|
||||||
rcdeviceSwitchState_t switchStates[BOXCAMERA3 - BOXCAMERA1 + 1];
|
|
||||||
|
|
||||||
void rcdeviceSend5KeyOSDCableSimualtionEvent(rcdeviceCamSimulationKeyEvent_e key);
|
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#include "stdbool.h"
|
#include "stdbool.h"
|
||||||
#include "drivers/time.h"
|
#include "drivers/time.h"
|
||||||
|
|
||||||
|
__ALIGN_BEGIN USB_OTG_CORE_HANDLE USB_OTG_dev __ALIGN_END;
|
||||||
|
|
||||||
LINE_CODING g_lc;
|
LINE_CODING g_lc;
|
||||||
|
|
||||||
extern __IO uint8_t USB_Tx_State;
|
extern __IO uint8_t USB_Tx_State;
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "usbd_usr.h"
|
#include "usbd_usr.h"
|
||||||
#include "usbd_desc.h"
|
#include "usbd_desc.h"
|
||||||
|
|
||||||
__ALIGN_BEGIN USB_OTG_CORE_HANDLE USB_OTG_dev __ALIGN_END;
|
extern USB_OTG_CORE_HANDLE USB_OTG_dev;
|
||||||
|
|
||||||
uint32_t CDC_Send_DATA(const uint8_t *ptrBuffer, uint32_t sendLength);
|
uint32_t CDC_Send_DATA(const uint8_t *ptrBuffer, uint32_t sendLength);
|
||||||
uint32_t CDC_Send_FreeBytes(void);
|
uint32_t CDC_Send_FreeBytes(void);
|
||||||
|
|
|
@ -74,6 +74,8 @@ extern "C" {
|
||||||
|
|
||||||
uint32_t millis(void);
|
uint32_t millis(void);
|
||||||
int minTimeout = 180;
|
int minTimeout = 180;
|
||||||
|
|
||||||
|
void rcdeviceSend5KeyOSDCableSimualtionEvent(rcdeviceCamSimulationKeyEvent_e key);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MAX_RESPONSES_COUNT 10
|
#define MAX_RESPONSES_COUNT 10
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue