Best IDE for OS development

Programming, for all ages and all languages.
codertom
Posts: 22
Joined: Wed Apr 09, 2014 7:58 am

Best IDE for OS development

Post by codertom »

Hey everyone, I have recently decided to start developing my own operating system from scratch in Assembly and C/C++. I have around 10 years experience in the programming field but mostly in high level languages like C#. I'm getting used to C/C++ now so I thought I'd give it a try (by the way, I am doing unmanaged C++, not the .Net crap).

In case you're going to mention: I know I need to know Hardware, ASM and C intimately and highly optimized for critical portions such as the memory manager and hardware abstraction layer, but I feel that it would be a really good learning experience to be more programatically MUCH closer to the CPU/GPU etc... besides... I'm in no rush and theres always chances to rewrite once I get more experience..

So my question is this... I mainly use MS Windows as my main platform so is there a IDE that features quick debugging tools for the 3 languages? Or even a plugin for Visual Studio? Preferably a debugger which uses Qemu or other emulators...
Oh and another question which has been bugging me... Executable formats, how does Linux or Windows handle this? Do they jump to the programs execution stack and the CPU does the work or does the OS interpret each instruction to basically sand box it?


Thanks.
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Re: Best IDE for OS development

Post by AndrewAPrice »

Anything you want!

Visual Studios IDE is pretty much the best (feature wise) and I've used it for OS development, but because I could not debug my kernel or code running on my kernel in it, I was using it as a bloated text editor.

Lately, when I'm not working with C++ or .Net, I find myself using UltraEdit (Window) or Sublime (Linux) and a terminal emulator (for building and running.)
My OS is Perception.
User avatar
bwat
Member
Member
Posts: 359
Joined: Fri Jul 03, 2009 6:21 am

Re: Best IDE for OS development

Post by bwat »

MessiahAndrw wrote:Anything you want!
Exactly!

Personally I use Emacs. I have been using it since the early 1990s and ue since the mid to late 80s when my machine wasn't powerful enough to run Emacs. I'm not even a hard core user - I've only got four global-set-keys in my initialisation file. I don't even use all the modes and tools to help with software development. Compared to Emacs, everything else seems like too much bells and whistles to be honest. I must like things simple.
Every universe of discourse has its logical structure --- S. K. Langer.
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: Best IDE for OS development

Post by sortie »

I just use gedit and the command line. Sed and grep for more automated editing tasks.
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: Best IDE for OS development

Post by qw »

Ask ten persons and you'll get ten different answers. I am very happy with Programmer's Notepad.
User avatar
Bender
Member
Member
Posts: 449
Joined: Wed Aug 21, 2013 3:53 am
Libera.chat IRC: bender|
Location: Asia, Singapore

Re: Best IDE for OS development

Post by Bender »

I use my own IDE (sort of) written in C# using Scintilla and Windows(WINE) Forms. It supports all the stuff I need like Macro/Struct Creator, QEMU GUI FrontEnd and has it's own command line where you can compile your programs.
Vim anyone? :) Have to agree that Visual Studio is the cleanest IDE out there.
Last edited by Bender on Fri Apr 18, 2014 6:08 pm, edited 1 time in total.
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
codertom
Posts: 22
Joined: Wed Apr 09, 2014 7:58 am

Re: Best IDE for OS development

Post by codertom »

Bender wrote:I use a my own IDE (sort of) written in C# using Scintilla and Windows(WINE) Forms. It supports all the stuff I need like Macro/Struct Creator, QEMU GUI FrontEnd and has it's own command line where you can compile your programs.
Hmm I was thinking about writing my own too (syntax highlighting, automatic Qemu launcher etc...). But would be tricky to attach Qemu debugging events to the ASM/C files etc...
Have you done this too or? if so, can you give me a few tips on it?

I was thinking of having a Visual Studio like button where it compiles and links everything for you in your project and runs Qemu under the compiled .bin or .iso or whatever which allows for rapid testing of kernel/bootloader code... (Project would be my own kind of like VS Solutions)

Thanks
User avatar
Rusky
Member
Member
Posts: 792
Joined: Wed Jan 06, 2010 7:07 pm

Re: Best IDE for OS development

Post by Rusky »

Considering you'll probably want a makefile (or other more flexible build system) at some point in your project's lifetime, using a simpler editor rather than an IDE is probably best. emacs has been mentioned, I like vim, on windows I used to use Notepad++ a lot. I've heard good things about Sublime. These have varying degrees of built-in and/or pluggable support for syntax highlighting, code completion, etc. so pick what you like for editing and use other tools that are designed for building, debugging, etc. since those will work best for OS dev.
User avatar
Bender
Member
Member
Posts: 449
Joined: Wed Aug 21, 2013 3:53 am
Libera.chat IRC: bender|
Location: Asia, Singapore

Re: Best IDE for OS development

Post by Bender »

codertom wrote: Hmm I was thinking about writing my own too (syntax highlighting, automatic Qemu launcher etc...). But would be tricky to attach Qemu debugging events to the ASM/C files etc...
Have you done this too or? if so, can you give me a few tips on it?

I was thinking of having a Visual Studio like button where it compiles and links everything for you in your project and runs Qemu under the compiled .bin or .iso or whatever which allows for rapid testing of kernel/bootloader code... (Project would be my own kind of like VS Solutions)

Thanks
Highlighting can be achieved by using Scintilla.NET which is an efficient syntax highlighter, As for the debugging part I don't have my own debugger instead my IDE uses GDB.
The button you're talking about seems to be something like the 'Build and Run' option in Visual Studio. This is tricky, because I don't have a solution format like Visual Studio does. Instead I ask the user the primary source/make/ file, call the appropriate applications, then I copy the binary to the disk image using WinImage. The bad part about this is that you need to care about different file systems, however I don't bother LOL, my brain works till FAT and NTFS only. My IDE features a make file creator which asks the sections, origin, symbols to put in etc.
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)
no92
Member
Member
Posts: 307
Joined: Wed Oct 30, 2013 1:57 pm
Libera.chat IRC: no92
Location: Germany
Contact:

Re: Best IDE for OS development

Post by no92 »

My recommendation is to use Linux and no IDE, only a text editor and the command line.

I'm using Ubuntu 14.04 LTS, Sublime Text 3 as editor and the default Terminal emulator. Building is done with Makefiles, testing with QEMU and Virtualbox.

I don't believe there is an IDE that can handle all this stuff. Even if Eclipse or NetBeans might handle most of these things, they are way too bloated for OS development.
codertom
Posts: 22
Joined: Wed Apr 09, 2014 7:58 am

Re: Best IDE for OS development

Post by codertom »

Bender wrote:Highlighting can be achieved by using Scintilla.NET which is an efficient syntax highlighter, As for the debugging part I don't have my own debugger instead my IDE uses GDB.
The button you're talking about seems to be something like the 'Build and Run' option in Visual Studio. This is tricky, because I don't have a solution format like Visual Studio does. Instead I ask the user the primary source/make/ file, call the appropriate applications, then I copy the binary to the disk image using WinImage. The bad part about this is that you need to care about different file systems, however I don't bother LOL, my brain works till FAT and NTFS only. My IDE features a make file creator which asks the sections, origin, symbols to put in etc.
Hmm, implimenting my own solution format like VS uses should be relatively simple, I mean.. All it is is just a list of virtual directories and virtual file alias's which are attached to physical locations on disk + configuration stuff like the file system target etc... which (maybe) when you hit compile, it generates a makefile and sends it to the make executable to do it's thing...

As for the creating the disk image, I was thinking about using the mkisofs to create a bootable ISO and with that I can send it to the QEMU emulator. As for the floppy disks and specifying what file system I want, as I said before, it'l be in the configuration. So I don't really see much problem in implimenting a single button which does all of the compiling, linking and emulating for me.

As for debugging then, I'l see if I can grab the debugging events from QEMU somehow and deturmine what file and line/column the emulator is running (symbol resolve/stack trace maybe?). If QEMU outputs it's debugging stuff to the standard output stream then I'l be sorted :)

[EDIT]I'm aware of multiple solutions get compiled to different stuff, so, I could have a "project type" of either Boot Sector, Kernel or Other. (kernel and other would let you customize what file it would actually compile to on disk.)
Last edited by codertom on Sat Apr 19, 2014 11:17 am, edited 2 times in total.
codertom
Posts: 22
Joined: Wed Apr 09, 2014 7:58 am

Re: Best IDE for OS development

Post by codertom »

no92 wrote:My recommendation is to use Linux and no IDE, only a text editor and the command line.

I'm using Ubuntu 14.04 LTS, Sublime Text 3 as editor and the default Terminal emulator. Building is done with Makefiles, testing with QEMU and Virtualbox.

I don't believe there is an IDE that can handle all this stuff. Even if Eclipse or NetBeans might handle most of these things, they are way too bloated for OS development.
Hmm my kind of plan was to have rapid testing of little snippets of kernel code so I can quickly see if some code is working. As for the IDE, I might just make my own specifically for this kind of development (read my previous post above).

The language I would be using is C# which is locked to Windows (except Mono makes it Mac/Linux). But I'm not sure I'l be using Linux because I'm not used to it much.
User avatar
bwat
Member
Member
Posts: 359
Joined: Fri Jul 03, 2009 6:21 am

Re: Best IDE for OS development

Post by bwat »

codertom wrote:The language I would be using is C# which is locked to Windows (except Mono makes it Mac/Linux). But I'm not sure I'l be using Linux because I'm not used to it much.
If this is a hobby thing, then why not do it in C and assembler in a Linux host environment? The learning curve would be steeper but you'd come out a much more experienced programmer on the other side. I know this doesn't answer any of your questions. I also know that there's plenty of posters here with their development environments hosted on Windows, so nobody can say it can't or shouldn't be done. I'm just "throwing the idea out there" as someone who has said "I'm not doing that, it's too different" and regretted it, too often.
Every universe of discourse has its logical structure --- S. K. Langer.
codertom
Posts: 22
Joined: Wed Apr 09, 2014 7:58 am

Re: Best IDE for OS development

Post by codertom »

bwat wrote:
codertom wrote:The language I would be using is C# which is locked to Windows (except Mono makes it Mac/Linux). But I'm not sure I'l be using Linux because I'm not used to it much.
If this is a hobby thing, then why not do it in C and assembler in a Linux host environment? The learning curve would be steeper but you'd come out a much more experienced programmer on the other side. I know this doesn't answer any of your questions. I also know that there's plenty of posters here with their development environments hosted on Windows, so nobody can say it can't or shouldn't be done. I'm just "throwing the idea out there" as someone who has said "I'm not doing that, it's too different" and regretted it, too often.
What experience would have more of if I use linux for developing an OS rather than Windows? How to use linux?
User avatar
bwat
Member
Member
Posts: 359
Joined: Fri Jul 03, 2009 6:21 am

Re: Best IDE for OS development

Post by bwat »

codertom wrote:What experience would have more of if I use linux for developing an OS rather than Windows? How to use linux?
Yes.
Every universe of discourse has its logical structure --- S. K. Langer.
Post Reply