Small lib tweak

This commit is contained in:
Benjamin Vedder 2022-05-13 09:32:39 +02:00
parent 64db50a1f1
commit 58da66d03e
2 changed files with 8 additions and 1 deletions

View File

@ -24,12 +24,16 @@ endif
OBJECTS = $(SOURCES:.c=.so)
CFLAGS = -fpic -Os -Wall -Wextra -Wundef -std=gnu99 -I$(VESC_C_LIB_PATH)
CFLAGS += -I$(STLIB_PATH)/inc -I$(STLIB_PATH)/CMSIS/include -I$(STLIB_PATH)/CMSIS/ST
CFLAGS += -I$(STLIB_PATH)/CMSIS/include -I$(STLIB_PATH)/CMSIS/ST
CFLAGS += -fomit-frame-pointer -falign-functions=16 -mthumb
CFLAGS += -fsingle-precision-constant -Wdouble-promotion
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mcpu=cortex-m4
CFLAGS += -fdata-sections -ffunction-sections
ifeq ($(USE_STLIB),yes)
CFLAGS += -DUSE_STLIB -I$(STLIB_PATH)/inc
endif
LDFLAGS = -nostartfiles -static -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mcpu=cortex-m4
LDFLAGS += -lm -Wl,--gc-sections,--undefined=init
LDFLAGS += -T $(VESC_C_LIB_PATH)/link.ld

View File

@ -23,7 +23,10 @@
#include <stdint.h>
#include <stdbool.h>
#include "system_stm32f4xx.h"
#ifdef USE_STLIB
#include "stm32f4xx_conf.h"
#endif
typedef struct {
volatile uint32_t MODER;