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:
@@ -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
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
##
|
##
|
||||||
|
|
||||||
BINARY = adc-dac-printf
|
BINARY = adc-dac-printf
|
||||||
LDSCRIPT = ../stm32f4-discovery.ld
|
DEVICE=STM32F407VG
|
||||||
|
|
||||||
include ../../Makefile.include
|
include ../../Makefile.include
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
BINARY = miniblink
|
BINARY = miniblink
|
||||||
|
|
||||||
LDSCRIPT = ../stm32f4-discovery.ld
|
DEVICE=STM32F407VG
|
||||||
|
|
||||||
include ../../Makefile.include
|
include ../../Makefile.include
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user