Build firmware for target without bootloader (#173)

* fixed inline functions for modern C standart

* Build firmware for mcu without bootloader
This commit is contained in:
DrZlo13
2020-10-13 21:55:04 +10:00
committed by GitHub
parent 942bbfaefe
commit 1b85fa69af
3 changed files with 232 additions and 7 deletions

View File

@@ -5,6 +5,15 @@ FW_ADDRESS = 0x08008000
OS_OFFSET = 0x00008000
FLASH_ADDRESS = 0x08008000
NO_BOOTLOADER ?= 0
ifeq ($(NO_BOOTLOADER), 1)
BOOT_ADDRESS = 0x08000000
FW_ADDRESS = 0x08000000
OS_OFFSET = 0x00000000
FLASH_ADDRESS = 0x08000000
CFLAGS += -DNO_BOOTLOADER
endif
BOOT_CFLAGS = -DBOOT_ADDRESS=$(BOOT_ADDRESS) -DFW_ADDRESS=$(FW_ADDRESS) -DOS_OFFSET=$(OS_OFFSET)
MCU_FLAGS = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard
@@ -65,7 +74,12 @@ CFLAGS += \
-DHAVE_FREERTOS \
-DBUTON_INVERT=false \
-DDEBUG_UART=huart1
ifeq ($(NO_BOOTLOADER), 1)
LDFLAGS += -T$(TARGET_DIR)/STM32L476RGTx_FLASH_NO_BOOT.ld
else
LDFLAGS += -T$(TARGET_DIR)/STM32L476RGTx_FLASH.ld
endif
CFLAGS += \
-I$(TARGET_DIR)/Inc \