IDE - Mingw Developer studio, ps2dev & ps2sdk tutorial
IDE - Mingw Developer studio, ps2dev & ps2sdk tutorial
If anyone is interested here is the small tutorial how to setup MinGW Developer Studio with ps2dev & ps2sdk.
http://www.volny.cz/molej/mdswrap/
http://www.volny.cz/molej/mdswrap/
Hi
Thanks for the great tutorial, nice now to have a pretty gui for our dev ps2 needs :)
Anyway, i followed your guide completly and receive an error when i come to compile my project, my error is the following : -
"ee-gcc: cannot specify -o with -c or -S and multiple compilations"
Any ideas on what the problem could be ?
Many Thanks
Spitfire
"Fly Spitfires ! "
Thanks for the great tutorial, nice now to have a pretty gui for our dev ps2 needs :)
Anyway, i followed your guide completly and receive an error when i come to compile my project, my error is the following : -
"ee-gcc: cannot specify -o with -c or -S and multiple compilations"
Any ideas on what the problem could be ?
Many Thanks
Spitfire
"Fly Spitfires ! "
Sorry for the delayed reply ole
Anyway here is the output when i go to build my project
Thanks Again
Spitfire
--------------------Configuration: test2 - Release--------------------
Compiling source file(s)...
ps2menu.c
ee-gcc: cannot specify -o with -c or -S and multiple compilations
ee-gcc -D_EE -I\ee\include -I\common\include -I. -Wall -g0 -O2 -c ..\..\..\..\..\..\Documents and Settings\Administrator\Desktop\ps2menu sourcode\ps2menu\ps2menu.c -o Release\ps2menu.o
test2.elf - 1 error(s), 0 warning(s)
Anyway here is the output when i go to build my project
Thanks Again
Spitfire
--------------------Configuration: test2 - Release--------------------
Compiling source file(s)...
ps2menu.c
ee-gcc: cannot specify -o with -c or -S and multiple compilations
ee-gcc -D_EE -I\ee\include -I\common\include -I. -Wall -g0 -O2 -c ..\..\..\..\..\..\Documents and Settings\Administrator\Desktop\ps2menu sourcode\ps2menu\ps2menu.c -o Release\ps2menu.o
test2.elf - 1 error(s), 0 warning(s)
Hm.. I have no idea why the error occured. Maybe you should try to define PS2DK enviroment variable. Or you can try to create your project in the more "convenient" directory.... Mine output looks like that:
Code: Select all
Compiling source file(s)...
main.c
ee-gcc -D_EE -Id:\ps2dev\ps2sdk_bin\ee\include -Id:\ps2dev\ps2sdk_bin\common\include -I. -Wall -g0 -O2 -c main.c -o Release\main.o
Linking...
ee-gcc -o D:\projects\test\Release\test.elf D:\projects\test\Release\main.o -s -nostartfiles -Td:\ps2dev\ps2sdk_bin\ee\startup\linkfile d:\ps2dev\ps2sdk_bin\ee\startup\crt0.o -Ld:\ps2dev\ps2sdk_bin\ee\lib -lc -ldebug -lkernel -lsyscall
test.elf - 0 error(s), 0 warning(s)
I think it's barfing because of the space in the filename "Documents and Settings" So, gcc thinks you're compiling three files, namelySpitfire wrote:Compiling source file(s)...
ps2menu.c
ee-gcc: cannot specify -o with -c or -S and multiple compilations
ee-gcc -D_EE -I\ee\include -I\common\include -I. -Wall -g0 -O2 -c ..\..\..\..\..\..\Documents and Settings\Administrator\Desktop\ps2menu sourcode\ps2menu\ps2menu.c -o Release\ps2menu.o
test2.elf - 1 error(s), 0 warning(s)
- "..\..\..\..\..\..\Documents"
- "and"
- "Settings\Administrator\Desktop\ps2menu sourcode\ps2menu\ps2menu.c"
Probably something in the Makefile needs to be quoted so gcc doesn't get confused. Or, you could move your projects to a more normally-named directory.
hey m8's
I have a tini little prob. When i compile the file i get this output
--------------------Configuration: basel - Release--------------------
Compiling source file(s)...
test.c
ee-gcc -D_EE -I\ee\include -I\common\include -I. -Wall -g0 -O2 -frtti -fexceptions -c test.c -o Release\test.o
Linking...
ee-gcc -o C:\hey\basel\Release\basel.elf C:\hey\basel\Release\test.o -nostartfiles -T\ee\startup\linkfile \ee\startup\crt0.o -L\ee\lib -lc -ldebug -lkernel -lsyscall
basel.elf - 0 error(s), 0 warning(s)
but when I then go to the release dir, I find it empty, there is nothing inside of it... Does someone now what the prob is.. ???.. thx for any answer... //Basel
I have a tini little prob. When i compile the file i get this output
--------------------Configuration: basel - Release--------------------
Compiling source file(s)...
test.c
ee-gcc -D_EE -I\ee\include -I\common\include -I. -Wall -g0 -O2 -frtti -fexceptions -c test.c -o Release\test.o
Linking...
ee-gcc -o C:\hey\basel\Release\basel.elf C:\hey\basel\Release\test.o -nostartfiles -T\ee\startup\linkfile \ee\startup\crt0.o -L\ee\lib -lc -ldebug -lkernel -lsyscall
basel.elf - 0 error(s), 0 warning(s)
but when I then go to the release dir, I find it empty, there is nothing inside of it... Does someone now what the prob is.. ???.. thx for any answer... //Basel
here is more info about everything and tell me if i did something wrong...
MDS dir: C:\MinGWStudio\
PS2DEV dir: C:\ps2dev
PS2SDK dir: C:\ps2dev\ps2sdk
mdswrap dir: C:\ps2dev\mdswrap
Edit-->Options--->Compiler : C:\ps2dev\mdswrap\
Project Settings--->Compile--->Extra Compiling Options: -Ww,ee-gcc -D_EE -I$(PS2SDK)/ee/include -I$(PS2SDK)/common/include -I.
Project Settings--->Link--->Extra Linking Options: -Ww,ee-gcc -nostartfiles -T$(PS2SDK)/ee/startup/linkfile $(PS2SDK)/ee/startup/crt0.o -L$(PS2SDK)\ee\lib -lc -ldebug -lkernel -lsyscall
Thats all the info.. plz tell me if i typed/did anything wrong.. thx for all the help
MDS dir: C:\MinGWStudio\
PS2DEV dir: C:\ps2dev
PS2SDK dir: C:\ps2dev\ps2sdk
mdswrap dir: C:\ps2dev\mdswrap
Edit-->Options--->Compiler : C:\ps2dev\mdswrap\
Project Settings--->Compile--->Extra Compiling Options: -Ww,ee-gcc -D_EE -I$(PS2SDK)/ee/include -I$(PS2SDK)/common/include -I.
Project Settings--->Link--->Extra Linking Options: -Ww,ee-gcc -nostartfiles -T$(PS2SDK)/ee/startup/linkfile $(PS2SDK)/ee/startup/crt0.o -L$(PS2SDK)\ee\lib -lc -ldebug -lkernel -lsyscall
Thats all the info.. plz tell me if i typed/did anything wrong.. thx for all the help
Sorry for bumping such an old thread, but I just found it, and I'm having the exact same problem as the above poster. It compiles, it links, then it buggers off into the void *. The elf is nowhere to be found.
Did anyone ever get to the bottom of this?
-Edit- Did a file search for the *.elf wildcard and yep, definitely no elf being produced. Unless something is causing it to be renamed, and removed to some other dir. (Which I find hard to believe)
Did anyone ever get to the bottom of this?
-Edit- Did a file search for the *.elf wildcard and yep, definitely no elf being produced. Unless something is causing it to be renamed, and removed to some other dir. (Which I find hard to believe)
-
- Posts: 202
- Joined: Wed Aug 09, 2006 1:00 am
Ditto for bumping an old thread, but I have some new information. The new ps2sdk samples make erl files for the erl-loader. I haven't messed with it yet, but you'd have to change the compile options taken from $(EE_BIN)'s make rule in the Makefile.eeglobal file to $(EE_ERL)'s make rule options, at the bottom.
I like Codeblocks myself, and it's pretty much at the same level as Visual Studio as an ide, the nightly builds, anyway. It shouldn't be too hard getting the ps2 environment working with it.
Edit: Now that I look at it, it should be really simple, just cloning what the Makefile.pref and Makefile.eeglobal does. You can define environment variables and even edit how Codeblocks puts the commands together in the advanced options.
I like Codeblocks myself, and it's pretty much at the same level as Visual Studio as an ide, the nightly builds, anyway. It shouldn't be too hard getting the ps2 environment working with it.
Edit: Now that I look at it, it should be really simple, just cloning what the Makefile.pref and Makefile.eeglobal does. You can define environment variables and even edit how Codeblocks puts the commands together in the advanced options.
-
- Posts: 202
- Joined: Wed Aug 09, 2006 1:00 am
Simplest way to get EE compiler working in CodeBlocks
I had planned on making compiler set configurations for CodeBlocks, but it proved a little too complicated with the way things are setup, especially with all the Project creation wizards and etc., so here's a "simple" (it's kind of convoluted) way to use CodeBlocks' IDE with PS2Dev. I set it up using a precompiled toolchain, but it should work with Cygwin, too. I used a recent CodeBlocks nightly build executable. You might need to copy the cygwin1.dll to some folders so the programs run if you're using Cygwin. I use usb_mass as an example project.
Compiler Setup:
Go to Settings-> Compiler and debugger settings
Select GNU GCC Compiler, and click the Copy button.
A window appears, put PS2 EE GCC Compiler, or whatever you want to name it in the Input box and click OK.
Click the Programs tab, put the base directory of the EE toolset in the "Compiler's installation directory", C:\cygwin\ps2dev\ee or C:\ps2dev\ee or whatever, so that the bin/lib/include directories are subdirs. The programs should be setup like this:
C Compiler: ee-gcc.exe
C++ Compiler: ee-g++.exe
Linker for dynamic libs: ee-g++.exe
Linker for static libs: ee-ar.exe
Debugger: gdb.exe
Resource compiler: windres.exe
Make program: make.exe
The above step isn't exactly necessary since the Makefile/Makefile.pref/Makefile.eeglobal takes care of all the compiler setup/options, but just for completion's sake, I included it.
Under the Additional Paths tab, put C:\ps2dev\bin, or C:\cygwin\bin, the bin folder containing all the relevant programs like rm.exe, rmdir.exe, mv.exe, ps2client.exe, and etc. that are usually used in Makefiles. That's the only part that's needed.
You can make a PS2 IOP GCC Compiler set using the above instructions, just replace ee with iop.
Projects:
File->New->Project
Click Empty Project
Project wizard:
The empty project wizard comes up, click Next.
Put in a Project title, I did usb_mass as my test project, put any folder that you want to create your project in, e.g. C:\ps2dev\projects. I usually leave the project's filename alone as it's the same as the project name, so click Next.
Select PS2 EE GCC Compiler, and check Create "Release" configuration. You can change Release to EE_BIN if you want in the box, it's the target name. It doesn't really matter since the project will use a custom Makefile, with custom targets. Click Finish.
Configuring project for compiling:
Get the usb_mass source from ps2dev's subversion repository. Copy the contents of the ee folder into the CodeBlocks project dir that was made, you should have the Makefile, mass_example.c, mass_rpc.c, and mass_rpc.h. Right-click the project name, which is usb_mass, in Codeblocks, click Add files... and add the four files previously named from inside the project folder.
You should now see:
-#usb_mass
+ Sources
+ Headers
+ Others
Right-click usb_mass, again, click Properties and check the "This is a custom Makefile" checkbox. Click OK. Right-click the usb_mass one more time, click Build options. In that window, go to the "Make" Commands tab, and remove all the $targets from the commands. It should look like this:
Build project/target: $make -f $makefile
Compile single file: $make -f $makefile $file
Clean project/target: $make -f $makefile clean
Dist-clean project/target: $make -f $makefile distclean
Ok, the last thing to do is modify the Makefile because I couldn't get global compiler set variables to work, double-click the Makefile under the Others category, it'll ask how to open it and just select the option for inside the CodeBlocks editor. You will need to add the path to ps2sdk to the very top of the Makefile:
PS2SDK = C:/ps2dev/ps2sdk
(or where ever it is, I use forward facing slashes just in case)
This lets it find the included Makefile.pref and Makefile.eeglobal.
Building:
Right-click the Project name and click Build, you should get some warning messages, the sames warnings when compiling in Cygwin or a ps2dev cmd window, but it should compile, and you should have a mass_example.elf inside the usb_mass folder.
All this really does is make CodeBlocks a wrapper for make.exe, but it's the fastest way to setup & compile a ps2 project. CodeBlocks could be configured to compile ps2 projects without a custom Makefile, but I'm pretty sure it would require custom configuring a lot of project settings, the core build settings, plus target settings, and after all that, the projects couldn't be built within a native ps2dev environment without making a Makefile anyway.
Compiler Setup:
Go to Settings-> Compiler and debugger settings
Select GNU GCC Compiler, and click the Copy button.
A window appears, put PS2 EE GCC Compiler, or whatever you want to name it in the Input box and click OK.
Click the Programs tab, put the base directory of the EE toolset in the "Compiler's installation directory", C:\cygwin\ps2dev\ee or C:\ps2dev\ee or whatever, so that the bin/lib/include directories are subdirs. The programs should be setup like this:
C Compiler: ee-gcc.exe
C++ Compiler: ee-g++.exe
Linker for dynamic libs: ee-g++.exe
Linker for static libs: ee-ar.exe
Debugger: gdb.exe
Resource compiler: windres.exe
Make program: make.exe
The above step isn't exactly necessary since the Makefile/Makefile.pref/Makefile.eeglobal takes care of all the compiler setup/options, but just for completion's sake, I included it.
Under the Additional Paths tab, put C:\ps2dev\bin, or C:\cygwin\bin, the bin folder containing all the relevant programs like rm.exe, rmdir.exe, mv.exe, ps2client.exe, and etc. that are usually used in Makefiles. That's the only part that's needed.
You can make a PS2 IOP GCC Compiler set using the above instructions, just replace ee with iop.
Projects:
File->New->Project
Click Empty Project
Project wizard:
The empty project wizard comes up, click Next.
Put in a Project title, I did usb_mass as my test project, put any folder that you want to create your project in, e.g. C:\ps2dev\projects. I usually leave the project's filename alone as it's the same as the project name, so click Next.
Select PS2 EE GCC Compiler, and check Create "Release" configuration. You can change Release to EE_BIN if you want in the box, it's the target name. It doesn't really matter since the project will use a custom Makefile, with custom targets. Click Finish.
Configuring project for compiling:
Get the usb_mass source from ps2dev's subversion repository. Copy the contents of the ee folder into the CodeBlocks project dir that was made, you should have the Makefile, mass_example.c, mass_rpc.c, and mass_rpc.h. Right-click the project name, which is usb_mass, in Codeblocks, click Add files... and add the four files previously named from inside the project folder.
You should now see:
-#usb_mass
+ Sources
+ Headers
+ Others
Right-click usb_mass, again, click Properties and check the "This is a custom Makefile" checkbox. Click OK. Right-click the usb_mass one more time, click Build options. In that window, go to the "Make" Commands tab, and remove all the $targets from the commands. It should look like this:
Build project/target: $make -f $makefile
Compile single file: $make -f $makefile $file
Clean project/target: $make -f $makefile clean
Dist-clean project/target: $make -f $makefile distclean
Ok, the last thing to do is modify the Makefile because I couldn't get global compiler set variables to work, double-click the Makefile under the Others category, it'll ask how to open it and just select the option for inside the CodeBlocks editor. You will need to add the path to ps2sdk to the very top of the Makefile:
PS2SDK = C:/ps2dev/ps2sdk
(or where ever it is, I use forward facing slashes just in case)
This lets it find the included Makefile.pref and Makefile.eeglobal.
Building:
Right-click the Project name and click Build, you should get some warning messages, the sames warnings when compiling in Cygwin or a ps2dev cmd window, but it should compile, and you should have a mass_example.elf inside the usb_mass folder.
All this really does is make CodeBlocks a wrapper for make.exe, but it's the fastest way to setup & compile a ps2 project. CodeBlocks could be configured to compile ps2 projects without a custom Makefile, but I'm pretty sure it would require custom configuring a lot of project settings, the core build settings, plus target settings, and after all that, the projects couldn't be built within a native ps2dev environment without making a Makefile anyway.