aboutsummaryrefslogtreecommitdiffstats
path: root/Bootloaders
diff options
context:
space:
mode:
Diffstat (limited to 'Bootloaders')
-rw-r--r--Bootloaders/CDC/BootloaderAPI.c1
-rw-r--r--Bootloaders/CDC/BootloaderAPITable.S19
-rw-r--r--Bootloaders/CDC/BootloaderCDC.txt7
-rw-r--r--Bootloaders/CDC/Descriptors.c2
-rw-r--r--Bootloaders/DFU/BootloaderAPITable.S19
-rw-r--r--Bootloaders/DFU/BootloaderDFU.txt6
6 files changed, 38 insertions, 16 deletions
diff --git a/Bootloaders/CDC/BootloaderAPI.c b/Bootloaders/CDC/BootloaderAPI.c
index 326adb4d3..26705f876 100644
--- a/Bootloaders/CDC/BootloaderAPI.c
+++ b/Bootloaders/CDC/BootloaderAPI.c
@@ -71,4 +71,3 @@ void BootloaderAPI_WriteLock(const uint8_t LockBits)
{
boot_lock_bits_set_safe(LockBits);
}
-
diff --git a/Bootloaders/CDC/BootloaderAPITable.S b/Bootloaders/CDC/BootloaderAPITable.S
index 7f015f20a..b1d1b0571 100644
--- a/Bootloaders/CDC/BootloaderAPITable.S
+++ b/Bootloaders/CDC/BootloaderAPITable.S
@@ -32,12 +32,17 @@
.section .apitable, "ax"
.org 0
+; API function jump table
.global BootloaderAPI_JumpTable
BootloaderAPI_JumpTable:
- jmp BootloaderAPI_ErasePage
- jmp BootloaderAPI_WritePage
- jmp BootloaderAPI_FillWord
- jmp BootloaderAPI_ReadSignature
- jmp BootloaderAPI_ReadFuse
- jmp BootloaderAPI_ReadLock
- jmp BootloaderAPI_WriteLock
+ rjmp BootloaderAPI_ErasePage
+ rjmp BootloaderAPI_WritePage
+ rjmp BootloaderAPI_FillWord
+ rjmp BootloaderAPI_ReadSignature
+ rjmp BootloaderAPI_ReadFuse
+ rjmp BootloaderAPI_ReadLock
+ rjmp BootloaderAPI_WriteLock
+
+; Bootloader table signature
+.org 30
+ .word 0xDCFB
diff --git a/Bootloaders/CDC/BootloaderCDC.txt b/Bootloaders/CDC/BootloaderCDC.txt
index ab45ad1b8..584143e34 100644
--- a/Bootloaders/CDC/BootloaderCDC.txt
+++ b/Bootloaders/CDC/BootloaderCDC.txt
@@ -103,8 +103,15 @@
* uint8_t (*BootloaderAPI_ReadFuse)(uint16_t Address) = BOOTLOADER_API_START(4);
* uint8_t (*BootloaderAPI_ReadLock)(void) = BOOTLOADER_API_START(5);
* void (*BootloaderAPI_WriteLock)(uint8_t LockBits) = BOOTLOADER_API_START(6);
+ *
+ * #define BOOTLOADER_SIG_START (FLASHEND - 32)
+ * #define BOOTLOADER_SIGNATURE 0xDCFB
* \endcode
*
+ * Bootloaders reporting a device release revision number of 1.00 or greater are bootloader API enabled. From the application
+ * the API support of the bootloader can be detected by reading the FLASH memory bytes located at address \c BOOTLOADER_SIG_START
+ * and comparing them to the value \c BOOTLOADER_SIGNATURE.
+ *
* \section Sec_Options Project Options
*
* The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.
diff --git a/Bootloaders/CDC/Descriptors.c b/Bootloaders/CDC/Descriptors.c
index bf8c8195a..18afdf8b0 100644
--- a/Bootloaders/CDC/Descriptors.c
+++ b/Bootloaders/CDC/Descriptors.c
@@ -55,7 +55,7 @@ const USB_Descriptor_Device_t DeviceDescriptor =
.VendorID = 0x03EB,
.ProductID = 0x204A,
- .ReleaseNumber = VERSION_BCD(00.01),
+ .ReleaseNumber = VERSION_BCD(01.00),
.ManufacturerStrIndex = NO_DESCRIPTOR,
.ProductStrIndex = 0x01,
diff --git a/Bootloaders/DFU/BootloaderAPITable.S b/Bootloaders/DFU/BootloaderAPITable.S
index 7f015f20a..b1d1b0571 100644
--- a/Bootloaders/DFU/BootloaderAPITable.S
+++ b/Bootloaders/DFU/BootloaderAPITable.S
@@ -32,12 +32,17 @@
.section .apitable, "ax"
.org 0
+; API function jump table
.global BootloaderAPI_JumpTable
BootloaderAPI_JumpTable:
- jmp BootloaderAPI_ErasePage
- jmp BootloaderAPI_WritePage
- jmp BootloaderAPI_FillWord
- jmp BootloaderAPI_ReadSignature
- jmp BootloaderAPI_ReadFuse
- jmp BootloaderAPI_ReadLock
- jmp BootloaderAPI_WriteLock
+ rjmp BootloaderAPI_ErasePage
+ rjmp BootloaderAPI_WritePage
+ rjmp BootloaderAPI_FillWord
+ rjmp BootloaderAPI_ReadSignature
+ rjmp BootloaderAPI_ReadFuse
+ rjmp BootloaderAPI_ReadLock
+ rjmp BootloaderAPI_WriteLock
+
+; Bootloader table signature
+.org 30
+ .word 0xDCFB
diff --git a/Bootloaders/DFU/BootloaderDFU.txt b/Bootloaders/DFU/BootloaderDFU.txt
index 94657f355..f7f5ee9a8 100644
--- a/Bootloaders/DFU/BootloaderDFU.txt
+++ b/Bootloaders/DFU/BootloaderDFU.txt
@@ -108,8 +108,14 @@
* uint8_t (*BootloaderAPI_ReadFuse)(uint16_t Address) = BOOTLOADER_API_START(4);
* uint8_t (*BootloaderAPI_ReadLock)(void) = BOOTLOADER_API_START(5);
* void (*BootloaderAPI_WriteLock)(uint8_t LockBits) = BOOTLOADER_API_START(6);
+ *
+ * #define BOOTLOADER_SIG_START (FLASHEND - 32)
+ * #define BOOTLOADER_SIGNATURE 0xDCFB
* \endcode
*
+ * From the application the API support of the bootloader can be detected by reading the FLASH memory bytes located at address
+ * \c BOOTLOADER_SIG_START and comparing them to the value \c BOOTLOADER_SIGNATURE.
+ *
* \section Sec_Options Project Options
*
* The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value.