From 4344f7fc1030bec9560186ee04aa6893e39f5416 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 17 May 2018 11:00:24 -0400 Subject: [PATCH] lpc176x: Add build rules for smoothieware bootloader support Signed-off-by: Kevin O'Connor --- src/lpc176x/Kconfig | 9 +++++++++ src/lpc176x/Makefile | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lpc176x/Kconfig b/src/lpc176x/Kconfig index fa80c463..372b7007 100644 --- a/src/lpc176x/Kconfig +++ b/src/lpc176x/Kconfig @@ -25,6 +25,15 @@ config CLOCK_FREQ default 25000000 if MACH_LPC1768 # 100000000 / 4 default 30000000 if MACH_LPC1769 # 120000000 / 4 +config SMOOTHIEWARE_BOOTLOADER + bool "Target board uses Smoothieware bootloader" + default y + +config FLASH_START + hex + default 0x4000 if SMOOTHIEWARE_BOOTLOADER + default 0x0000 + config USBSERIAL bool "Use USB for communication (instead of serial)" default y diff --git a/src/lpc176x/Makefile b/src/lpc176x/Makefile index 94e6a268..7edd26eb 100644 --- a/src/lpc176x/Makefile +++ b/src/lpc176x/Makefile @@ -33,7 +33,7 @@ target-y := $(OUT)LPC1768.ld $(target-y) $(OUT)LPC1768.ld: lib/lpc176x/device/TOOLCHAIN_GCC_ARM/LPC1768.ld $(OUT)board-link @echo " Preprocessing $@" - $(Q)$(CPP) -P -MD -MT $@ $< -o $@ + $(Q)$(CPP) -P -MD -MT $@ -DMBED_APP_START=$(CONFIG_FLASH_START) -DMBED_APP_SIZE="(512K - $(CONFIG_FLASH_START))" $< -o $@ # Build the additional bin output file target-y += $(OUT)klipper.bin