mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-25 02:47:27 +08:00
link time optimisations tried, but cant use debugger
This commit is contained in:
@@ -13,6 +13,7 @@ TARGET = ODriveFirmware
|
||||
# debug build?
|
||||
DEBUG = 1
|
||||
# optimization
|
||||
# OPT = -O3 -ffast-math -flto
|
||||
OPT = -O0 -ffast-math
|
||||
|
||||
#######################################
|
||||
@@ -116,7 +117,7 @@ LDSCRIPT = STM32F405RGTx_FLASH.ld
|
||||
# libraries
|
||||
LIBS = -lc -lm -lnosys
|
||||
LIBDIR =
|
||||
LDFLAGS = -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -specs=nano.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections
|
||||
LDFLAGS = -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -specs=nano.specs $(OPT) -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref -Wl,--gc-sections
|
||||
|
||||
# default action: build all
|
||||
all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin
|
||||
|
||||
+1
-1
@@ -1931,7 +1931,7 @@ BaseType_t xTaskRemoveFromUnorderedEventList( ListItem_t * pxEventListItem, cons
|
||||
* Sets the pointer to the current TCB to the TCB of the highest priority task
|
||||
* that is ready to run.
|
||||
*/
|
||||
void vTaskSwitchContext( void ) PRIVILEGED_FUNCTION;
|
||||
void vTaskSwitchContext( void ) PRIVILEGED_FUNCTION __attribute__((used));
|
||||
|
||||
/*
|
||||
* THESE FUNCTIONS MUST NOT BE USED FROM APPLICATION CODE. THEY ARE USED BY
|
||||
|
||||
@@ -293,7 +293,7 @@ void pwm_trig_adc_cb(ADC_HandleTypeDef* hadc) {
|
||||
|
||||
static bool check_timing() {
|
||||
#define log_size 32
|
||||
static uint16_t timings[log_size];
|
||||
static volatile uint16_t timings[log_size];
|
||||
static int idx = 0;
|
||||
|
||||
uint16_t timing = htim1.Instance->CNT;
|
||||
|
||||
Reference in New Issue
Block a user