Browse Source

Fix some problems with the AtmelStudio Build capability.
Handle recursive Makes, copy the .hex and .lst in the right direction

Bill Westfield 6 years ago
parent
commit
70bd967c3c

BIN
optiboot/AtmelStudio/xplained168pb.atsuo


+ 18 - 9
optiboot/AtmelStudio/xplained168pb.cproj

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
     <SchemaVersion>2.0</SchemaVersion>
@@ -49,7 +49,8 @@
       <ToolNumber>ATML2222050200008424</ToolNumber>
       <ToolName>mEDBG</ToolName>
     </com_atmel_avrdbg_tool_medbg>
-    <avrtoolinterface>ISP</avrtoolinterface>
+    <avrtoolinterface>
+    </avrtoolinterface>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
     <ToolchainSettings>
@@ -72,6 +73,13 @@
         <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
       </AvrGcc>
     </ToolchainSettings>
+    <UsesExternalMakeFile>True</UsesExternalMakeFile>
+    <BuildTarget>xplained168pb</BuildTarget>
+    <CleanTarget>clean</CleanTarget>
+    <ExternalMakeFilePath>..\bootloaders\optiboot\makefile</ExternalMakeFilePath>
+    <PostBuildEvent>copy optiboot_xplained168pb.* ..\..\AtmelStudio
+</PostBuildEvent>
+    <OutputDirectory>..\bootloaders\optiboot</OutputDirectory>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
     <ToolchainSettings>
@@ -102,10 +110,9 @@
     <ExternalMakeFilePath>..\bootloaders\optiboot\makefile</ExternalMakeFilePath>
     <OutputFileName>optiboot_xplained168pb</OutputFileName>
     <OutputFileExtension>.hex</OutputFileExtension>
-    <OutputDirectory>.</OutputDirectory>
-    <PostBuildEvent>cp ../bootloaders/optiboot/optiboot_xplained168pb.* .
-
+    <PostBuildEvent>copy optiboot_xplained168pb.* ..\..\AtmelStudio
 </PostBuildEvent>
+    <OutputDirectory>..\bootloaders\optiboot</OutputDirectory>
   </PropertyGroup>
   <ItemGroup>
     <None Include="..\bootloaders\optiboot\Makefile">
@@ -132,16 +139,18 @@
       <SubType>compile</SubType>
       <Link>Makefile.isp</Link>
     </None>
+    <None Include="optiboot_xplained168pb.hex">
+      <SubType>compile</SubType>
+    </None>
+    <None Include="optiboot_xplained168pb.lst">
+      <SubType>compile</SubType>
+    </None>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="..\bootloaders\optiboot\baudcheck.c">
       <SubType>compile</SubType>
       <Link>baudcheck.c</Link>
     </Compile>
-    <Compile Include="..\bootloaders\optiboot\boot.h">
-      <SubType>compile</SubType>
-      <Link>boot.h</Link>
-    </Compile>
     <Compile Include="..\bootloaders\optiboot\optiboot.c">
       <SubType>compile</SubType>
       <Link>optiboot.c</Link>

BIN
optiboot/AtmelStudio/xplained328p.atsuo


+ 11 - 4
optiboot/AtmelStudio/xplained328p.cproj

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
     <SchemaVersion>2.0</SchemaVersion>
@@ -78,6 +78,13 @@
         </avrgcc.linker.libraries.Libraries>
       </AvrGcc>
     </ToolchainSettings>
+    <UsesExternalMakeFile>True</UsesExternalMakeFile>
+    <OutputDirectory>..\bootloaders\optiboot</OutputDirectory>
+    <BuildTarget>xplained328p</BuildTarget>
+    <CleanTarget>clean</CleanTarget>
+    <ExternalMakeFilePath>..\bootloaders\optiboot\Makefile</ExternalMakeFilePath>
+    <PostBuildEvent>copy optiboot_xplained328p.*  ..\..\AtmelStudio
+</PostBuildEvent>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
     <ToolchainSettings>
@@ -110,11 +117,11 @@
     <UsesExternalMakeFile>True</UsesExternalMakeFile>
     <BuildTarget>xplained328p</BuildTarget>
     <CleanTarget>clean</CleanTarget>
-    <ExternalMakeFilePath>..\bootloaders\optiboot\makefile</ExternalMakeFilePath>
+    <ExternalMakeFilePath>..\bootloaders\optiboot\Makefile</ExternalMakeFilePath>
     <OutputFileName>optiboot_xplained328p</OutputFileName>
     <OutputFileExtension>.hex</OutputFileExtension>
-    <OutputDirectory>.</OutputDirectory>
-    <PostBuildEvent>cp ../bootloaders/optiboot/optiboot_xplained328p.* .
+    <OutputDirectory>..\bootloaders\optiboot</OutputDirectory>
+    <PostBuildEvent>copy optiboot_xplained328p.*  ..\..\AtmelStudio
 
 </PostBuildEvent>
     <PreBuildEvent>

+ 2 - 2
optiboot/AtmelStudio/xplained328pb.atsln

@@ -9,8 +9,8 @@ Global
 		Release|AVR = Release|AVR
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{02F0BC88-77BD-42CC-A94C-4CC452F0F909}.Debug|AVR.ActiveCfg = Debug|AVR
-		{02F0BC88-77BD-42CC-A94C-4CC452F0F909}.Debug|AVR.Build.0 = Debug|AVR
+		{02F0BC88-77BD-42CC-A94C-4CC452F0F909}.Debug|AVR.ActiveCfg = Release|AVR
+		{02F0BC88-77BD-42CC-A94C-4CC452F0F909}.Debug|AVR.Build.0 = Release|AVR
 		{02F0BC88-77BD-42CC-A94C-4CC452F0F909}.Release|AVR.ActiveCfg = Release|AVR
 		{02F0BC88-77BD-42CC-A94C-4CC452F0F909}.Release|AVR.Build.0 = Release|AVR
 	EndGlobalSection

BIN
optiboot/AtmelStudio/xplained328pb.atsuo


+ 17 - 5
optiboot/AtmelStudio/xplained328pb.cproj

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
     <SchemaVersion>2.0</SchemaVersion>
@@ -77,6 +77,12 @@
         </avrgcc.linker.libraries.Libraries>
       </AvrGcc>
     </ToolchainSettings>
+    <UsesExternalMakeFile>True</UsesExternalMakeFile>
+    <OutputDirectory>..\bootloaders\optiboot</OutputDirectory>
+    <BuildTarget>xplained328pb</BuildTarget>
+    <CleanTarget>clean</CleanTarget>
+    <ExternalMakeFilePath>..\bootloaders\optiboot\Makefile</ExternalMakeFilePath>
+    <PostBuildEvent>copy optiboot_xplained328pb.* ..\..\AtmelStudio</PostBuildEvent>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
     <ToolchainSettings>
@@ -109,11 +115,11 @@
     <UsesExternalMakeFile>True</UsesExternalMakeFile>
     <BuildTarget>xplained328pb</BuildTarget>
     <CleanTarget>clean</CleanTarget>
-    <ExternalMakeFilePath>..\bootloaders\optiboot\makefile</ExternalMakeFilePath>
+    <ExternalMakeFilePath>..\bootloaders\optiboot\Makefile</ExternalMakeFilePath>
     <OutputFileName>optiboot_xplained328pb</OutputFileName>
     <OutputFileExtension>.hex</OutputFileExtension>
-    <OutputDirectory>.</OutputDirectory>
-    <PostBuildEvent>cp ../bootloaders/optiboot/optiboot_xplained328pb.* .</PostBuildEvent>
+    <OutputDirectory>..\bootloaders\optiboot</OutputDirectory>
+    <PostBuildEvent>copy optiboot_xplained328pb.* ..\..\AtmelStudio</PostBuildEvent>
   </PropertyGroup>
   <ItemGroup>
     <None Include="..\bootloaders\optiboot\Makefile">
@@ -140,6 +146,12 @@
       <SubType>compile</SubType>
       <Link>Makefile.isp</Link>
     </None>
+    <None Include="optiboot_xplained328pb.hex">
+      <SubType>compile</SubType>
+    </None>
+    <None Include="optiboot_xplained328pb.lst">
+      <SubType>compile</SubType>
+    </None>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="..\bootloaders\optiboot\baudcheck.c">
@@ -164,4 +176,4 @@
     </Compile>
   </ItemGroup>
   <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
-</Project>
+</Project>