Skip to content

Commit

Permalink
LUFA-IAR-Port: Merge in latest trunk.
Browse files Browse the repository at this point in the history
git-svn-id: http://lufa-lib.googlecode.com/svn@2431 d5102386-fcda-11dd-9fdb-3debd5008f28
  • Loading branch information
Dean authored and Dean committed Jul 31, 2012
1 parent da5d422 commit 2badfb1
Show file tree
Hide file tree
Showing 240 changed files with 2,280 additions and 2,171 deletions.
2 changes: 1 addition & 1 deletion branches/LUFA-IAR-Port/Bootloaders/CDC/BootloaderCDC.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion branches/LUFA-IAR-Port/Bootloaders/CDC/BootloaderCDC.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
26 changes: 21 additions & 5 deletions branches/LUFA-IAR-Port/Bootloaders/CDC/Descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ const USB_Descriptor_Device_t DeviceDescriptor =
.ProductID = 0x204A,
.ReleaseNumber = VERSION_BCD(01.00),

.ManufacturerStrIndex = NO_DESCRIPTOR,
.ProductStrIndex = 0x01,
.ManufacturerStrIndex = 0x01,
.ProductStrIndex = 0x02,
.SerialNumStrIndex = NO_DESCRIPTOR,

.NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS
Expand Down Expand Up @@ -185,15 +185,26 @@ const USB_Descriptor_String_t LanguageString =
.UnicodeString = {LANGUAGE_ID_ENG}
};

/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable
* form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
* Descriptor.
*/
const USB_Descriptor_String_t PROGMEM ManufacturerString =
{
.Header = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},

.UnicodeString = L"Dean Camera"
};

/** Product descriptor string. This is a Unicode string containing the product's details in human readable form,
* and is read out upon request by the host when the appropriate string ID is requested, listed in the Device
* Descriptor.
*/
const USB_Descriptor_String_t ProductString =
{
.Header = {.Size = USB_STRING_LEN(18), .Type = DTYPE_String},
.Header = {.Size = USB_STRING_LEN(19), .Type = DTYPE_String},

.UnicodeString = L"AVR CDC Bootloader"
.UnicodeString = L"LUFA CDC Bootloader"
};

/** This function is called by the library when in device mode, and must be overridden (see LUFA library "USB Descriptors"
Expand Down Expand Up @@ -228,7 +239,12 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
Address = &LanguageString;
Size = LanguageString.Header.Size;
}
else
else if (DescriptorNumber == 0x01)
{
Address = &ManufacturerString;
Size = ManufacturerString.Header.Size;
}
else if (DescriptorNumber == 0x02)
{
Address = &ProductString;
Size = ProductString.Header.Size;
Expand Down
10 changes: 4 additions & 6 deletions branches/LUFA-IAR-Port/Bootloaders/CDC/Doxygen.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Doxyfile 1.8.1
# Doxyfile 1.8.1.2

# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
Expand Down Expand Up @@ -588,7 +588,7 @@ FILE_VERSION_FILTER =

# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
# by doxygen. The layout file controls the global structure of the generated
# output files in an output format independent way. The create the layout file
# output files in an output format independent way. To create the layout file
# that represents doxygen's defaults, run doxygen with the -l option.
# You can optionally specify a file name after the option, if omitted
# DoxygenLayout.xml will be used as the name of the layout file.
Expand Down Expand Up @@ -804,7 +804,7 @@ INLINE_SOURCES = NO

# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
# doxygen to hide any special comment blocks from generated source code
# fragments. Normal C and C++ comments will always remain visible.
# fragments. Normal C, C++ and Fortran comments will always remain visible.

STRIP_CODE_COMMENTS = YES

Expand Down Expand Up @@ -956,9 +956,7 @@ HTML_TIMESTAMP = NO

# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
# page has loaded. For this to work a browser that supports
# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
# page has loaded.

HTML_DYNAMIC_SECTIONS = YES

Expand Down
84 changes: 19 additions & 65 deletions branches/LUFA-IAR-Port/Bootloaders/CDC/LUFA CDC Bootloader.inf
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
16 changes: 8 additions & 8 deletions branches/LUFA-IAR-Port/Bootloaders/CDC/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ F_USB = $(F_CPU)
OPTIMIZATION = s
TARGET = BootloaderCDC
SRC = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S $(LUFA_SRC_USB)
LUFA_PATH = ../../LUFA/
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)

Expand All @@ -43,10 +43,10 @@ BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, signatures, Signatures, 8
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.cppcheck.in
include $(LUFA_PATH)/Build/lufa.doxygen.in
include $(LUFA_PATH)/Build/lufa.avrdude.in
include $(LUFA_PATH)/Build/lufa.atprogram.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
2 changes: 1 addition & 1 deletion branches/LUFA-IAR-Port/Bootloaders/DFU/BootloaderDFU.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static uint16_t EndAddr = 0x0000;
* 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
Expand Down
2 changes: 1 addition & 1 deletion branches/LUFA-IAR-Port/Bootloaders/DFU/BootloaderDFU.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#define BOOTLOADER_VERSION_REV 0

/** Magic bootloader key to unlock forced application start mode. */
#define MAGIC_BOOT_KEY 0xDC42CACA
#define MAGIC_BOOT_KEY 0xDC42

/** Complete bootloader version number expressed as a packed byte, constructed from the
* two individual bootloader version macros.
Expand Down
3 changes: 2 additions & 1 deletion branches/LUFA-IAR-Port/Bootloaders/DFU/BootloaderDFU.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
* </tr>
* <tr>
* <td><b>Supported USB Speeds:</b></td>
* <td>Full Speed Mode</td>
* <td>Low Speed Mode \n
* Full Speed Mode</td>
* </tr>
* </table>
*
Expand Down
4 changes: 2 additions & 2 deletions branches/LUFA-IAR-Port/Bootloaders/DFU/Descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ const USB_Descriptor_String_t PROGMEM ManufacturerString =
*/
const USB_Descriptor_String_t ProductString =
{
.Header = {.Size = USB_STRING_LEN(18), .Type = DTYPE_String},
.Header = {.Size = USB_STRING_LEN(19), .Type = DTYPE_String},

.UnicodeString = L"AVR DFU Bootloader"
.UnicodeString = L"LUFA DFU Bootloader"
};

/** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors"
Expand Down
10 changes: 4 additions & 6 deletions branches/LUFA-IAR-Port/Bootloaders/DFU/Doxygen.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Doxyfile 1.8.1
# Doxyfile 1.8.1.2

# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
Expand Down Expand Up @@ -588,7 +588,7 @@ FILE_VERSION_FILTER =

# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
# by doxygen. The layout file controls the global structure of the generated
# output files in an output format independent way. The create the layout file
# output files in an output format independent way. To create the layout file
# that represents doxygen's defaults, run doxygen with the -l option.
# You can optionally specify a file name after the option, if omitted
# DoxygenLayout.xml will be used as the name of the layout file.
Expand Down Expand Up @@ -804,7 +804,7 @@ INLINE_SOURCES = NO

# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
# doxygen to hide any special comment blocks from generated source code
# fragments. Normal C and C++ comments will always remain visible.
# fragments. Normal C, C++ and Fortran comments will always remain visible.

STRIP_CODE_COMMENTS = YES

Expand Down Expand Up @@ -956,9 +956,7 @@ HTML_TIMESTAMP = NO

# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
# page has loaded. For this to work a browser that supports
# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
# page has loaded.

HTML_DYNAMIC_SECTIONS = YES

Expand Down
16 changes: 8 additions & 8 deletions branches/LUFA-IAR-Port/Bootloaders/DFU/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ F_USB = $(F_CPU)
OPTIMIZATION = s
TARGET = BootloaderDFU
SRC = $(TARGET).c Descriptors.c BootloaderAPI.c BootloaderAPITable.S $(LUFA_SRC_USB)
LUFA_PATH = ../../LUFA/
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)

Expand All @@ -43,10 +43,10 @@ BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, signatures, Signatures, 8
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.cppcheck.in
include $(LUFA_PATH)/Build/lufa.doxygen.in
include $(LUFA_PATH)/Build/lufa.avrdude.in
include $(LUFA_PATH)/Build/lufa.atprogram.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
2 changes: 1 addition & 1 deletion branches/LUFA-IAR-Port/Bootloaders/HID/BootloaderHID.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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
Expand Down
8 changes: 4 additions & 4 deletions branches/LUFA-IAR-Port/Bootloaders/HID/BootloaderHID.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@

/** \file
*
* Header file for TeensyHID.c.
* Header file for BootloaderHID.c.
*/

#ifndef _TEENSYHID_H_
#define _TEENSYHID_H_
#ifndef _BOOTLOADERHID_H_
#define _BOOTLOADERHID_H_
/* Includes: */
#include <avr/io.h>
Expand All @@ -53,7 +53,7 @@
#define COMMAND_STARTAPPLICATION 0xFFFF

/** Magic bootloader key to unlock forced application start mode. */
#define MAGIC_BOOT_KEY 0xDC42CACA
#define MAGIC_BOOT_KEY 0xDC42

/* Function Prototypes: */
static void SetupHardware(void);
Expand Down
Loading

0 comments on commit 2badfb1

Please sign in to comment.