link time optimisations tried, but cant use debugger

This commit is contained in:
Oskar Weigl
2016-12-04 22:54:38 +09:00
parent 74e84d43e6
commit 5b41852b9e
3 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -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
View File
@@ -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
+1 -1
View File
@@ -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;