aboutsummaryrefslogtreecommitdiffstats
path: root/Bootloaders
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-06-29 04:55:44 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-06-29 04:55:44 +0000
commit2e27cc267069368071915b48e9090d393bedd1ce (patch)
tree7875fd14c88a300f36f37f784ec38c69a3a3697f /Bootloaders
parent579fbb68fc1aa437c23d85ed961a1d3bf6e6bf85 (diff)
downloadlufa-2e27cc267069368071915b48e9090d393bedd1ce.tar.gz
lufa-2e27cc267069368071915b48e9090d393bedd1ce.tar.bz2
lufa-2e27cc267069368071915b48e9090d393bedd1ce.zip
Fixed CDC and DFU bootloaders API page erase and write function failures (thanks to Martin Lambert).
Diffstat (limited to 'Bootloaders')
-rw-r--r--Bootloaders/CDC/BootloaderAPI.c2
-rw-r--r--Bootloaders/CDC/makefile4
-rw-r--r--Bootloaders/DFU/BootloaderAPI.c2
-rw-r--r--Bootloaders/DFU/makefile4
4 files changed, 8 insertions, 4 deletions
diff --git a/Bootloaders/CDC/BootloaderAPI.c b/Bootloaders/CDC/BootloaderAPI.c
index 60b2d94b2..bac078f50 100644
--- a/Bootloaders/CDC/BootloaderAPI.c
+++ b/Bootloaders/CDC/BootloaderAPI.c
@@ -38,12 +38,14 @@
void BootloaderAPI_ErasePage(const uint32_t Address)
{
boot_page_erase_safe(Address);
+ boot_spm_busy_wait();
boot_rww_enable();
}
void BootloaderAPI_WritePage(const uint32_t Address)
{
boot_page_write_safe(Address);
+ boot_spm_busy_wait();
boot_rww_enable();
}
diff --git a/Bootloaders/CDC/makefile b/Bootloaders/CDC/makefile
index 67be6df2e..5ebd8b599 100644
--- a/Bootloaders/CDC/makefile
+++ b/Bootloaders/CDC/makefile
@@ -35,8 +35,8 @@ BOOT_SEC_OFFSET = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - $
# Bootloader linker section flags for relocating the API table sections to
# known FLASH addresses - these should not normally be user-edited.
BOOT_SECTION_LD_FLAG = -Wl,--section-start=.apitable_$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=BootloaderAPI_$(strip $(2))
-BOOT_API_LD_FLAGS = $(call BOOT_SECTION_LD_FLAG, trampolines, Trampolines, (48 + 32 + 8))
-BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, jumptable, JumpTable, (32 + 8))
+BOOT_API_LD_FLAGS = $(call BOOT_SECTION_LD_FLAG, trampolines, Trampolines, 96)
+BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, jumptable, JumpTable, 32)
BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, signatures, Signatures, 8)
# Default target
diff --git a/Bootloaders/DFU/BootloaderAPI.c b/Bootloaders/DFU/BootloaderAPI.c
index f161bad91..dadab3d73 100644
--- a/Bootloaders/DFU/BootloaderAPI.c
+++ b/Bootloaders/DFU/BootloaderAPI.c
@@ -38,12 +38,14 @@
void BootloaderAPI_ErasePage(const uint32_t Address)
{
boot_page_erase_safe(Address);
+ boot_spm_busy_wait();
boot_rww_enable();
}
void BootloaderAPI_WritePage(const uint32_t Address)
{
boot_page_write_safe(Address);
+ boot_spm_busy_wait();
boot_rww_enable();
}
diff --git a/Bootloaders/DFU/makefile b/Bootloaders/DFU/makefile
index cc072f452..b4fd268d9 100644
--- a/Bootloaders/DFU/makefile
+++ b/Bootloaders/DFU/makefile
@@ -35,8 +35,8 @@ BOOT_SEC_OFFSET = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - $
# Bootloader linker section flags for relocating the API table sections to
# known FLASH addresses - these should not normally be user-edited.
BOOT_SECTION_LD_FLAG = -Wl,--section-start=.apitable_$(strip $(1))=$(call BOOT_SEC_OFFSET, $(3)) -Wl,--undefined=BootloaderAPI_$(strip $(2))
-BOOT_API_LD_FLAGS = $(call BOOT_SECTION_LD_FLAG, trampolines, Trampolines, (48 + 32 + 8))
-BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, jumptable, JumpTable, (32 + 8))
+BOOT_API_LD_FLAGS = $(call BOOT_SECTION_LD_FLAG, trampolines, Trampolines, 96)
+BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, jumptable, JumpTable, 32)
BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, signatures, Signatures, 8)
# Default target