From 109467d881289029c6adcc282cf878b1cb8c5d49 Mon Sep 17 00:00:00 2001
From: cladmi <gaetan.harter@fu-berlin.de>
Date: Thu, 16 Aug 2018 19:15:05 +0200
Subject: [PATCH] mega-xplained: configure BOOTLOADER_SIZE

Value found by checking fuse settings
---
 boards/mega-xplained/Makefile.include | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/boards/mega-xplained/Makefile.include b/boards/mega-xplained/Makefile.include
index 63c2961f0f..9a8d7e5f4f 100644
--- a/boards/mega-xplained/Makefile.include
+++ b/boards/mega-xplained/Makefile.include
@@ -1,6 +1,11 @@
 # define the cpu used by the Mega Xplained board
 export CPU = atmega1284p
 
+# Found by checking fuse settings (2048 words so 4KB)
+# https://www.microchip.com/DevelopmentTools/ProductDetails/atmega1284p-xpld
+BOOTLOADER_SIZE ?= 4K
+ROM_RESERVED ?= $(BOOTLOADER_SIZE)
+
 # configure the terminal program
 export PORT_LINUX  ?= /dev/ttyACM0
 export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
-- 
GitLab