FlingOS launched on September 17th, in Bristol, UK. Find out more here.
Welcome! This is the main repository for the FlingOS™ project. We used to be over on BitBucket but have recently shifted across. The FlingOS project is an educational operating system aiming to provide high-quality resources for learning OS and low-level development. You can find out more on our website over at www.flingos.co.uk. There you'll also find our documentation and links to our tutorial videos. If you're wondering why we use C#, take a look at this article.
The FlingOS project is a three part approach to teaching OS and low-level development. You're currently looking at just one part - the code itself. The code acts as a sample codebase for people to learn from and compare to. The second part is our conceptual articles, which explain all the OS and low-level technology in detail. The third part is our tutorials which are free, ~20min videos with complete resources, available on YouTube. You can find all these links and more on our main website.
Take a look at our Getting Started article to learn how to write your own operating system.
The FlingOS source code is here for you to look at, read and compare to. By reading the FlingOS articles and taking a look at our implementations, you should be able to write your own fairly easily.
If you'd just like to use our ahead-of-time compiler to write your own C#, VB.Net or F# operating system, please take a look at our stable releases.
First, compile a debug version of the kernel for x86 (debugging other architectures is not supported yet). In your VM, you'll need to set a debuggable virtual machine. This means adding the correct COM (serial) ports to the VM. You will require:
At this point, you could connect to serial (COM) port 2 using any valid terminal app on the host. For example, Putty using baud 96200, RTS/CTS and "implicit CR with every LF" selected. However, on Windows, we provide a GUI application for debugging programs which is much more effective.
Build and start the GUI debugger. The root of the named pipe should be "FlingOSDebug", the "_Msg" and "Notif" are appended automatically. The assembly name should be Kernel for debugging the main FlingOS kernel. The Bin path should be the full path to the build directory; You will need to change this according to your setup.
Press the Connect button and then start the virtual machine. If all goes well, the VM should connect the ports and the OS should start executing. Once the OS has loaded and the debugger thread has started, the host debugger (GUI) should detect the connection and allow you to proceed.
Take a look at the overview video:
To start with, press the Refresh button to retrieve the list of processes and threads. Selecting a process or thread allows you to suspend it and inspect its state. The rest should be reasonably obvious.
To add breakpoints, type at least 10 characters in the Filter box of the name of the method you wish to add a breakpoint for. Select the available debug point (if any) and click "Set". Suspend the thread you wish to use the breakpoint with and then Step the thread until it reaches the breakpoint.
FlingOS is released under GPLv2 under UK law. This means you can't just copy and paste our code without keeping our copyright notice and you have to release your work as open-source if it includes our code. Our source code is also released without warranty and we accept no liability (within the restrictions of UK law). Please do not use our code for anything (particularly production or safety critical work) without testing and verifying it yourself.
FlingOS is here for people to learn from by reading and comparing. We are not here to just supply out-of-the-box code so we don't allow people to just reuse our work. Also, we are providing a learning resource not a reference sample. By restricitng the use of our code it helps to prevent the widercommunity accidentally treating us a reference codebase.