stm32f4: switch two examples to linker generation

Proves that the tree can have projects specifying the linker script explicitly,
and also "modern" projects specifying simply the DEVICE= variable.
This commit is contained in:
Karl Palsson
2016-04-17 00:12:58 +00:00
parent 0f04829415
commit b5fcf55005
3 changed files with 5 additions and 2 deletions

View File

@@ -19,11 +19,14 @@
## along with this library. If not, see <http://www.gnu.org/licenses/>. ## along with this library. If not, see <http://www.gnu.org/licenses/>.
## ##
# You should use linker script generation! Specify device!
ifeq ($(DEVICE),)
LIBNAME = opencm3_stm32f4 LIBNAME = opencm3_stm32f4
DEFS += -DSTM32F4 DEFS += -DSTM32F4
FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16
ARCH_FLAGS = -mthumb -mcpu=cortex-m4 $(FP_FLAGS) ARCH_FLAGS = -mthumb -mcpu=cortex-m4 $(FP_FLAGS)
endif
################################################################################ ################################################################################
# OpenOCD specific variables # OpenOCD specific variables

View File

@@ -18,7 +18,7 @@
## ##
BINARY = adc-dac-printf BINARY = adc-dac-printf
LDSCRIPT = ../stm32f4-discovery.ld DEVICE=STM32F407VG
include ../../Makefile.include include ../../Makefile.include

View File

@@ -19,7 +19,7 @@
BINARY = miniblink BINARY = miniblink
LDSCRIPT = ../stm32f4-discovery.ld DEVICE=STM32F407VG
include ../../Makefile.include include ../../Makefile.include