forked from mfulz_github/qmk_firmware
Fixed CDC and DFU bootloaders failing to compile when the bootloader section size is 8KB or more (thanks to Georg Glock).
This commit is contained in:
parent
a19dc3d20c
commit
e8570c4a37
|
@ -31,25 +31,45 @@
|
|||
; Bootloader API Jump Table
|
||||
.section .apitable, "ax"
|
||||
|
||||
; API function jump table
|
||||
; 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
|
||||
.global BootloaderAPI_JumpTable
|
||||
BootloaderAPI_JumpTable:
|
||||
rjmp BootloaderAPI_ErasePage
|
||||
rjmp BootloaderAPI_WritePage
|
||||
rjmp BootloaderAPI_FillWord
|
||||
rjmp BootloaderAPI_ReadSignature
|
||||
rjmp BootloaderAPI_ReadFuse
|
||||
rjmp BootloaderAPI_ReadLock
|
||||
rjmp BootloaderAPI_WriteLock
|
||||
nop ; UNUSED ENTRY
|
||||
nop ; UNUSED ENTRY
|
||||
nop ; UNUSED ENTRY
|
||||
nop ; UNUSED ENTRY
|
||||
BootloaderAPI_ErasePage_Trampoline:
|
||||
jmp BootloaderAPI_ErasePage
|
||||
BootloaderAPI_WritePage_Trampoline:
|
||||
jmp BootloaderAPI_WritePage
|
||||
BootloaderAPI_FillWord_Trampoline:
|
||||
jmp BootloaderAPI_FillWord
|
||||
BootloaderAPI_ReadSignature_Trampoline:
|
||||
jmp BootloaderAPI_ReadSignature
|
||||
BootloaderAPI_ReadFuse_Trampoline:
|
||||
jmp BootloaderAPI_ReadFuse
|
||||
BootloaderAPI_ReadLock_Trampoline:
|
||||
jmp BootloaderAPI_ReadLock
|
||||
BootloaderAPI_WriteLock_Trampoline:
|
||||
jmp BootloaderAPI_WriteLock
|
||||
BootloaderAPU_UNUSED:
|
||||
ret
|
||||
|
||||
; API function jump table
|
||||
.org (96 - 32)
|
||||
.global BootloaderAPI_JumpTable
|
||||
BootloaderAPI_JumpTable:
|
||||
rjmp BootloaderAPI_ErasePage_Trampoline
|
||||
rjmp BootloaderAPI_WritePage_Trampoline
|
||||
rjmp BootloaderAPI_FillWord_Trampoline
|
||||
rjmp BootloaderAPI_ReadSignature_Trampoline
|
||||
rjmp BootloaderAPI_ReadFuse_Trampoline
|
||||
rjmp BootloaderAPI_ReadLock_Trampoline
|
||||
rjmp BootloaderAPI_WriteLock_Trampoline
|
||||
rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
|
||||
rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
|
||||
rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
|
||||
rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
|
||||
rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
|
||||
|
||||
; Bootloader table signatures and information
|
||||
.org (32 - 8)
|
||||
.org (96 - 8)
|
||||
BootloaderAPI_Signatures:
|
||||
.global BootloaderAPI_Signatures
|
||||
.long BOOT_START_ADDR ; Start address of the bootloader
|
||||
|
|
|
@ -102,7 +102,7 @@ BOOT_SECTION_SIZE_KB = 4
|
|||
# API jump table (for more information on the latter, see the bootloader documentation). These formulas
|
||||
# should not need to be altered - modify the FLASH_SIZE_KB and BOOT_SECTION_KB values above instead.
|
||||
BOOT_START = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc)
|
||||
BOOT_API_TABLESTART = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - 32)" | bc)
|
||||
BOOT_API_TABLESTART = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - 96)" | bc)
|
||||
|
||||
|
||||
# Output format. (can be srec, ihex, binary)
|
||||
|
|
|
@ -31,25 +31,45 @@
|
|||
; Bootloader API Jump Table
|
||||
.section .apitable, "ax"
|
||||
|
||||
; API function jump table
|
||||
; 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
|
||||
.global BootloaderAPI_JumpTable
|
||||
BootloaderAPI_JumpTable:
|
||||
rjmp BootloaderAPI_ErasePage
|
||||
rjmp BootloaderAPI_WritePage
|
||||
rjmp BootloaderAPI_FillWord
|
||||
rjmp BootloaderAPI_ReadSignature
|
||||
rjmp BootloaderAPI_ReadFuse
|
||||
rjmp BootloaderAPI_ReadLock
|
||||
rjmp BootloaderAPI_WriteLock
|
||||
nop ; UNUSED ENTRY
|
||||
nop ; UNUSED ENTRY
|
||||
nop ; UNUSED ENTRY
|
||||
nop ; UNUSED ENTRY
|
||||
BootloaderAPI_ErasePage_Trampoline:
|
||||
jmp BootloaderAPI_ErasePage
|
||||
BootloaderAPI_WritePage_Trampoline:
|
||||
jmp BootloaderAPI_WritePage
|
||||
BootloaderAPI_FillWord_Trampoline:
|
||||
jmp BootloaderAPI_FillWord
|
||||
BootloaderAPI_ReadSignature_Trampoline:
|
||||
jmp BootloaderAPI_ReadSignature
|
||||
BootloaderAPI_ReadFuse_Trampoline:
|
||||
jmp BootloaderAPI_ReadFuse
|
||||
BootloaderAPI_ReadLock_Trampoline:
|
||||
jmp BootloaderAPI_ReadLock
|
||||
BootloaderAPI_WriteLock_Trampoline:
|
||||
jmp BootloaderAPI_WriteLock
|
||||
BootloaderAPU_UNUSED:
|
||||
ret
|
||||
|
||||
; API function jump table
|
||||
.org (96 - 32)
|
||||
.global BootloaderAPI_JumpTable
|
||||
BootloaderAPI_JumpTable:
|
||||
rjmp BootloaderAPI_ErasePage_Trampoline
|
||||
rjmp BootloaderAPI_WritePage_Trampoline
|
||||
rjmp BootloaderAPI_FillWord_Trampoline
|
||||
rjmp BootloaderAPI_ReadSignature_Trampoline
|
||||
rjmp BootloaderAPI_ReadFuse_Trampoline
|
||||
rjmp BootloaderAPI_ReadLock_Trampoline
|
||||
rjmp BootloaderAPI_WriteLock_Trampoline
|
||||
rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
|
||||
rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
|
||||
rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
|
||||
rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
|
||||
rjmp BootloaderAPU_UNUSED ; UNUSED ENTRY
|
||||
|
||||
; Bootloader table signatures and information
|
||||
.org (32 - 8)
|
||||
.org (96 - 8)
|
||||
BootloaderAPI_Signatures:
|
||||
.global BootloaderAPI_Signatures
|
||||
.long BOOT_START_ADDR ; Start address of the bootloader
|
||||
|
|
|
@ -102,7 +102,7 @@ BOOT_SECTION_SIZE_KB = 4
|
|||
# API jump table (for more information on the latter, see the bootloader documentation). These formulas
|
||||
# should not need to be altered - modify the FLASH_SIZE_KB and BOOT_SECTION_KB values above instead.
|
||||
BOOT_START = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc)
|
||||
BOOT_API_TABLESTART = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - 32)" | bc)
|
||||
BOOT_API_TABLESTART = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - 96)" | bc)
|
||||
|
||||
|
||||
# Output format. (can be srec, ihex, binary)
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
* - Fixed error in the AVRISP-MKII programmer when ISP mode is used at 64KHz (thanks to Ben R. Porter)
|
||||
* - Fixed AVRISP-MKII programmer project failing to compile for the U4 chips when VTARGET_ADC_CHANNEL is defined to an invalid channel and NO_VTARGET_DETECT is
|
||||
* defined (thanks to Steven Morehouse)
|
||||
* - Fixed CDC and DFU bootloaders failing to compile when the bootloader section size is 8KB or more (thanks to Georg Glock)
|
||||
*
|
||||
* \section Sec_ChangeLog120219 Version 120219
|
||||
* <b>New:</b>
|
||||
|
|
|
@ -85,6 +85,7 @@
|
|||
* \li Opendous-JTAG, an open source ARM JTAG debugger: http://code.google.com/p/opendous-jtag/
|
||||
* \li Openkubus, an open source hardware-based authentication dongle: http://code.google.com/p/openkubus/
|
||||
* \li Orbee, a USB connected RGB Orb for notifications: http://www.franksworkshop.com.au/Electronics/Orbee/Orbee.htm
|
||||
* \li PPM signal generator over USB: https://github.com/G33KatWork/USBPPM
|
||||
* \li Programmable keyboard controller: http://41j.com/blog/2011/10/a-programmable-keyboard-controller/
|
||||
* \li Programmable XBOX controller: http://richard-burke.dyndns.org/wordpress/pan-galactic-gargantuan-gargle-brain-aka-xbox-360-usb-controller/
|
||||
* \li PSGroove, a Playstation 3 Homebrew dongle: http://github.com/psgroove
|
||||
|
@ -104,6 +105,7 @@
|
|||
* \li Stylophone, with USB MIDI connectivity: http://www.waitingforfriday.com/index.php/Stylophone_Studio_5
|
||||
* \li Teensy SD Card .WAV file player: http://elasticsheep.com/2010/04/teensy2-usb-wav-player-part-1/
|
||||
* \li Touchscreen Input Device: http://capnstech.blogspot.com/2010/07/touchscreen-update.html
|
||||
* \li UDFS, a BBC Micro USB disk filing system: https://github.com/makestuff/udfs
|
||||
* \li Universal USB AVR Module: http://usbavr.bplaced.net/
|
||||
* \li USB2AX, a USB to Dynamixel network adapter: http://paranoidstudio.assembla.com/wiki/show/paranoidstudio/USB2AX
|
||||
* \li USB Infrared Receiver/Transmitter: http://vaton4.web2001.cz/
|
||||
|
|
|
@ -43,6 +43,8 @@
|
|||
* \li \subpage Page_DeviceSupport - Current Device and Hardware Support
|
||||
* \li \subpage Page_ChangeLog - Project Changelog
|
||||
* \li \subpage Page_FutureChanges - Planned Changes to the Library
|
||||
* \li \subpage Page_GettingStarted - Getting started with LUFA
|
||||
* \li \subpage Page_DevelopingWithLUFA - Developing with LUFA
|
||||
* \li \subpage Page_LUFAPoweredProjects - Other Projects Using LUFA
|
||||
* \li \subpage Page_Resources - LUFA and USB Related Resources
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue