Skip to content

Commit

Permalink
Link with libgcc for AEABI functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
iabdalkader committed Feb 13, 2019
1 parent 6f71875 commit 7833adc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Makefile
Expand Up @@ -77,7 +77,7 @@ endif

# Compiler Flags
include $(OMV_BOARD_CONFIG_DIR)/omv_boardconfig.mk
CFLAGS += -std=gnu99 -Wall -Werror -Warray-bounds -mthumb -nostartfiles -mabi=aapcs-linux -fdata-sections -ffunction-sections
CFLAGS += -std=gnu99 -Wall -Werror -Warray-bounds -mthumb -nostartfiles -fdata-sections -ffunction-sections
CFLAGS += -D$(MCU) -D$(CFLAGS_MCU) -D$(ARM_MATH) -DARM_MATH_DSP -DARM_NN_TRUNCATE\
-fsingle-precision-constant -Wdouble-promotion -mcpu=$(CPU) -mtune=$(CPU) -mfpu=$(FPU) -mfloat-abi=hard
CFLAGS += -D__FPU_PRESENT=1 -D__VFP_FP__ -DUSE_USB_FS -DUSE_DEVICE_MODE -DUSE_USB_OTG_ID=0 -DHSE_VALUE=12000000\
Expand Down Expand Up @@ -496,7 +496,7 @@ FIRMWARE_OBJS:
# This target generates the main/app firmware image located at 0x08010000
$(FIRMWARE): FIRMWARE_OBJS
$(CPP) -P -E -I$(OMV_BOARD_CONFIG_DIR) $(OMV_DIR)/stm32fxxx.ld.S > $(BUILD)/stm32fxxx.lds
$(CC) $(LDFLAGS) $(FIRM_OBJ) -o $(FW_DIR)/$(FIRMWARE).elf
$(CC) $(LDFLAGS) $(FIRM_OBJ) -o $(FW_DIR)/$(FIRMWARE).elf -lgcc
$(OBJCOPY) -Obinary $(FW_DIR)/$(FIRMWARE).elf $(FW_DIR)/$(FIRMWARE).bin
$(PYTHON) $(MKDFU) -b $(MAIN_APP_ADDR):$(FW_DIR)/$(FIRMWARE).bin $(FW_DIR)/$(FIRMWARE).dfu

Expand Down
2 changes: 1 addition & 1 deletion src/micropython
Submodule micropython updated 1 files
+0 −86 lib/libm/math.c
5 changes: 5 additions & 0 deletions src/omv/stm32fxxx.ld.S
Expand Up @@ -70,6 +70,11 @@ SECTIONS
_etext = .; // define a global symbols at end of code
} >FLASH_TEXT

.ARM.exidx :
{
*(.ARM.exidx*)
} > FLASH_TEXT

/* used by the startup to initialize data */
_sidata = .;

Expand Down

0 comments on commit 7833adc

Please sign in to comment.