kumquat-buildroot/boot/afboot-stm32/afboot-stm32.mk
Thomas Petazzoni a354e3828d afboot-stm32: use the Buildroot toolchain
By default, the afboot-stm32 Makefile uses "CROSS_COMPILE =
arm-none-eabi-". Since I had such a toolchain installed on my system
when testing afboot-stm32, I didn't realize it wasn't using the
Buildroot toolchain.

However, using the Buildroot toolchain doesn't immediately works for
FLAT toolchains, as gcc automatically wants to create a FLAT
binary. So we need to adjust the afboot-stm32 Makefile to use directly
'ld' and not 'gcc' when linking.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-04-16 12:43:16 +02:00

19 lines
535 B
Makefile

################################################################################
#
# afboot-stm32
#
################################################################################
AFBOOT_STM32_VERSION = v0.1
AFBOOT_STM32_SITE = $(call github,mcoquelin-stm32,afboot-stm32,$(AFBOOT_STM32_VERSION))
define AFBOOT_STM32_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE=$(TARGET_CROSS) all
endef
define AFBOOT_STM32_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(@D)/stm32*.bin $(BINARIES_DIR)
endef
$(eval $(generic-package))