Permalink
Browse files

Tag for the LUFA-120730-BETA release.

git-svn-id: http://lufa-lib.googlecode.com/svn/tags/LUFA-120730-BETA@2407 d5102386-fcda-11dd-9fdb-3debd5008f28
  • Loading branch information...
Dean Dean
Dean authored and Dean committed Jul 16, 2012
1 parent a0a30d5 commit 2eb47bea14a5c98eddcedbc4ff38583d9bfbb1d3
Showing with 12,253 additions and 18,233 deletions.
  1. +2 −0 Bootloaders/CDC/BootloaderAPI.c
  2. +39 −33 Bootloaders/CDC/BootloaderAPITable.S
  3. +22 −1 Bootloaders/CDC/BootloaderCDC.c
  4. +1 −1 Bootloaders/CDC/BootloaderCDC.h
  5. +19 −65 Bootloaders/CDC/LUFA CDC Bootloader.inf
  6. +28 −22 Bootloaders/CDC/makefile
  7. +2 −0 Bootloaders/DFU/BootloaderAPI.c
  8. +38 −32 Bootloaders/DFU/BootloaderAPITable.S
  9. +22 −18 Bootloaders/DFU/BootloaderDFU.c
  10. +1 −1 Bootloaders/DFU/BootloaderDFU.h
  11. +2 −1 Bootloaders/DFU/BootloaderDFU.txt
  12. +19 −3 Bootloaders/DFU/Descriptors.c
  13. +28 −22 Bootloaders/DFU/makefile
  14. +1 −1 Bootloaders/HID/BootloaderHID.c
  15. +4 −4 Bootloaders/HID/BootloaderHID.h
  16. +20 −21 Bootloaders/HID/makefile
  17. +27 −11 Bootloaders/makefile
  18. +72 −72 BuildTests/BoardDriverTest/BoardDeviceMap.cfg
  19. +68 −63 BuildTests/BoardDriverTest/makefile
  20. +0 −723 BuildTests/BoardDriverTest/makefile.avr8
  21. +25 −0 BuildTests/BoardDriverTest/makefile.test
  22. +0 −486 BuildTests/BoardDriverTest/makefile.uc3
  23. +0 −705 BuildTests/BoardDriverTest/makefile.xmega
  24. +62 −62 BuildTests/BootloaderTest/BootloaderDeviceMap.cfg
  25. +63 −58 BuildTests/BootloaderTest/makefile
  26. +41 −41 BuildTests/ModuleTest/Dummy.S
  27. +57 −57 BuildTests/ModuleTest/Modules.h
  28. +30 −30 BuildTests/ModuleTest/Test_C.c
  29. +30 −30 BuildTests/ModuleTest/Test_CPP.cpp
  30. +66 −57 BuildTests/ModuleTest/makefile
  31. +0 −742 BuildTests/ModuleTest/makefile.avr8
  32. +66 −0 BuildTests/ModuleTest/makefile.test
  33. +0 −513 BuildTests/ModuleTest/makefile.uc3
  34. +0 −733 BuildTests/ModuleTest/makefile.xmega
  35. +42 −41 BuildTests/SingleUSBModeTest/Dummy.S
  36. +32 −32 BuildTests/SingleUSBModeTest/Test.c
  37. +56 −45 BuildTests/SingleUSBModeTest/makefile
  38. +0 −724 BuildTests/SingleUSBModeTest/makefile.avr8
  39. +67 −0 BuildTests/SingleUSBModeTest/makefile.test
  40. +0 −487 BuildTests/SingleUSBModeTest/makefile.uc3
  41. +0 −706 BuildTests/SingleUSBModeTest/makefile.xmega
  42. +39 −49 BuildTests/StaticAnalysisTest/makefile
  43. +24 −19 BuildTests/makefile
  44. +2 −2 Demos/Device/ClassDriver/AudioInput/AudioInput.c
  45. +10 −7 Demos/Device/ClassDriver/AudioInput/makefile
  46. +2 −2 Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
  47. +10 −7 Demos/Device/ClassDriver/AudioOutput/makefile
  48. +19 −65 Demos/Device/ClassDriver/DualVirtualSerial/LUFA DualVirtualSerial.inf
  49. +10 −7 Demos/Device/ClassDriver/DualVirtualSerial/makefile
  50. +10 −7 Demos/Device/ClassDriver/GenericHID/makefile
  51. +10 −7 Demos/Device/ClassDriver/Joystick/makefile
  52. +10 −7 Demos/Device/ClassDriver/Keyboard/makefile
  53. +10 −7 Demos/Device/ClassDriver/KeyboardMouse/makefile
  54. +10 −7 Demos/Device/ClassDriver/KeyboardMouseMultiReport/makefile
  55. +10 −7 Demos/Device/ClassDriver/MIDI/makefile
  56. +10 −7 Demos/Device/ClassDriver/MassStorage/makefile
  57. +10 −7 Demos/Device/ClassDriver/MassStorageKeyboard/makefile
  58. +10 −7 Demos/Device/ClassDriver/Mouse/makefile
  59. +37 −37 Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.c
  60. +5 −5 Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.h
  61. +10 −7 Demos/Device/ClassDriver/RNDISEthernet/makefile
  62. +19 −65 Demos/Device/ClassDriver/VirtualSerial/LUFA VirtualSerial.inf
  63. +10 −7 Demos/Device/ClassDriver/VirtualSerial/makefile
  64. +19 −65 Demos/Device/ClassDriver/VirtualSerialMassStorage/LUFA VirtualSerialMassStorage.inf
  65. +10 −7 Demos/Device/ClassDriver/VirtualSerialMassStorage/makefile
  66. +19 −65 Demos/Device/ClassDriver/VirtualSerialMouse/LUFA VirtualSerialMouse.inf
  67. +10 −7 Demos/Device/ClassDriver/VirtualSerialMouse/makefile
  68. +30 −35 Demos/Device/ClassDriver/makefile
  69. +12 −8 Demos/Device/Incomplete/Sideshow/makefile
  70. +83 −83 Demos/Device/Incomplete/TestAndMeasurement/Descriptors.h
  71. +4 −4 Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
  72. +148 −148 Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.h
  73. +11 −8 Demos/Device/Incomplete/TestAndMeasurement/makefile
  74. +10 −7 Demos/Device/LowLevel/AudioInput/makefile
  75. +10 −7 Demos/Device/LowLevel/AudioOutput/makefile
  76. +19 −65 Demos/Device/LowLevel/DualVirtualSerial/LUFA DualVirtualSerial.inf
  77. +10 −7 Demos/Device/LowLevel/DualVirtualSerial/makefile
  78. +10 −7 Demos/Device/LowLevel/GenericHID/makefile
  79. +10 −7 Demos/Device/LowLevel/Joystick/makefile
  80. +10 −7 Demos/Device/LowLevel/Keyboard/makefile
  81. +0 −1 Demos/Device/LowLevel/KeyboardMouse/Descriptors.h
  82. +1 −1 Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c
  83. +10 −7 Demos/Device/LowLevel/KeyboardMouse/makefile
  84. +10 −7 Demos/Device/LowLevel/MIDI/makefile
  85. +10 −7 Demos/Device/LowLevel/MassStorage/makefile
  86. +10 −7 Demos/Device/LowLevel/Mouse/makefile
  87. +36 −36 Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.c
  88. +5 −5 Demos/Device/LowLevel/RNDISEthernet/Lib/TCP.h
  89. +10 −7 Demos/Device/LowLevel/RNDISEthernet/makefile
  90. +19 −65 Demos/Device/LowLevel/VirtualSerial/LUFA VirtualSerial.inf
  91. +10 −7 Demos/Device/LowLevel/VirtualSerial/makefile
  92. +30 −27 Demos/Device/LowLevel/makefile
  93. +10 −7 Demos/DualRole/ClassDriver/MouseHostDevice/makefile
  94. +29 −4 Demos/DualRole/ClassDriver/makefile
  95. +1 −1 Demos/DualRole/makefile
  96. +231 −231 Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c
  97. +77 −77 Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h
  98. +10 −7 Demos/Host/ClassDriver/AndroidAccessoryHost/makefile
  99. +10 −7 Demos/Host/ClassDriver/AudioInputHost/makefile
  100. +10 −7 Demos/Host/ClassDriver/AudioOutputHost/makefile
  101. +10 −7 Demos/Host/ClassDriver/JoystickHostWithParser/makefile
  102. +10 −7 Demos/Host/ClassDriver/KeyboardHost/makefile
  103. +10 −7 Demos/Host/ClassDriver/KeyboardHostWithParser/makefile
  104. +1 −1 Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
  105. +10 −7 Demos/Host/ClassDriver/MIDIHost/makefile
  106. +10 −7 Demos/Host/ClassDriver/MassStorageHost/makefile
  107. +10 −7 Demos/Host/ClassDriver/MouseHost/makefile
  108. +10 −7 Demos/Host/ClassDriver/MouseHostWithParser/makefile
  109. +10 −7 Demos/Host/ClassDriver/PrinterHost/makefile
  110. +10 −7 Demos/Host/ClassDriver/RNDISEthernetHost/makefile
  111. +10 −7 Demos/Host/ClassDriver/StillImageHost/makefile
  112. +10 −7 Demos/Host/ClassDriver/VirtualSerialHost/makefile
  113. +30 −31 Demos/Host/ClassDriver/makefile
  114. +10 −7 Demos/Host/LowLevel/AndroidAccessoryHost/makefile
  115. +10 −7 Demos/Host/LowLevel/AudioInputHost/makefile
  116. +10 −7 Demos/Host/LowLevel/AudioOutputHost/makefile
  117. +10 −7 Demos/Host/LowLevel/GenericHIDHost/makefile
  118. +10 −7 Demos/Host/LowLevel/JoystickHostWithParser/makefile
  119. +10 −7 Demos/Host/LowLevel/KeyboardHost/makefile
  120. +10 −7 Demos/Host/LowLevel/KeyboardHostWithParser/makefile
  121. +10 −7 Demos/Host/LowLevel/MIDIHost/makefile
  122. +1 −1 Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
  123. +10 −7 Demos/Host/LowLevel/MassStorageHost/makefile
  124. +10 −7 Demos/Host/LowLevel/MouseHost/makefile
  125. +10 −7 Demos/Host/LowLevel/MouseHostWithParser/makefile
  126. +10 −7 Demos/Host/LowLevel/PrinterHost/makefile
  127. +10 −7 Demos/Host/LowLevel/RNDISEthernetHost/makefile
  128. +10 −7 Demos/Host/LowLevel/StillImageHost/makefile
  129. +10 −7 Demos/Host/LowLevel/VirtualSerialHost/makefile
  130. +30 −32 Demos/Host/LowLevel/makefile
  131. +1 −1 LUFA.pnproj
  132. +61 −0 LUFA/Build/HID_EEPROM_Loader/HID_EEPROM_Loader.c
  133. +40 −0 LUFA/Build/HID_EEPROM_Loader/makefile
  134. +0 −54 LUFA/Build/lufa.avrdude.in
  135. +0 −182 LUFA/Build/lufa.build.in
  136. +0 −73 LUFA/Build/lufa.core.in
  137. +0 −52 LUFA/Build/lufa.doxygen.in
  138. +0 −86 LUFA/Build/lufa.sources.in
  139. +101 −0 LUFA/Build/lufa_atprogram.mk
  140. +84 −0 LUFA/Build/lufa_avrdude.mk
  141. +296 −0 LUFA/Build/lufa_build.mk
  142. +152 −0 LUFA/Build/lufa_core.mk
  143. +104 −0 LUFA/Build/lufa_cppcheck.mk
  144. +93 −71 LUFA/Build/{lufa.dfu.in → lufa_dfu.mk}
  145. +81 −0 LUFA/Build/lufa_doxygen.mk
  146. +88 −0 LUFA/Build/lufa_hid.mk
  147. +116 −0 LUFA/Build/lufa_sources.mk
  148. +1 −0 LUFA/CodeTemplates/LUFAConfig.h
  149. +36 −33 LUFA/CodeTemplates/makefile_template
  150. +0 −715 LUFA/CodeTemplates/makefile_template.avr8
  151. +0 −489 LUFA/CodeTemplates/makefile_template.uc3
  152. +0 −707 LUFA/CodeTemplates/makefile_template.xmega
  153. +19 −1 LUFA/Common/ArchitectureSpecific.h
  154. +1 −1 LUFA/Common/Attributes.h
  155. +2 −1 LUFA/Common/Common.h
  156. +1 −1 LUFA/Doxygen.conf
  157. +846 −0 LUFA/DoxygenPages/BuildSystem.txt
  158. +7 −2 LUFA/DoxygenPages/ChangeLog.txt
  159. +4 −0 LUFA/DoxygenPages/CompileTimeTokens.txt
  160. +3 −1 LUFA/DoxygenPages/CompilingApps.txt
  161. +46 −31 LUFA/DoxygenPages/ConfiguringApps.txt
  162. +1 −0 LUFA/DoxygenPages/DevelopingWithLUFA.txt
  163. +4 −2 LUFA/DoxygenPages/DeviceSupport.txt
  164. +106 −106 LUFA/DoxygenPages/ExportingLibrary.txt
  165. +0 −2 LUFA/DoxygenPages/FutureChanges.txt
  166. +0 −5 LUFA/DoxygenPages/Groups.txt
  167. +44 −40 LUFA/DoxygenPages/KnownIssues.txt
  168. +6 −0 LUFA/DoxygenPages/LUFAPoweredProjects.txt
  169. +4 −1 LUFA/DoxygenPages/MigrationInformation.txt
  170. +6 −3 LUFA/DoxygenPages/ProgrammingApps.txt
  171. +1,122 −1,122 LUFA/DoxygenPages/Style/Style.css
  172. +161 −161 LUFA/Drivers/Board/AVR8/BIGMULTIO/LEDs.h
  173. +207 −207 LUFA/Drivers/Board/AVR8/MICROPENDOUS/Buttons.h
  174. +2 −2 LUFA/Drivers/Board/AVR8/MICROPENDOUS/LEDs.h
  175. +161 −161 LUFA/Drivers/Board/AVR8/MULTIO/LEDs.h
  176. +112 −112 LUFA/Drivers/Board/AVR8/USB2AX/Buttons.h
  177. +195 −195 LUFA/Drivers/Board/AVR8/USB2AX/LEDs.h
  178. +1 −1 LUFA/Drivers/Board/Buttons.h
  179. +1 −1 LUFA/Drivers/Board/Joystick.h
  180. +2 −2 LUFA/Drivers/Board/LEDs.h
  181. +1 −1 LUFA/Drivers/Board/UC3/EVK1101/Buttons.h
  182. +1 −1 LUFA/Drivers/Peripheral/AVR8/ADC_AVR8.h
  183. +75 −75 LUFA/Drivers/USB/Class/AndroidAccessoryClass.h
  184. +127 −127 LUFA/Drivers/USB/Class/Common/AndroidAccessoryClassCommon.h
  185. +2 −2 LUFA/Drivers/USB/Class/Device/AudioClassDevice.h
  186. +3 −1 LUFA/Drivers/USB/Class/Device/CDCClassDevice.h
  187. +1 −1 LUFA/Drivers/USB/Class/Device/MIDIClassDevice.h
  188. +421 −421 LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.c
  189. +313 −313 LUFA/Drivers/USB/Class/Host/AndroidAccessoryClassHost.h
  190. +3 −1 LUFA/Drivers/USB/Class/Host/CDCClassHost.h
  191. +1 −1 LUFA/Drivers/USB/Class/Host/HIDClassHost.h
  192. +1 −1 LUFA/Drivers/USB/Class/Host/MIDIClassHost.h
  193. +273 −273 LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c
  194. +647 −647 LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.h
  195. +6 −1 LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.h
  196. +221 −221 LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.c
  197. +441 −441 LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.h
  198. +3 −0 LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c
  199. +1 −1 LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h
  200. +1 −1 LUFA/Drivers/USB/Core/{ConfigDescriptor.c → ConfigDescriptors.c}
  201. +1 −1 LUFA/Drivers/USB/Core/{ConfigDescriptor.h → ConfigDescriptors.h}
  202. +2 −2 LUFA/Drivers/USB/Core/Events.h
  203. +1 −1 LUFA/Drivers/USB/Core/HostStandardReq.h
  204. +1 −1 LUFA/Drivers/USB/Core/StdDescriptors.h
  205. +233 −233 LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.c
  206. +433 −433 LUFA/Drivers/USB/Core/UC3/EndpointStream_UC3.h
  207. +1 −1 LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.c
  208. +9 −4 LUFA/Drivers/USB/Core/UC3/Endpoint_UC3.h
  209. +166 −166 LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.c
  210. +351 −351 LUFA/Drivers/USB/Core/UC3/PipeStream_UC3.h
  211. +4 −1 LUFA/Drivers/USB/Core/UC3/Pipe_UC3.c
  212. +1 −1 LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h
  213. +1 −1 LUFA/Drivers/USB/Core/UC3/USBController_UC3.c
  214. +1 −1 LUFA/Drivers/USB/Core/UC3/USBController_UC3.h
  215. +273 −273 LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.c
  216. +647 −647 LUFA/Drivers/USB/Core/XMEGA/EndpointStream_XMEGA.h
  217. +11 −3 LUFA/Drivers/USB/Core/XMEGA/Endpoint_XMEGA.h
  218. +1 −1 LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.c
  219. +1 −1 LUFA/Drivers/USB/Core/XMEGA/USBController_XMEGA.h
  220. +2 −2 LUFA/Drivers/USB/USB.h
  221. +80 −0 LUFA/Platform/Platform.h
  222. +27 −14 LUFA/Platform/UC3/ClockManagement.h
  223. +5 −5 LUFA/Platform/UC3/InterruptManagement.h
  224. +4 −4 LUFA/Platform/XMEGA/ClockManagement.h
  225. +2 −2 LUFA/Version.h
  226. +20 −12 LUFA/makefile
  227. +1 −1 Maintenance/AS4Template.aps
  228. +94 −91 Maintenance/makefile
  229. +6 −2 Projects/AVRISP-MKII/AVRISPDescriptors.c
  230. +2 −0 Projects/AVRISP-MKII/AVRISPDescriptors.h
  231. +1 −1 Projects/AVRISP-MKII/Lib/ISP/ISPTarget.c
  232. +10 −7 Projects/AVRISP-MKII/makefile
  233. +19 −65 Projects/Benito/Benito Programmer.inf
  234. +10 −7 Projects/Benito/makefile
  235. +10 −7 Projects/HIDReportViewer/makefile
  236. +19 −65 Projects/LEDNotifier/LUFA LED Notifier.inf
  237. +10 −7 Projects/LEDNotifier/makefile
  238. +10 −7 Projects/MIDIToneGenerator/makefile
  239. +1 −1 Projects/Magstripe/Lib/CircularBitBuffer.h
  240. +1 −1 Projects/Magstripe/Lib/MagstripeHW.h
  241. +10 −7 Projects/Magstripe/makefile
  242. +10 −7 Projects/MediaController/makefile
  243. +10 −7 Projects/MissileLauncher/makefile
  244. +10 −7 Projects/RelayBoard/makefile
  245. +1 −1 Projects/SerialToLCD/Lib/HD44780.c
  246. +1 −1 Projects/SerialToLCD/Lib/HD44780.h
  247. +1 −1 Projects/SerialToLCD/SerialToLCD.c
  248. +97 −97 Projects/SerialToLCD/SerialToLCD.txt
  249. +36 −34 Projects/SerialToLCD/makefile
  250. +1 −1 Projects/TempDataLogger/Lib/DataflashManager.h
  251. +1 −1 Projects/TempDataLogger/TempDataLogger.c
  252. +1 −1 Projects/TempDataLogger/TempLogHostApp/DataLoggerSettings.Designer.cs
  253. +2 −2 Projects/TempDataLogger/TempLogHostApp/DataLoggerSettings.cs
  254. +1 −1 Projects/TempDataLogger/TempLogHostApp/Properties/AssemblyInfo.cs
  255. +10 −7 Projects/TempDataLogger/makefile
  256. +19 −65 Projects/USBtoSerial/LUFA USBtoSerial.inf
  257. +10 −7 Projects/USBtoSerial/makefile
  258. +1 −1 Projects/Webserver/Lib/DataflashManager.h
  259. +2 −2 Projects/Webserver/Lib/uip/uip.c
  260. +10 −7 Projects/Webserver/makefile
  261. +19 −65 Projects/XPLAINBridge/LUFA XPLAIN Bridge.inf
  262. +11 −9 Projects/XPLAINBridge/makefile
  263. +31 −31 Projects/makefile
  264. +3 −0 README.txt
  265. +8 −7 makefile
@@ -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();
}
@@ -1,6 +1,6 @@
/*
LUFA Library
- Copyright (C) Dean Camera, 2011.
+ Copyright (C) Dean Camera, 2012.
dean [at] fourwalledcubicle [dot] com
www.lufa-lib.org
@@ -28,41 +28,44 @@
this software.
*/
-; 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:
- 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_UNUSED1:
- ret
-BootloaderAPU_UNUSED2:
- ret
-BootloaderAPU_UNUSED3:
- ret
-BootloaderAPU_UNUSED4:
- ret
-BootloaderAPU_UNUSED5:
- ret
+.section .apitable_trampolines, "ax"
+.global BootloaderAPI_Trampolines
+BootloaderAPI_Trampolines:
+
+ 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_UNUSED1:
+ ret
+ BootloaderAPU_UNUSED2:
+ ret
+ BootloaderAPU_UNUSED3:
+ ret
+ BootloaderAPU_UNUSED4:
+ ret
+ BootloaderAPU_UNUSED5:
+ ret
+
+
; API function jump table
-.org (96 - 32)
+.section .apitable_jumptable, "ax"
.global BootloaderAPI_JumpTable
BootloaderAPI_JumpTable:
+
rjmp BootloaderAPI_ErasePage_Trampoline
rjmp BootloaderAPI_WritePage_Trampoline
rjmp BootloaderAPI_FillWord_Trampoline
@@ -76,10 +79,13 @@ BootloaderAPI_JumpTable:
rjmp BootloaderAPU_UNUSED4 ; UNUSED ENTRY 4
rjmp BootloaderAPU_UNUSED5 ; UNUSED ENTRY 5
+
+
; Bootloader table signatures and information
-.org (96 - 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 0xDFB1 ; Signature for the DFU class bootloader, V1
.word 0xDCFB ; Signature for a LUFA class bootloader
@@ -61,7 +61,7 @@ static bool RunBootloader = true;
* low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
* \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
*/
-uint32_t MagicBootKey ATTR_NO_INIT;
+uint16_t MagicBootKey ATTR_NO_INIT;
/** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
@@ -70,8 +70,29 @@ uint32_t MagicBootKey ATTR_NO_INIT;
*/
void Application_Jump_Check(void)
{
+ bool JumpToApplication = false;
+
+ #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1))
+ /* Disable JTAG debugging */
+ JTAG_DISABLE();
+
+ /* Enable pull-up on the JTAG TCK pin so we can use it to select the mode */
+ PORTF |= (1 << 4);
+ Delay_MS(10);
+
+ /* If the TCK pin is not jumpered to ground, start the user application instead */
+ JumpToApplication |= ((PINF & (1 << 4)) != 0);
+
+ /* Re-enable JTAG debugging */
+ JTAG_ENABLE();
+ #endif
+
/* If the reset source was the bootloader and the key is correct, clear it and jump to the application */
if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY))
+ JumpToApplication |= true;
+
+ /* If a request has been made to jump to the user application, honor it */
+ if (JumpToApplication)
{
/* Turn off the watchdog */
MCUSR &= ~(1<<WDRF);
@@ -69,7 +69,7 @@
#define SOFTWARE_IDENTIFIER "LUFACDC"
/** Magic bootloader key to unlock forced application start mode. */
- #define MAGIC_BOOT_KEY 0xDC42CACA
+ #define MAGIC_BOOT_KEY 0xDC42
/* Type Defines: */
/** Type define for a non-returning pointer to the start of the loaded application in flash memory. */
@@ -1,78 +1,36 @@
;************************************************************
; Windows USB CDC ACM Setup File
; Copyright (c) 2000 Microsoft Corporation
-
+;************************************************************
[Version]
Signature="$Windows NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%MFGNAME%
-LayoutFile=layout.inf
-CatalogFile=%MFGFILENAME%.cat
-DriverVer=11/15/2007,5.1.2600.0
+DriverVer=7/1/2012,10.0.0.0
[Manufacturer]
-%MFGNAME%=DeviceList, NTamd64
-
-[DestinationDirs]
-DefaultDestDir=12
-
-
-;------------------------------------------------------------------------------
-; Windows 2000/XP/Vista-32bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.nt]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.nt
-AddReg=DriverInstall.nt.AddReg
-
-[DriverCopyFiles.nt]
-usbser.sys,,,0x20
-
-[DriverInstall.nt.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+%MFGNAME%=DeviceList, NTx86, NTamd64, NTia64
-[DriverInstall.nt.Services]
-AddService=usbser, 0x00000002, DriverService.nt
-
-[DriverService.nt]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
-
-;------------------------------------------------------------------------------
-; Vista-64bit Sections
-;------------------------------------------------------------------------------
-
-[DriverInstall.NTamd64]
-include=mdmcpq.inf
-CopyFiles=DriverCopyFiles.NTamd64
-AddReg=DriverInstall.NTamd64.AddReg
+[SourceDisksNames]
-[DriverCopyFiles.NTamd64]
-%DRIVERFILENAME%.sys,,,0x20
+[SourceDisksFiles]
-[DriverInstall.NTamd64.AddReg]
-HKR,,DevLoader,,*ntkern
-HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
-HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+[DestinationDirs]
+DefaultDestDir=12
-[DriverInstall.NTamd64.Services]
-AddService=usbser, 0x00000002, DriverService.NTamd64
+[DriverInstall]
+Include=mdmcpq.inf
+CopyFiles=FakeModemCopyFileSection
+AddReg=DriverInstall.AddReg
-[DriverService.NTamd64]
-DisplayName=%SERVICE%
-ServiceType=1
-StartType=3
-ErrorControl=1
-ServiceBinary=%12%\%DRIVERFILENAME%.sys
+[DriverInstall.Services]
+Include=mdmcpq.inf
+AddService=usbser, 0x00000002, LowerFilter_Service_Inst
+[DriverInstall.AddReg]
+HKR,,EnumPropPages32,,"msports.dll,SerialPortPropPageProvider"
;------------------------------------------------------------------------------
; Vendor and Product ID Definitions
@@ -83,24 +41,20 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
; Note: One INF file can be used for multiple devices with different VID and PIDs.
; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
;------------------------------------------------------------------------------
-[SourceDisksFiles]
-[SourceDisksNames]
[DeviceList]
%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204A
[DeviceList.NTamd64]
%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204A
+[DeviceList.NTia64]
+%DESCRIPTION%=DriverInstall, USB\VID_03EB&PID_204A
;------------------------------------------------------------------------------
; String Definitions
;------------------------------------------------------------------------------
;Modify these strings to customize your device
;------------------------------------------------------------------------------
[Strings]
-MFGFILENAME="CDC_vista"
-DRIVERFILENAME ="usbser"
MFGNAME="http://www.lufa-lib.org"
-INSTDISK="LUFA CDC Bootloader Driver Installer"
-DESCRIPTION="Communications Port"
-SERVICE="USB RS-232 Emulation Driver"
+DESCRIPTION="LUFA CDC Class Bootloader"
View
@@ -9,20 +9,6 @@
# LUFA Project Makefile.
# --------------------------------------
-# Starting byte address of the bootloader, as a byte address - computed via the formula
-# BOOT_START = ((FLASH_SIZE_KB - BOOT_SECTION_SIZE_KB) * 1024)
-#
-# Note that the bootloader size and start address given in AVRStudio is in words and not
-# bytes, and so will need to be doubled to obtain the byte address needed by AVR-GCC.
-FLASH_SIZE_KB = 128
-BOOT_SECTION_SIZE_KB = 8
-
-# Formulas used to calculate the starting address of the Bootloader section, and the User Application
-# 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) - 96)" | bc)
-
MCU = at90usb1287
ARCH = AVR8
BOARD = USBKEY
@@ -31,16 +17,36 @@ F_USB = $(F_CPU)
OPTIMIZATION = s
TARGET = BootloaderCDC
SRC = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S $(LUFA_SRC_USB)
-LUFA_PATH = ../../LUFA/
-CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START)
-LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START) -Wl,--section-start=.apitable=$(BOOT_API_TABLESTART) -Wl,--undefined=BootloaderAPI_JumpTable
+LUFA_PATH = ../../LUFA
+CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET)
+LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS)
+
+# Flash size and bootloader section sizes of the target, in KB. These must
+# match the target's total FLASH size and the bootloader size set in the
+# device's fuses.
+FLASH_SIZE_KB = 128
+BOOT_SECTION_SIZE_KB = 8
+
+# Bootloader address calculation formulas (requires the "bc" unix utility)
+# Do not modify these macros, but rather modify the depedant values above.
+BOOT_START_OFFSET = 0x$(shell echo "obase=16; ($(FLASH_SIZE_KB) - $(BOOT_SECTION_SIZE_KB)) * 1024" | bc)
+BOOT_SEC_OFFSET = 0x$(shell echo "obase=16; (($(FLASH_SIZE_KB) * 1024) - $(strip $(1)))" | bc)
+
+# 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, 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
all:
# Include LUFA build script makefiles
-include $(LUFA_PATH)/Build/lufa.core.in
-include $(LUFA_PATH)/Build/lufa.sources.in
-include $(LUFA_PATH)/Build/lufa.build.in
-include $(LUFA_PATH)/Build/lufa.doxygen.in
-include $(LUFA_PATH)/Build/lufa.avrdude.in
+include $(LUFA_PATH)/Build/lufa_core.mk
+include $(LUFA_PATH)/Build/lufa_sources.mk
+include $(LUFA_PATH)/Build/lufa_build.mk
+include $(LUFA_PATH)/Build/lufa_cppcheck.mk
+include $(LUFA_PATH)/Build/lufa_doxygen.mk
+include $(LUFA_PATH)/Build/lufa_avrdude.mk
+include $(LUFA_PATH)/Build/lufa_atprogram.mk
@@ -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();
}
Oops, something went wrong.

0 comments on commit 2eb47be

Please sign in to comment.