mirror of https://github.com/rusefi/bldc.git
Small lib tweak
This commit is contained in:
parent
64db50a1f1
commit
58da66d03e
|
@ -24,12 +24,16 @@ endif
|
||||||
OBJECTS = $(SOURCES:.c=.so)
|
OBJECTS = $(SOURCES:.c=.so)
|
||||||
|
|
||||||
CFLAGS = -fpic -Os -Wall -Wextra -Wundef -std=gnu99 -I$(VESC_C_LIB_PATH)
|
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 += -fomit-frame-pointer -falign-functions=16 -mthumb
|
||||||
CFLAGS += -fsingle-precision-constant -Wdouble-promotion
|
CFLAGS += -fsingle-precision-constant -Wdouble-promotion
|
||||||
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mcpu=cortex-m4
|
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mcpu=cortex-m4
|
||||||
CFLAGS += -fdata-sections -ffunction-sections
|
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 = -nostartfiles -static -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mcpu=cortex-m4
|
||||||
LDFLAGS += -lm -Wl,--gc-sections,--undefined=init
|
LDFLAGS += -lm -Wl,--gc-sections,--undefined=init
|
||||||
LDFLAGS += -T $(VESC_C_LIB_PATH)/link.ld
|
LDFLAGS += -T $(VESC_C_LIB_PATH)/link.ld
|
||||||
|
|
|
@ -23,7 +23,10 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "system_stm32f4xx.h"
|
#include "system_stm32f4xx.h"
|
||||||
|
|
||||||
|
#ifdef USE_STLIB
|
||||||
#include "stm32f4xx_conf.h"
|
#include "stm32f4xx_conf.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
volatile uint32_t MODER;
|
volatile uint32_t MODER;
|
||||||
|
|
Loading…
Reference in New Issue