WinXP and OSDev, easy?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
kkitsune
Posts: 2
Joined: Fri Oct 26, 2007 4:47 pm

WinXP and OSDev, easy?

Post by kkitsune »

Hi all! First post on this superb forum!
Almost a mounth ago, I started to "osdev" with all the prerequisite :
+4 years of C/C++ plus 1 of C#
+1 Total year of Linux
+Some projects in NASM

Now, I'm on Windows XP and try to make my own VERY SIMPLE OS. Started by reading the Wiki, then getting Cygwin. I made some "Hello World" boot all in asm.
Enough of history, now the problem : is it possible to "osdev" on Win32 as easy as on Linux? Without a cross-compiler (unabl to build one)? Using MSVS2005?
Yeah, lots of questions...Thanks in advance for the answers!
Dan
Hell is sweat...
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

It depends on what you like best. There is no 'easier' platform. Some use Windows, because they're very familiar with it, or they simply like using it and it's tools. (eg. Visual Studio, etc.) I, on the other hand, use Linux, because I find that it's easier to program on, along with a few other things. (Security, stability, etc.)

That's just my opinion, mind you, so please don't start a war over which is better. ;)
C8H10N4O2 | #446691 | Trust the nodes.
kkitsune
Posts: 2
Joined: Fri Oct 26, 2007 4:47 pm

Post by kkitsune »

I don't meant to hurt any Linux nor Windows users! I want to know what is the best way to "osdev" under windows. Using MinGW, Cygwin or DJGPP? With or without cross-compiler? Can I use EASILY VS2005?
Hell is sweat...
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

kkitsune wrote:I don't meant to hurt any Linux nor Windows users! I want to know what is the best way to "osdev" under windows. Using MinGW, Cygwin or DJGPP? With or without cross-compiler? Can I use EASILY VS2005?
If you're going to use GCC, then Cygwin is recommended the most. However, there is also a wiki page on using MSVC. It's your call really. If you want to go with the pack, however, GCC is probably by far the most used.
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
AndrewAPrice
Member
Member
Posts: 2309
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

Of course you can. On the compiler side I use Cygwin/GCC with a i586-elf cross compiler. On the IDE side I use Visual Studio 2005 (you can create a 'makefile project', set the command line to call a batch file, which calls a shell script through Cygwin's bash, which calls make/gcc/ld/image-tools/etc, and set your emulator as the debugger).
My OS is Perception.
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Post by neon »

I personally just have my bootloader load and execute my kernel written in MSVC++ 2005.

THIS series covers both, in case you are interested. I dont use script files nor cygwin--Just nasm and MSVC++.

Im currently in the process of fixing it up, so please forgive me for any broken images and links :)

There are no technically "best" IDE, or way to develop under Windows. You would need to decide for yourself; all methods have their pros and cons.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
LordMage
Member
Member
Posts: 115
Joined: Sat Sep 22, 2007 7:26 am
Contact:

Post by LordMage »

I have been deving my OS using Neon's tutorials with MSVC++ and nasm. The tutorials work great are are fairly in depth and easy to read. I have reached a point where his tutorials drop off and I have had to start thinking for myself. I will say that if you are expecting a great amount of help on this forum it would certainly be easier to use some manifestation of GCC either use linux or cygwin. As far as coding and testing using VC++ and NASM is very easy the hardest part that I have had to figure out just recently was using NASM compiled obj files in my C++ kernel and once I figured that out everything has started to click in place. It has taken me a month to figure out how to do it though. So expect a few stumbling blocks. Which ever method you choose keep trucking when you run into a brick wall. happy dev'ing
Getting back in the game.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: WinXP and OSDev, easy?

Post by Solar »

kkitsune wrote:Enough of history, now the problem : is it possible to "osdev" on Win32 as easy as on Linux? Without a cross-compiler (unabl to build one)?
Trust me when I say that following the tutorial in the Wiki precisely, it does work. We have been through this a couple of dozen times. Read the whole tutorial, including the fine print and the troubleshooting section. It is usually a small, rather stupid mistake you will probably laugh about once you've found it. (Using binutils 2.9.x instead of a current package, not using a seperate build-binutils / build-gcc directory, not giving the command options recommended in the tutorial, not setting PATH correctly, or a Cygwin installation borked by earlier attempts are the favourites.)

Personally, I strongly suggest Cygwin / GCC over MSVC++, if simply because it will allow the Linuxers here to reproduce any problems you might encounter further down the road, and helping you with them (or even joining your project). If you want the MSVC++ front-end, I'd suggest you bold it on a GCC / GNU make backend instead of using the MS compiler, for the same reason.
Every good solution is obvious once you've found it.
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

I dev in Windows Vista with Cygwin and a cross compiler set up for ELF targets. I also use FASM as my assembler. I have no toolchain related problems since the switch to Cygwin so I can say that development in XP is basically as easy as on any other platform. The only problems I have found is that you cannot (I think) create a loopback device in Cygwin so sometimes its a little difficult to get the kernel onto the disk. But once you find the right tools it gets a whole lot easier.
Post Reply