1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

Adds setting HSE_VALUE on all F1 targets (should only be necessary if the HSE clock is not 8MHz).

Moves the CMSIS system_stm3210x.c from library.mk to the individual Makefiles for the F1 targets.  This allows for custom SystemInit functions where necessary.
This commit is contained in:
Brian Webb 2013-05-14 20:58:37 -07:00
parent e0de2083af
commit bc4f615c25
8 changed files with 20 additions and 1 deletions

View File

@ -12,6 +12,7 @@ LINKER_SCRIPTS_PATH = $(PIOS_DEVLIB)
CDEFS += -DSTM32F10X -DSTM32F10X_$(MODEL)
CDEFS += -DUSE_STDPERIPH_DRIVER
CDEFS += -DARM_MATH_CM3
CDEFS += -DHSE_VALUE=$(OSCILLATOR_FREQ)
ARCHFLAGS += -mcpu=cortex-m3 --specs=nano.specs
# Board-specific startup files
@ -24,7 +25,6 @@ SRC += $(sort $(wildcard $(PIOS_DEVLIB)*.c))
include $(PIOS)/common/libraries/CMSIS2/library.mk
CMSIS_DIR = $(PIOS_DEVLIB)libraries/CMSIS/Core/CM3
SRC += $(CMSIS_DIR)/core_cm3.c
SRC += $(CMSIS_DIR)/system_stm32f10x.c
EXTRAINCDIRS += $(CMSIS_DIR)
# ST Peripheral library

View File

@ -19,3 +19,5 @@ FW_BANK_BASE := 0x08003000 # Start of firmware flash
FW_BANK_SIZE := 0x0001D000 # Should include FW_DESC_SIZE
FW_DESC_SIZE := 0x00000064
OSCILLATOR_FREQ := 8000000

View File

@ -20,6 +20,9 @@ ifndef OPENPILOT_IS_COOL
$(error Top level Makefile must be used to build this target)
endif
## The standard CMSIS startup
SRC += $(CMSIS_DIR)/system_stm32f10x.c
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(ROOT_DIR)/make/boot-defs.mk

View File

@ -58,6 +58,9 @@ endif
# List C source files here (C dependencies are automatically generated).
# Use file-extension c for "c-only"-files
ifndef TESTAPP
## The standard CMSIS startup
SRC += $(CMSIS_DIR)/system_stm32f10x.c
## Application Core
SRC += ../pios_usb_board_data.c
SRC += $(OPMODULEDIR)/System/systemmod.c

View File

@ -21,3 +21,5 @@ EE_BANK_BASE := 0x0801FC00 # EEPROM storage area
EE_BANK_SIZE := 0x00000400 # Size of EEPROM storage area
FW_DESC_SIZE := 0x00000064
OSCILLATOR_FREQ := 8000000

View File

@ -20,6 +20,9 @@ ifndef OPENPILOT_IS_COOL
$(error Top level Makefile must be used to build this target)
endif
## The standard CMSIS startup
SRC += $(CMSIS_DIR)/system_stm32f10x.c
include ../board-info.mk
include $(ROOT_DIR)/make/firmware-defs.mk
include $(ROOT_DIR)/make/boot-defs.mk

View File

@ -35,6 +35,9 @@ OPTMODULES =
# List C source files here (C dependencies are automatically generated).
# Use file-extension c for "c-only"-files
ifndef TESTAPP
## The standard CMSIS startup
SRC += $(CMSIS_DIR)/system_stm32f10x.c
## Application Core
SRC += ../pios_usb_board_data.c
SRC += $(OPMODULEDIR)/OPLink/oplinkmod.c

View File

@ -43,6 +43,9 @@ SRC += $(OPSYSTEM)/pios_board.c
ifeq ($(MCU),cortex-m3)
include $(PIOS)/stm32f10x/library.mk
## The standard CMSIS startup
SRC += $(CMSIS_DIR)/system_stm32f10x.c
# Set linker-script name depending on selected submodel name
LDFLAGS += -T$(LINKER_SCRIPTS_PATH)/link_$(BOARD)_memory.ld
LDFLAGS += -T$(LINKER_SCRIPTS_PATH)/link_$(BOARD)_sections.ld