Skip to content

Commit

Permalink
Use docfx for docs.
Browse files Browse the repository at this point in the history
Docs cleanup.
  • Loading branch information
jp2masa committed Feb 12, 2020
1 parent da440ff commit 19b800b
Show file tree
Hide file tree
Showing 37 changed files with 190 additions and 189 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
[Pp]ackages/
[Oo]bj/

Docs/log.txt

*.[Oo]bj
*.suo
*.ncb
Expand Down
9 changes: 9 additions & 0 deletions Docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
###############
# folder #
###############
/**/DROP/
/**/TEMP/
/**/packages/
/**/bin/
/**/obj/
_site
8 changes: 0 additions & 8 deletions Docs/Articles/MS5/ToDo.md

This file was deleted.

11 changes: 11 additions & 0 deletions Docs/Cosmos.Docs.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.Build.NoTargets">

<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="docfx.console" Version="2.40.2" PrivateAssets="All" />
</ItemGroup>

</Project>
2 changes: 0 additions & 2 deletions Docs/Kernel/Hardware/Index.md

This file was deleted.

15 changes: 0 additions & 15 deletions Docs/Web.config

This file was deleted.

5 changes: 5 additions & 0 deletions Docs/api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
###############
# temp file #
###############
*.yml
.manifest
2 changes: 2 additions & 0 deletions Docs/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# PLACEHOLDER
TODO: Add .NET projects to the *src* folder and run `docfx` to generate **REAL** *API Documentation*!
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
DS to VS:
# Debug Commands

## DS to VS

```cs
Noop = 0;
TracePoint = 1;
Message = 2;
Expand All @@ -17,8 +21,11 @@ Frame = 11;
Stack = 12;
Pong = 13;
BreakPointAsm = 14;
```

## VS to DS

VS to DS:
```cs
Noop = 0;

TraceOff = 1; // Dont think currently used
Expand Down Expand Up @@ -49,6 +56,7 @@ SetAsmBreak = 16;
Ping = 17;
// Make sure this is always the last entry. Used by DebugStub to verify commands.
Max = 18;
```

Debug channel:
## Debug channel
We support channels, which are prefixed with anything prefixed with 192 and up. 192 is used for a debug view.
File renamed without changes.
File renamed without changes.
36 changes: 18 additions & 18 deletions Docs/Articles/MS5/index.md → Docs/articles/GettingStarted.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# Getting Started

### Introducing Cosmos
## Introducing Cosmos

Cosmos (C# Open Source Managed Operating System) is an operating system
development kit which uses Visual Studio as its development environment.
Expand All @@ -25,42 +25,42 @@ operating system and doing some Cosmos work. The dev kit might be thought of
as the Cosmos SDK. Most users should start off with the user kit as it is not
so overwhelming like the dev kit. This article focuses on the user kit.

### Writing your first Operating System
## Writing your first Operating System

Create a new project as you would any C# project, but select Cosmos as the
project type.

![](CosmosMS5/SNAG-0000.png)
![](images/SNAG-0000.png)

A starter project will be created. It looks very much like a standard C#
console application.

![](CosmosMS5/SNAG-0001.png)
![](images/SNAG-0001.png)

Program.cs contains the boot and execution code. Instead of seeing a Windows
console window, you will see the following:

![](CosmosMS5/SNAG-0003.png)
![](images/SNAG-0003.png)

This is your operating system running in VMWare Player! Cosmos can of course
also be booted in VMWare Workstation, Hyper-V, Virtual PC, Bochs, or on real
hardware. But by default Cosmos uses VMWare Player because it is both free,
and reliable. Cosmos can even debug in Visual Studio, even when running on
another machine.

### Integrated Debugging
## Integrated Debugging

Debugging is a major issue with operating system development. The Cosmos team
was not content enough to simply conquer building and deployment, we want to
make developing operating system as easy as developing Windows applications.
Debugging a Cosmos based operating system should feel very familiar to you.
Lets modify our project a little bit to show the effect, and set a breakpoint.

![](CosmosMS5/SNAG-0005.png)
![](images/SNAG-0005.png)

Now run the project again.

![](CosmosMS5/SNAG-0007.png)
![](images/SNAG-0007.png)

Note that the execution stopped at "One"? That is becuase in Visual Studio our
project has stopped on a breakpoint. Simply press F5 to continue just as you
Expand All @@ -69,7 +69,7 @@ would in a normal application!
In addition to breakpoints Cosmos also supports step into (F11) as well. Trace
over (F10) is not supported yet.

### Debugger Communication
## Debugger Communication

The debugger uses the serial port to communicate. Because of this, debugging
only works wtih virtualization environments that support serial ports such as
Expand All @@ -78,22 +78,22 @@ is seriously broken on Windows and makes debugging impossible using QEMU. To
debug on real hardware, you must use a physical serial cable. In the future
Cosmos will also support debugging over Ethernet.

### Extra Debugging
## Extra Debugging

Cosmos supports some explicit methods that can be used to communicate with the
debugger and use additional functionality. It is accessed using the Debugger
class in the Cosmos.Debug namespace in the Cosmos.Kernel assembly. This
assembly is used by all Cosmos projects.

### Code Based Breakpoints
## Code Based Breakpoints


Debugger.Break();

Break can be used to issue a code based break. Visual Studio will break on the
line after this statement.

![](CosmosMS5/SNAG-0006.png)
![](images/SNAG-0006.png)

Since Cosmos does not support conditional breakpoints in the IDE yet, code
base breaks are very useful for implementing such. For example:
Expand All @@ -110,7 +110,7 @@ Alternatively you can call the .NET class libary break:

Both functions will produce the same result.

### Debug Output
## Debug Output

Debug strings can be output to the debug window of the host. Because Cosmos
does not support watches yet, this functionality can be very useful for
Expand All @@ -122,9 +122,9 @@ watching variable values and for performing tracing without breakpoints.
When this line is executed, it will send a message over the debugging channel
and it will appear in the Visual Studio output window.

![](CosmosMS5/SNAG-0008.png)
![](images/SNAG-0008.png)

### What's the catch?
## What's the catch?

There really is no catch. Everything We've shown here is functioning as seen.
No mockups were used. However we still have a lot of work to go. Items of
Expand All @@ -133,13 +133,13 @@ foreach loops), file systems (partial support exists), threads, networking, and
graphics. We have prototypes and experimentation for each, but none have been
rolled into the mainline Cosmos development as of yet.

### What was that Syslinux thing I saw on boot?
## What was that Syslinux thing I saw on boot?

Cosmos does not run on Linux. A boot loader called Syslinux is used to boot
Cosmos. After booting, Syslinux is not used. Syslinux is a bootloader and is
not a Linux distro. Syslinux simplifies the booting process by doing tasks such as enabline the A20 gate, initializing hardware, and switching to real mode (all of which are required by modern operating systems).

### Obtaining Cosmos
## Obtaining Cosmos

* Cosmos Website - [http://www.GoCosmos.org](http://www.GoCosmos.org)
* Source Code - Both dev kit and user kit - [http://github.com/CosmosOS/Cosmos/](http://github.com/CosmosOS/Cosmos/)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
43 changes: 43 additions & 0 deletions Docs/articles/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
- name: Getting Started
href: GettingStarted.md

- name: Compiler
href: Compiler/il2cpu.md

- name: Debugger
items:
- name: Debug Commands
href: Debugger/DebugCommands.md

- name: Express
href: Express/Compile.md

- name: Installation
items:
- name: Dev Kit
href: Installation/DevKit.md
- name: Running
href: Installation/Running.md

- name: Kernel
items:
- name: Heap
href: Kernel/Heap.md
- name: Levels
href: Kernel/Levels.md
- name: Memory
href: Kernel/Memory.md
- name: Plugs
href: Kernel/Plugs.md
- name: Startup
href: Kernel/Startup.md

- name: Reference
items:
- name: x86
href: Reference/x86.md

- name: Tests
items:
- name: Test Runner
href: Tests/TestRunner.md
72 changes: 72 additions & 0 deletions Docs/docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"metadata": [
{
"src": [
//{
// "files": [
// "**.csproj"
// ],
// "src": ""
//}
],
"dest": "api",
"disableGitFeatures": false,
"disableDefaultFilter": false
}
],
"build": {
"content": [
{
"files": [
"api/**.yml",
"api/index.md"
]
},
{
"files": [
"**/*.md",
"**/toc.yml",
"toc.yml",
"*.md"
]
}
],
"resource": [
{
"files": [
"favicon.ico",
"images/**",
"articles/images/**"
]
}
],
"overwrite": [
{
"files": [
"apidoc/**.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"dest": "_site",
"globalMetadata": {
"_appFooter": "<span></span>",
"_appLogoPath": "images/logo.png",
"_enableNewTab": true
},
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"template": [
"default"
],
"postProcessors": [],
"markdownEngineName": "markdig",
"noLangKeyword": false,
"keepFileLink": false,
"cleanupCacheHistory": false,
"disableGitFeatures": false
}
}
Binary file added Docs/favicon.ico
Binary file not shown.
Binary file added Docs/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 19b800b

Please sign in to comment.