OSDEV IN WINDOWS?

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.
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

NASM - Assembler
DJGPP - C Compiler
WinRawWrite - raw floppy sector writer
VS2008 - IDE
BOCHS + QEMU + VPC2007 - emulators
User avatar
ollie123
Member
Member
Posts: 26
Joined: Tue May 27, 2008 2:42 am
Location: Great Yarmouth, Norfolk, United Kingdom

Post by ollie123 »

I Use MinGW For Compiling (Includes GCC, G++, LD)
http://www.mingw.org/
I Use NASM For Assembling (Includes NASM :shock: )
http://nasm.sourceforge.net/
I Use Notepad++ For Coding (Includes :shock: :shock: :shock: Notepad++!!)
http://notepad-plus.sourceforge.net/
I Use WinImage For Virtual Floppy - Unfortunately It's Not Free :evil:
http://www.winimage.com/
I Use Bochs For Emulation
http://bochs.sourceforge.net/

Hope this helps,
Ollie.
Last edited by ollie123 on Sun Jun 01, 2008 9:24 am, edited 2 times in total.
User avatar
ollie123
Member
Member
Posts: 26
Joined: Tue May 27, 2008 2:42 am
Location: Great Yarmouth, Norfolk, United Kingdom

Post by ollie123 »

01000101 wrote:NASM - Assembler
DJGPP - C Compiler
WinRawWrite - raw floppy sector writer
VS2008 - IDE
BOCHS + QEMU + VPC2007 - emulators
Cool, could you tell me how to set up VS2008 for that?
thooot
Member
Member
Posts: 30
Joined: Sun Jun 01, 2008 11:20 am

Post by thooot »

ollie123 wrote: Cool, could you tell me how to set up VS2008 for that?
I'm using nasm in VS2008. To do it:
1. Right click on the project
2. Custom Build Rules
3. New Rule File
4. Add Build Rule
5. For the values:
Command line = c:\nasm\nasm.exe [inputs] [Format] [Output]
Display name = nasm
File extensions = *.asm
Name = nasm
Outputs = $(IntDir)\$(InputName).bin
For the properties:
1. Format
Type = string
Default value = bin
Description = Format
Display Name = Format
Name = Format
Switch = -f [value]
2. Output
Type = string
Default value = $(IntDir)\$(InputName).bin
Description = Output
Display Name = Output
Name = Output
Switch = -o [value]

The $(IntDir) will go to either Debug or Release depending on your current configuration. You should be able to create a similar rule for the compiler & linker. You will also probably need to play around with the Tool Build Order (right click on the project to get to it). If you have multiple projects you should be able to create the rules once and then import them into other projects.
User avatar
elderK
Member
Member
Posts: 190
Joined: Mon Dec 11, 2006 10:54 am
Libera.chat IRC: elderK
Location: Christchurch, New Zealand
Contact:

Post by elderK »

;) My development toolchain is identical on all platforms...

For compiling, assembly, linking...
GCC 3.4.x, Binutils 2.16x

For makefiles...
Any GNU Make ive tested with ...

For image generation (fdd, raw or fat12)
My own Image generation programs...

RAMDisk / Boot Package generation
Again, my own programs ...

Emulation
BOCHS!!!

Editing?
Vi (vi, nvi, elvis, vim... whatever is there)

~Z
User avatar
sakuya84
Posts: 9
Joined: Thu May 29, 2008 3:12 pm

Post by sakuya84 »

Thx you guys for all the answer now i'll try the different combination the you told to me!!! :roll: when i can rebuild all the os i'll post a screenshot XD
User avatar
sakuya84
Posts: 9
Joined: Thu May 29, 2008 3:12 pm

Post by sakuya84 »

sorry guy i have another problem... i used minigw for compiling all .... but to replace the command cat(linux) which command i must use in windows?
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

This command simple concatenates 2 files. In windows, you just use the copy command:

Code: Select all

copy file1.txt+file2.txt
Will append file2.txt to file1.txt.

Cheers,
Adam
User avatar
sakuya84
Posts: 9
Joined: Thu May 29, 2008 3:12 pm

Post by sakuya84 »

Ok guys you can kille me now.....
when launching this command

Code: Select all

ld  -Bstatic --oformat binary  -o kernel.bin main.o functions/printk.o interrupt/idt.o functions/io_port.o interrupt/pic8259.o functions/keyboard.o  functions/string.o functions/shell.o -Ttext 0x10000 -Map kernel.map
an error occour

Code: Select all

ld: cannot perform PE operation on non PE output kernel.bin 
where i'm wrong? :-#
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

Time to build a GCC Cross-Compiler ;)

Cheers,
Adam
Post Reply