Skip to content

Commit

Permalink
VS2013 Support
Browse files Browse the repository at this point in the history
This is relatively stable but no to be considered complete. Currently supported:
1. Installing user/dev kit (as normal)
2. Creating C#/VB/F# projects (latter 2 untested)
3. Debugging a Cosmos project - see limitations list below.

Debugging limitations:
1. Breakpoints sometimes fail to be hit. Only known thing that may help is recompile everything.
2. Specific breakpoint failure case: If you try and place a breakpoint on or after a "while(true)" statement it is extremely unreliable.

Other limitations:
1. VMWare occasionally breaks. If you get "Internal error" messages, or if VS crashes (don't let Windows "fix" it) or if VMWare fails to load properly there is only one known & reliable solution: Re-run the VMWare installer and hit "Repair". No restart required. You won't lose your VMs or settings (AFAI can tell).

If it all breaks, feel free to rant at it ;)
  • Loading branch information
EdwardNutting_cp authored and EdwardNutting_cp committed Nov 6, 2013
1 parent 16f4695 commit bac3f98
Show file tree
Hide file tree
Showing 206 changed files with 4,924 additions and 744 deletions.
14 changes: 14 additions & 0 deletions Build/VSIP/Cosmos.Build.MSBuild.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>

</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
<providers>
<provider invariantName="System.Data.SQLite" type="System.Data.SQLite.SQLiteProviderServices, System.Data.SQLite.Linq"/>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
</providers>
</entityFramework>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
18 changes: 18 additions & 0 deletions Build/VSIP/Cosmos.Debug.Common.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />

</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SQLite" type="System.Data.SQLite.SQLiteProviderServices, System.Data.SQLite.Linq" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
3 changes: 3 additions & 0 deletions Build/VSIP/Cosmos.Debug.GDB.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
13 changes: 13 additions & 0 deletions Build/VSIP/Cosmos.Debug.VSDebugEngine.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />

</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
3 changes: 3 additions & 0 deletions Build/VSIP/Cosmos.Deploy.Pixie.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
3 changes: 3 additions & 0 deletions Build/VSIP/Cosmos.Deploy.USB.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
10 changes: 10 additions & 0 deletions Build/VSIP/Cosmos.IL2CPU.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>

<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
</entityFramework>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
Binary file added Build/VSIP/Cosmos.VS.Package.pkgdef
Binary file not shown.
10 changes: 10 additions & 0 deletions Build/VSIP/Cosmos.VS.Windows.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>

<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
</entityFramework>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
Binary file added Build/VSIP/Cosmos.VS.Windows.pkgdef
Binary file not shown.
Binary file added Build/VSIP/Cosmos.VS.XSharp.pkgdef
Binary file not shown.
96 changes: 96 additions & 0 deletions Build/VSIP/Cosmos.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4">

<PropertyGroup>
<CosmosDir Condition="$(CosmosDir) == ''">$([MSBuild]::GetRegistryValue("HKEY_LOCAL_MACHINE\Software\Cosmos", "UserKit"))</CosmosDir>
<BuildToolsDir Condition="$(BuildToolsDir) == ''">$(CosmosDir)\Build\Tools</BuildToolsDir>
<VSIPDir Condition="$(VSIPDir) == ''">$(CosmosDir)\Build\VSIP</VSIPDir>
<NasmFile>$(BuildToolsDir)\Nasm\nasm.exe</NasmFile>
<PlatformTarget>x86</PlatformTarget>
<BinFormat Condition="$(BinFormat) == ''">bin</BinFormat>
</PropertyGroup>

<UsingTask TaskName="Cosmos.Build.MSBuild.IL2CPU" AssemblyFile="$(VSIPDir)\Cosmos.Build.MSBuild.dll" />
<UsingTask TaskName="Cosmos.Build.MSBuild.NAsm" AssemblyFile="$(VSIPDir)\Cosmos.Build.MSBuild.dll" />
<UsingTask TaskName="Cosmos.Build.MSBuild.MakeISO" AssemblyFile="$(VSIPDir)\Cosmos.Build.MSBuild.dll" />
<UsingTask TaskName="Cosmos.Build.MSBuild.Ld" AssemblyFile="$(VSIPDir)\Cosmos.Build.MSBuild.dll" />
<UsingTask TaskName="Cosmos.Build.MSBuild.ReadNAsmMapToCosmosMap" AssemblyFile="$(VSIPDir)\Cosmos.Build.MSBuild.dll" />
<UsingTask TaskName="Cosmos.Build.MSBuild.ExtractMapFromElfFile" AssemblyFile="$(VSIPDir)\Cosmos.Build.MSBuild.dll" />

<Target Name="CoreCompile">
<Error Text="File %(Compile.Identity) is set to compile, but .Cosmos projects don't compile any source themselves!"
Condition="$(Compile) != ''"/>

<CreateProperty Value="true" Condition="$(BinFormat) == 'elf'">
<Output PropertyName="IsELF" TaskParameter="Value"/>
</CreateProperty>
<CreateProperty Value="false" Condition="$(BinFormat) == 'bin'">
<Output PropertyName="IsELF" TaskParameter="Value"/>
</CreateProperty>

<IL2CPU DebugMode="$(DebugMode)"
DebugEnabled="$(DebugEnabled)"
TraceAssemblies="$(TraceAssemblies)"
IgnoreDebugStubAttribute="$(IgnoreDebugStubAttribute)"
DebugCom="1"
UseNAsm="true"
References="@(ReferencePath)"
OutputFilename="$(TargetDir)$(MSBuildProjectName).asm"
EnableLogging="true"
EmitDebugSymbols="$(DebugSymbols)"/>

<NAsm InputFile="$(TargetDir)$(MSBuildProjectName).asm"
OutputFile="$(TargetDir)$(MSBuildProjectName).obj"
IsELF="$(IsELF)"
ExePath="$(NasmFile)" />

<!--ELF only-->
<!-- 16 MB 0x1000000 as per hpa (syslinux) is a good spot.
For now just put some dummy values. 16 and 32 MB. Later size better.-->
<Ld CosmosBuildDir="$(CosmosDir)\Build"
WorkingDir="$(TargetDir)"
Arguments="-Ttext 0x2000000 -Tdata 0x1000000 -e Kernel_Start -o '$(TargetDir)$(MSBuildProjectName).bin' '$(TargetDir)$(MSBuildProjectName).obj'"
Condition="$(IsELF) == 'true'"/>

<ExtractMapFromElfFile InputFile="$(TargetDir)$(MSBuildProjectName).bin"
DebugInfoFile="$(TargetDir)$(MSBuildProjectName).cdb"
WorkingDir="$(TargetDir)"
CosmosBuildDir="$(CosmosDir)\Build"
Condition="$(IsELF) == 'true'"/>

<CreateItem Include="$(TargetDir)$(MSBuildProjectName).bin" Condition="$(IsELF) == 'true'">
<Output TaskParameter="Include"
ItemName="TempFilesToCopy"/>
</CreateItem>

<!--End of ELF only-->

<!--binary only-->
<ReadNAsmMapToCosmosMap InputBaseDir="$(TargetDir)"
DebugInfoFile="$(TargetDir)$(MSBuildProjectName).cdb"
Condition="$(IsELF) == 'false'"/>
<!--end of binary only-->


<!--todo: update cxdb to cxdbg-->

<!-- We dont build ISO in MSBuild any more because not all targets need it and it takes time.
But we do delete it, so we dont have out of date outputs. -->
<!-- <MakeISO InputFile="$(TargetDir)$(MSBuildProjectName).bin"
OutputFile="$(TargetDir)$(MSBuildProjectName).iso"
CosmosBuildDir="$(CosmosDir)\Build" /> -->
<Delete Files="$(TargetDir)$(MSBuildProjectName).iso" />
</Target>

<!-- compat targets -->
<Target Name="CreateManifestResourceNames">
</Target>

<Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" />

<Target Name="CopyFilesToOutputDirectory">
<!-- copy <AssemblyName>.exe from obj\Debug to bin\Debug-->
<Copy SourceFiles="Cosmos.bxrc"
DestinationFolder="$(TargetDir)"/>
</Target>
</Project>
Binary file added Build/VSIP/Cosmos.zip
Binary file not shown.
Binary file added Build/VSIP/CosmosKernel (C#).zip
Binary file not shown.
Binary file added Build/VSIP/CosmosKernel (VB).zip
Binary file not shown.
Binary file added Build/VSIP/CosmosProject (C#).zip
Binary file not shown.
Binary file added Build/VSIP/CosmosProject (F#).zip
Binary file not shown.
Binary file added Build/VSIP/CosmosProject (VB).zip
Binary file not shown.
Loading

0 comments on commit bac3f98

Please sign in to comment.