This is a template project for OS development on Visual Studio. It is based on obos and limine.
I wish I found something like this earlier, so I hope it helps someone else.
- Visual Studio with Linux development workload
- CMake
- WSL
- A GCC cross-compiler for x86-64-elf (see osdev.org)
- qemu
- openssh-server
- Clone this repository with submodules.
git clone --recurse-submodules https://github.com/jacquwest/osdev-vs-template.git
- Build limine executable in wsl.
cd osdev-vs-template/limine
make
-
Edit
.vs/launch.vs.json
to match your configuration. Many macros don't work.configurations[0].customLaunchSetupCommands[0].text
configurations[0].remotePrelaunchCommand
iso on linux should be in~/.vs/osdev-vs-template/project-hash/out/build/Linux-GCC-Debug/osdev-vs-template
-
Edit
CMakeSettings.json
to match your configuration.- `configurations[0].variables[0].value
-
Switch target to
debug-qemu
in Visual Studio and run. Make sure you have a ssh server running on your wsl instance.