diff --git a/LUFA.pnproj b/LUFA.pnproj
index df2410b9c4..30e33f634e 100644
--- a/LUFA.pnproj
+++ b/LUFA.pnproj
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/Maintenance/AS4Template.aps b/Maintenance/AS4Template.aps
new file mode 100644
index 0000000000..414a0d5f8a
--- /dev/null
+++ b/Maintenance/AS4Template.aps
@@ -0,0 +1 @@
+%TARGET%%CREATED%%CREATED%2410%CREATED%44, 18, 0, 685AVR GCC%TARGET%.elffalseR00R01R02R03R04R05R06R07R08R09R10R11R12R13R14R15R16R17R18R19R20R21R22R23R24R25R26R27R28R29R30R31000%FILE_LIST%defaultYESmakefileatmega12811
BootloaderCDC.elfdefault\1-Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enumsdefault1C:\WinAVR-20100110\bin\avr-gcc.exeC:\WinAVR-20100110\utils\bin\make.exe%GCC_FILE_LIST%
diff --git a/Maintenance/makefile b/Maintenance/makefile
index db06616c74..84e4a703f2 100644
--- a/Maintenance/makefile
+++ b/Maintenance/makefile
@@ -26,6 +26,42 @@ upgrade-doxygen:
done;
@echo Doxygen configuration update complete.
+# Generate AVR Studio 4 project files for each project from a template
+make-as4-projects:
+ @echo Creating AVR Studio 4 project files for Demos...
+ @for project_makefile in `find $(LUFA_ROOT)/Demos $(LUFA_ROOT)/Projects $(LUFA_ROOT)/Bootloaders -name makefile*`; do \
+ target_name=`grep "TARGET *=" $$project_makefile | cut -d'=' -f2 | sed 's/ //g'`; \
+ target_folder=`dirname $$project_makefile`; \
+ as4_date=`date "+%e-%b-%Y %H:%M:%S"`; \
+ \
+ if ( test -n "$$target_name" ); then \
+ echo Creating AS4 project for project $$target_name; \
+ \
+ source_files="`basename $$project_makefile`<\/OTHERFILE>"; \
+ gcc_source_files=""; \
+ for c_source_file in `find $$target_folder -name *.c`; do \
+ source_files+="`basename $$c_source_file`<\/SOURCEFILE>"; \
+ gcc_source_files+="`basename $$c_source_file`<\/Name>"; \
+ done; \
+ for c_header_file in `find $$target_folder -name *.h`; do \
+ source_files+="`basename $$c_header_file`<\/HEADERFILE>"; \
+ gcc_source_files+="`basename $$c_header_file`<\/Name>"; \
+ done; \
+ for assembly_file in `find $$target_folder -name *.S`; do \
+ source_files+="`basename $$assembly_file`<\/OTHERFILE>"; \
+ gcc_source_files+="`basename $$assembly_file`<\/Name>"; \
+ done; \
+ \
+ sed "s/%TARGET%/$$target_name/g" AS4Template.aps > $$target_folder/$$target_name.aps.new; \
+ sed "s/%CREATED%/$$as4_date/g" $$target_folder/$$target_name.aps.new > $$target_folder/$$target_name.aps.new2; \
+ sed "s/%FILE_LIST%/$$source_files/g" $$target_folder/$$target_name.aps.new2 > $$target_folder/$$target_name.aps.new3; \
+ sed "s/%GCC_FILE_LIST%/$$gcc_source_files/g" $$target_folder/$$target_name.aps.new3 > $$target_folder/$$target_name.aps.new4; \
+ mv $$target_folder/$$target_name.aps.new4 $$target_folder/$$target_name.aps; \
+ rm $$target_folder/$$target_name.aps.new $$target_folder/$$target_name.aps.new2 $$target_folder/$$target_name.aps.new3; \
+ fi; \
+ done;
+ @echo AVR Studio 4 project generation complete.
+
# Check the working branch documentation, ensure no placeholder values
check-documentation-placeholders:
@echo Checking for release suitability...