@ -28,41 +28,44 @@
this s o f t w a r e .
* /
; Bootloader API Jump Table
.section .apitable , " ax"
; Trampolines to actual API implementations if the target address is outside the
; range of a rjmp instruction (can happen with large bootloader sections)
.org 0
BootloaderAPI_ErasePage_Trampoline :
.section .apitable_trampolines , " ax"
.global BootloaderAPI_Trampolines
BootloaderAPI_Trampolines :
BootloaderAPI_ErasePage_Trampoline :
jmp B o o t l o a d e r A P I _ E r a s e P a g e
BootloaderAPI_WritePage_Trampoline :
BootloaderAPI_WritePage_Trampoline :
jmp B o o t l o a d e r A P I _ W r i t e P a g e
BootloaderAPI_FillWord_Trampoline :
BootloaderAPI_FillWord_Trampoline :
jmp B o o t l o a d e r A P I _ F i l l W o r d
BootloaderAPI_ReadSignature_Trampoline :
BootloaderAPI_ReadSignature_Trampoline :
jmp B o o t l o a d e r A P I _ R e a d S i g n a t u r e
BootloaderAPI_ReadFuse_Trampoline :
BootloaderAPI_ReadFuse_Trampoline :
jmp B o o t l o a d e r A P I _ R e a d F u s e
BootloaderAPI_ReadLock_Trampoline :
BootloaderAPI_ReadLock_Trampoline :
jmp B o o t l o a d e r A P I _ R e a d L o c k
BootloaderAPI_WriteLock_Trampoline :
BootloaderAPI_WriteLock_Trampoline :
jmp B o o t l o a d e r A P I _ W r i t e L o c k
BootloaderAPU_UNUSED1 :
BootloaderAPU_UNUSED1 :
ret
BootloaderAPU_UNUSED2 :
BootloaderAPU_UNUSED2 :
ret
BootloaderAPU_UNUSED3 :
BootloaderAPU_UNUSED3 :
ret
BootloaderAPU_UNUSED4 :
BootloaderAPU_UNUSED4 :
ret
BootloaderAPU_UNUSED5 :
BootloaderAPU_UNUSED5 :
ret
; API function jump table
.org ( 9 6 - 3 2 )
. section .apitable_jumptable , " ax"
.global BootloaderAPI_JumpTable
BootloaderAPI_JumpTable :
rjmp B o o t l o a d e r A P I _ E r a s e P a g e _ T r a m p o l i n e
rjmp B o o t l o a d e r A P I _ W r i t e P a g e _ T r a m p o l i n e
rjmp B o o t l o a d e r A P I _ F i l l W o r d _ T r a m p o l i n e
@ -76,10 +79,13 @@ BootloaderAPI_JumpTable:
rjmp B o o t l o a d e r A P U _ U N U S E D 4 ; UNUSED ENTRY 4
rjmp B o o t l o a d e r A P U _ U N U S E D 5 ; UNUSED ENTRY 5
; Bootloader table signatures and information
.org ( 9 6 - 8 )
BootloaderAPI_Signatures :
.section .apitable_signatures , " ax"
.global BootloaderAPI_Signatures
BootloaderAPI_Signatures :
.long BOOT_START_ADDR ; Start address of the bootloader
.word 0xCDC1 ; Signature for the CDC class bootloader, V1
.word 0x DFB1 ; Signature for the DFU class bootloader, V1
.word 0xDCFB ; Signature for a LUFA class bootloader