diff --git a/LUFA/CodeTemplates/LUFAConfig.h b/LUFA/CodeTemplates/LUFAConfig.h
index 9feb341ff3faa0ffacced353512f947cb7fb8a6b..e1b1f3682d6dd5c4aea6de642522218a9ce00f4d 100644
--- a/LUFA/CodeTemplates/LUFAConfig.h
+++ b/LUFA/CodeTemplates/LUFAConfig.h
@@ -84,6 +84,38 @@
 //		#define USB_HOST_TIMEOUT_MS              {Insert Value Here}
 //		#define HOST_DEVICE_SETTLE_DELAY_MS	     {Insert Value Here}
 
+	#elif (ARCH == ARCH_XMEGA)
+	
+		/* Non-USB Related Configuration Tokens: */
+//		#define DISABLE_TERMINAL_CODES
+
+		/* USB Class Driver Related Tokens: */
+//		#define HID_HOST_BOOT_PROTOCOL_ONLY
+//		#define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//		#define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//		#define HID_MAX_COLLECTIONS              {Insert Value Here}
+//		#define HID_MAX_REPORTITEMS              {Insert Value Here}
+//		#define HID_MAX_REPORT_IDS               {Insert Value Here}
+//		#define NO_CLASS_DRIVER_AUTOFLUSH
+
+		/* General USB Driver Related Tokens: */
+//		#define USE_STATIC_OPTIONS               {Insert Value Here}
+//		#define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//		#define NO_LIMITED_CONTROLLER_CONNECT
+//		#define NO_SOF_EVENTS
+
+		/* USB Device Mode Driver Related Tokens: */
+//		#define USE_RAM_DESCRIPTORS
+//		#define USE_FLASH_DESCRIPTORS
+//		#define USE_EEPROM_DESCRIPTORS
+//		#define NO_INTERNAL_SERIAL
+//		#define FIXED_CONTROL_ENDPOINT_SIZE      {Insert Value Here}
+//		#define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+//		#define FIXED_NUM_CONFIGURATION          {Insert Value Here}
+//		#define CONTROL_ONLY_DEVICE
+//		#define NO_DEVICE_REMOTE_WAKEUP
+//		#define NO_DEVICE_SELF_POWER
+
 	#elif (ARCH == ARCH_UC3)
 
 		/* Non-USB Related Configuration Tokens: */
diff --git a/LUFA/DoxygenPages/ChangeLog.txt b/LUFA/DoxygenPages/ChangeLog.txt
index 7737d9c591032202e37b22e5fcbccc5e715153c3..26b07df332e116f1913847a444f1bfc5811edec4 100644
--- a/LUFA/DoxygenPages/ChangeLog.txt
+++ b/LUFA/DoxygenPages/ChangeLog.txt
@@ -29,8 +29,8 @@
   *   - Fixed CDC class drivers not saving and sending all 16-bits of the control line states (thanks to Matthew Swabey)
   *   - Fixed race conditions in the CDC, HID and Mass Storage class drivers when processing some control requests
   *   - Fixed misspelled HID_KEYBOARD_MODIFIER_* macros in the HID class driver (thanks to Laszlo Monda)
-  *   - Fixed broken AVR32 endpoint/pipe communications when ORDERED_EP_CONFIG compile time option is not enabled (thanks to Matthias)
-  *   - Fixed broken compilation for the AVR32 devices if the NO_SOF_EVENTS compile time option was not enabled (thanks to Matthias)
+  *   - Fixed broken AVR32 endpoint/pipe communications when ORDERED_EP_CONFIG compile time option is not enabled (thanks to Matthias Jahr)
+  *   - Fixed broken compilation for the AVR32 devices if the NO_SOF_EVENTS compile time option was not enabled (thanks to Matthias Jahr)
   *  - Library Applications:
   *   - Added reliability patches to the AVRISP-MKII Clone project's PDI/TPI protocols (thanks to Justin Mattair)
   *   - Fixed AVRISP-MKII Clone compile warning on AVR8 U4 targets even when NO_VTARGET_DETECT is enabled
diff --git a/LUFA/Drivers/USB/Class/Common/HIDReportData.h b/LUFA/Drivers/USB/Class/Common/HIDReportData.h
index 952f393323db5ebc9ad9b55fbad1d4113cf5089c..2b96eeabc3e9f3023b262b2815247f2c0c199d55 100644
--- a/LUFA/Drivers/USB/Class/Common/HIDReportData.h
+++ b/LUFA/Drivers/USB/Class/Common/HIDReportData.h
@@ -69,8 +69,7 @@
 			#define _HID_RI_ENCODE_32(Data)                 _HID_RI_ENCODE_16(Data) _HID_RI_ENCODE_16(Data >> 16)
 			#define _HID_RI_ENCODE(DataBits, ...)           _HID_RI_ENCODE_ ## DataBits(__VA_ARGS__)
 			
-			#define _HID_RI_ENTRY(Type, Tag, DataBits, ...) \
-			                                                (Type | Tag | HID_RI_DATA_BITS(DataBits)) _HID_RI_ENCODE(DataBits, (__VA_ARGS__))
+			#define _HID_RI_ENTRY(Type, Tag, DataBits, ...) (Type | Tag | HID_RI_DATA_BITS(DataBits)) _HID_RI_ENCODE(DataBits, (__VA_ARGS__))
 	#endif
 	
 	/* Public Interface - May be used in end-application: */
diff --git a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
index ec41f5de3cb64e0770b4e7bc02b024414a3f8b77..7da3bb2f318d5027c41c1eed6c9040c7edd36b8d 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
@@ -69,6 +69,14 @@
 			#error USE_RAM_DESCRIPTORS and USE_EEPROM_DESCRIPTORS are mutually exclusive.
 		#endif
 
+		#if (defined(USE_FLASH_DESCRIPTORS) && defined(USE_EEPROM_DESCRIPTORS))
+			#error USE_FLASH_DESCRIPTORS and USE_EEPROM_DESCRIPTORS are mutually exclusive.
+		#endif
+
+		#if (defined(USE_FLASH_DESCRIPTORS) && defined(USE_RAM_DESCRIPTORS))
+			#error USE_FLASH_DESCRIPTORS and USE_RAM_DESCRIPTORS are mutually exclusive.
+		#endif
+
 	/* Public Interface - May be used in end-application: */
 		/* Macros: */
 			/** \name USB Device Mode Option Masks */
diff --git a/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h b/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
index 1c128dc1007fbaced27bf829b07d124874303a0f..91cc59517e81a4849b643c1b97eee01d97486d4c 100644
--- a/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
+++ b/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h
@@ -69,6 +69,14 @@
 			#error USE_RAM_DESCRIPTORS and USE_EEPROM_DESCRIPTORS are mutually exclusive.
 		#endif
 
+		#if (defined(USE_FLASH_DESCRIPTORS) && defined(USE_EEPROM_DESCRIPTORS))
+			#error USE_FLASH_DESCRIPTORS and USE_EEPROM_DESCRIPTORS are mutually exclusive.
+		#endif
+
+		#if (defined(USE_FLASH_DESCRIPTORS) && defined(USE_RAM_DESCRIPTORS))
+			#error USE_FLASH_DESCRIPTORS and USE_RAM_DESCRIPTORS are mutually exclusive.
+		#endif
+
 	/* Public Interface - May be used in end-application: */
 		/* Macros: */
 			/** \name USB Device Mode Option Masks */
@@ -90,26 +98,33 @@
 			#define USB_DEVICE_OPT_FULLSPEED       (0 << 0)
 			//@}
 			
-			/** String descriptor index for the device's unique serial number string descriptor within the device.
-			 *  This unique serial number is used by the host to associate resources to the device (such as drivers or COM port
-			 *  number allocations) to a device regardless of the port it is plugged in to on the host. Some microcontrollers contain
-			 *  a unique serial number internally, and setting the device descriptors serial number string index to this value
-			 *  will cause it to use the internal serial number.
-			 *
-			 *  On unsupported devices, this will evaluate to \ref NO_DESCRIPTOR and so will force the host to create a pseudo-serial
-			 *  number for the device.
-			 */
-			#define USE_INTERNAL_SERIAL            0xDC
+			#if (!defined(NO_INTERNAL_SERIAL) || defined(__DOXYGEN__))
+				/** String descriptor index for the device's unique serial number string descriptor within the device.
+				 *  This unique serial number is used by the host to associate resources to the device (such as drivers or COM port
+				 *  number allocations) to a device regardless of the port it is plugged in to on the host. Some microcontrollers contain
+				 *  a unique serial number internally, and setting the device descriptors serial number string index to this value
+				 *  will cause it to use the internal serial number.
+				 *
+				 *  On unsupported devices, this will evaluate to \ref NO_DESCRIPTOR and so will force the host to create a pseudo-serial
+				 *  number for the device.
+				 */
+				#define USE_INTERNAL_SERIAL            0xDC
 
-			/** Length of the device's unique internal serial number, in bits, if present on the selected microcontroller
-			 *  model.
-			 */
-			#define INTERNAL_SERIAL_LENGTH_BITS    (8 * (1 + (offsetof(NVM_PROD_SIGNATURES_t, COORDY1) - offsetof(NVM_PROD_SIGNATURES_t, LOTNUM0))))
-			
-			/** Start address of the internal serial number, in the appropriate address space, if present on the selected microcontroller
-			 *  model.
-			 */
-			#define INTERNAL_SERIAL_START_ADDRESS  offsetof(NVM_PROD_SIGNATURES_t, LOTNUM0)
+				/** Length of the device's unique internal serial number, in bits, if present on the selected microcontroller
+				 *  model.
+				 */
+				#define INTERNAL_SERIAL_LENGTH_BITS    (8 * (1 + (offsetof(NVM_PROD_SIGNATURES_t, COORDY1) - offsetof(NVM_PROD_SIGNATURES_t, LOTNUM0))))
+				
+				/** Start address of the internal serial number, in the appropriate address space, if present on the selected microcontroller
+				 *  model.
+				 */
+				#define INTERNAL_SERIAL_START_ADDRESS  offsetof(NVM_PROD_SIGNATURES_t, LOTNUM0)
+			#else
+				#define USE_INTERNAL_SERIAL            NO_DESCRIPTOR
+
+				#define INTERNAL_SERIAL_LENGTH_BITS    0
+				#define INTERNAL_SERIAL_START_ADDRESS  0
+			#endif
 			
 		/* Function Prototypes: */
 			/** Sends a Remote Wakeup request to the host. This signals to the host that the device should