OS Development using DJGPP and Bran's tutorial
Posted: Mon Mar 02, 2009 11:17 am
Hi,
I'm trying to learn some kernel development but I'm having some troubles on the Bran's kernel development tutorial. I was able to get setup, compile and link the first assembly, and run it on virtual pc with a virtual floppy. I'm having some troubles now though, compiling the c code. I downloaded and installed the DJGPP from osdever.net's download section (with c++) and ran the installer. For some reason I get the following errors while trying to compiler:
----------Dan's Operating System----------
Welcome to the system compiler. This will take the system's source code and crea
te kernel.bin.
Press any key to continue . . .
In file included from <command line>:1:
c:/djgpp/lib/gcc-lib/djgpp/3.1/djgpp.ver:1:25: sys/version.h: No such file or di
rectory (ENOENT)
main.c:20: warning: return type of `main' is not `int'
c:/users/dan/desktop/operat~2/2009/source/tools/ld.exe: cannot open main.o: No s
uch file or directory (ENOENT)
Mission complete! kernel.bin is now in the \build folder.
Press any key to continue . . .
Here is my bat file:
I followed the tutorials perfectly and I have no idea why I'm getting these errors. Does anyone know what's being done wrong? Thank you guys for the help
I'm trying to learn some kernel development but I'm having some troubles on the Bran's kernel development tutorial. I was able to get setup, compile and link the first assembly, and run it on virtual pc with a virtual floppy. I'm having some troubles now though, compiling the c code. I downloaded and installed the DJGPP from osdever.net's download section (with c++) and ran the installer. For some reason I get the following errors while trying to compiler:
----------Dan's Operating System----------
Welcome to the system compiler. This will take the system's source code and crea
te kernel.bin.
Press any key to continue . . .
In file included from <command line>:1:
c:/djgpp/lib/gcc-lib/djgpp/3.1/djgpp.ver:1:25: sys/version.h: No such file or di
rectory (ENOENT)
main.c:20: warning: return type of `main' is not `int'
c:/users/dan/desktop/operat~2/2009/source/tools/ld.exe: cannot open main.o: No s
uch file or directory (ENOENT)
Mission complete! kernel.bin is now in the \build folder.
Press any key to continue . . .
Here is my bat file:
Code: Select all
@ ECHO OFF
set DJGPP=C:\DJGPP\DJGPP.ENV
set PATH=C:\DJGPP\BIN;%PATH%
CLS
ECHO ----------Dan's Operating System----------
ECHO Welcome to the system compiler. This will take the system's source code and create kernel.bin.
PAUSE
rem compile the assembly code
tools\nasm -f aout -o start.o start.asm
rem gcc commands
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o main.o main.c
rem links files. remeber to add each *.o file to the end of this line
tools\ld -T link.ld -o build\kernel.bin start.o main.o
rem del *.o
ECHO Mission complete! kernel.bin is now in the \build folder.
PAUSE
I followed the tutorials perfectly and I have no idea why I'm getting these errors. Does anyone know what's being done wrong? Thank you guys for the help