I want to help with the tutorial for GCC/Binutils.
Sorry for my bad english.
I have an working VS 2008 Solution configured for cygwin GCC/Binutils using an simple Makefile.
With you want I can write an tutorial for this, or send the code to you.
Its launch bochs and I plan to atach to it with GDB 7.0.
GCC/Binutils, I want to help
Moderator:Moderators
- joniwalker
- Posts:7
- Joined:Sat Nov 21, 2009 1:09 pm
Last edited by joniwalker on Sun Feb 21, 2010 1:02 pm, edited 1 time in total.
Current developing:
- Jupitel OS - A Win32/Linux Hybrid System
- Line Dark The Secret of Knight a 2d/3d MMORPG game
Re: GCC/Binutils, I want to help
If you want help on gcc/binutils you can visit wiki.osdev.org, there you will have all the answers.
Re: GCC/Binutils, I want to help
He doesn't want help, he wants to help, presumably with writing a chapter about configuring Cygwin for operating systems' development. Did I understand correctly?
- joniwalker
- Posts:7
- Joined:Sat Nov 21, 2009 1:09 pm
Re: GCC/Binutils, I want to help
Yes, is this that I want.Fanael wrote:He doesn't want help, he wants to help, presumably with writing a chapter about configuring Cygwin for operating systems' development. Did I understand correctly?
Current developing:
- Jupitel OS - A Win32/Linux Hybrid System
- Line Dark The Secret of Knight a 2d/3d MMORPG game
Re: GCC/Binutils, I want to help
Hello,
It is great that you would like to contribute
If you wish, please feel free to do so - it can be uploaded as-is so all credit goes to the original author.
It is great that you would like to contribute

Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
- joniwalker
- Posts:7
- Joined:Sat Nov 21, 2009 1:09 pm
The final tutorial
Mike, you must write the final tutorial for the web site. Changing the design of the tutorial.
Download the base files on the attachment.
First, create the subdirs:
Then, on the main dir, copy the *.bat files and the dobuild.sh file from the base files.
On the src dir, put the Makefile, the Makerules and the kernel.ld from the src dir from base files.
On each code subdir, put a Makefile with the next code:
$(ROOT) is set on domake.bat
For this you need to set the CYGPATH variable to the path of cygwin.
You need to change the compilers in Makerules file
You can use the i586-elf-gcc, for this, see wiki.osdev.org/GCC_Cross-Compiler
You need to put these files on the $(CYGPATH)/usr/cross/
Then add the name of the code dirs on the main Makefile:
Back to VS 2008 or VC Express.
Go to properties of the project, in Debugging, type the command line of the emulator.
On the NMake, type:
Build command line: cd $(SolutionDir) <NewLine> build.bat
Rebuild command line: cd $(SolutionDir) <NewLine> rebuild.bat
Clean command line: cd $(SolutionDir) <NewLine> clean.bat
Output: The final executable.
Common language runtime: No support
Preprocessor definition: X86;__ELF__;_DEBUG and anymore that you want, splited by ;.
Include search path: $(SolutionDir)\src\include\
If you change the preprocessor definitions, go to the makerules and edit the DEFINES to some like this:
The DEFINESASM is only for asm code.
With these Makefiles, you can use:
On the main makefile:
Edit to change the cp command to copy to the correct dir.
Download the base files on the attachment.
First, create the subdirs:
- vcproj
- src
Then, on the main dir, copy the *.bat files and the dobuild.sh file from the base files.
On the src dir, put the Makefile, the Makerules and the kernel.ld from the src dir from base files.
On each code subdir, put a Makefile with the next code:
Code: Select all
LIBNAME=The name of the current dir
include $(ROOT)/Makerules
# This not work yet
export-lib-dir:
@shell export CURLIBDIR=`pwd`
For this you need to set the CYGPATH variable to the path of cygwin.
You need to change the compilers in Makerules file
You can use the i586-elf-gcc, for this, see wiki.osdev.org/GCC_Cross-Compiler
You need to put these files on the $(CYGPATH)/usr/cross/
Then add the name of the code dirs on the main Makefile:
Code: Select all
DIRS = Name of the code dirs with the makefile above.
Go to properties of the project, in Debugging, type the command line of the emulator.
On the NMake, type:
Build command line: cd $(SolutionDir) <NewLine> build.bat
Rebuild command line: cd $(SolutionDir) <NewLine> rebuild.bat
Clean command line: cd $(SolutionDir) <NewLine> clean.bat
Output: The final executable.
Common language runtime: No support
Preprocessor definition: X86;__ELF__;_DEBUG and anymore that you want, splited by ;.
Include search path: $(SolutionDir)\src\include\
If you change the preprocessor definitions, go to the makerules and edit the DEFINES to some like this:
Code: Select all
DEFINES=-DX86 -DDEBUG -DMULTIBOOT_KERNEL -DWhat you want
With these Makefiles, you can use:
- C code with .c extension.
- C++ code with .cpp extension.
- NASM code with .asm extension.
- GNU ASM code with .S extension.
On the main makefile:
Edit to change the cp command to copy to the correct dir.
- Attachments
-
- basefiles.zip
- The base files.
- (2.91KiB)Downloaded 2312 times
Current developing:
- Jupitel OS - A Win32/Linux Hybrid System
- Line Dark The Secret of Knight a 2d/3d MMORPG game