forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problems with minPsp and eclipse

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
sicga



Joined: 10 Feb 2009
Posts: 4

PostPosted: Tue Feb 10, 2009 10:36 pm    Post subject: Problems with minPsp and eclipse Reply with quote

Hi

I'm trying to put an image on the screen, nothing fancy but the project won't run, first off it highlighs a lot of the include headers and states that it is 'unresolved inclusion' and secondly when I click on run it fails with 'binary not found'.

Can anyone help? Is is because the toolchain hasn't loaded correctly. I've been messing about with this for ages and am having no luck. Any assistance would be greatyl appreciated.

Thanks
Back to top
View user's profile Send private message
kuroneko



Joined: 08 Dec 2005
Posts: 24
Location: Chigasaki, Japan

PostPosted: Tue Feb 10, 2009 10:58 pm    Post subject: Re: Problems with minPsp and eclipse Reply with quote

sicga wrote:
... first off it highlighs a lot of the include headers and states that it is 'unresolved inclusion' and secondly when I click on run it fails with 'binary not found'.


Eclipse expects the toolchain binaries to be "in the path". Are they available from the command line?
Back to top
View user's profile Send private message
sicga



Joined: 10 Feb 2009
Posts: 4

PostPosted: Wed Feb 11, 2009 12:59 am    Post subject: Reply with quote

As far as I'm aware they would be in the command line, how would I check, would I have to go into PSPdev or the MinGw set up?

Thanks for your help.
Back to top
View user's profile Send private message
Oguz286



Joined: 30 Oct 2007
Posts: 35

PostPosted: Wed Feb 11, 2009 1:31 am    Post subject: Reply with quote

As blackcat suggested, you should check if the binaries are in your path. To do that open up a command window (if you're using windows). Start->Run Command. Type in cmd and press enter. Type in 'psp-gcc' and check if it says no input files or something like that. If so, then everything should be set up correctly.

But maybe it's easier to follow the "PSP Development with Eclipse" article on http://minpspw.sourceforge.net/ (which is what I'm using and it works like a charm).
_________________
Setting up pspsdk on ubuntu and upcoming tutorials: http://www.guztech.nl
Back to top
View user's profile Send private message
sicga



Joined: 10 Feb 2009
Posts: 4

PostPosted: Wed Feb 11, 2009 6:30 am    Post subject: Reply with quote

HI

Thanks for that information. Everything seems to be set up ok. I downloaded the article on how to set up and did everything written down but was still unable to launch the program, which at least was a step further but now it has gone back to not recognising the header files and missing the binaries. I have a later version than that shown in the article and it wasn't possible to do all the steps because certain boxes that needed ticking weren't there. I've looked for these headers - such as pspdisplay.h and I can't find them anywhere. Is there somewhere where I can download a copy of the toolchain for minpsp (it was supposed to be in the SDK but it may not have been complete)? I've been at this for a week so far and am getting nowhere. Any help would be appreciated.
Back to top
View user's profile Send private message
kuroneko



Joined: 08 Dec 2005
Posts: 24
Location: Chigasaki, Japan

PostPosted: Wed Feb 11, 2009 9:54 am    Post subject: Re: Problems with minPsp and eclipse Reply with quote

sicga wrote:
... secondly when I click on run it fails with 'binary not found'.

Having thought about this, there is no point Run(ning) the PSP binary on your PC. This error - IIRC - results from launch shortcut creation which tries to find a type of executable suitable for your eclipse platform (e.g. win32 -> *.exe). I'm not familiar with this particular setup but I think the PSP toolchain links into ELF (eclipse can recognise ELF's as binary but they would only run on the real target).

Does compilation work?

I'll have a look at the stuff Oguz286 referred to and see if I can reproduce it.

[Later ...]

OK, so I installed the 0.8.11 SDK and simply followed the instructions outlined in PSP Development with Eclipse. And it just works.

Initially - i.e. before the first build - all include files in the outline view will have a warning attached. After the build, once the scanner info builder ran, most of them change to normal.

However, system includes which live under libs stay marked because the compiler only reports psp/sdk/include as a system path (which means that the outline view can't verify the libc/*.h). The compiler itself knows about them so you can use functions defined in there without problems. If you want to get rid of the markers you'll have to use e.g.
Code:
#include <libc/string.h>

or add the extra search path manually.

Also, the cube example mentioned in the guide refers to <math.h> which doesn't exist, but as it isn't used it doesn't matter.

HTH
Back to top
View user's profile Send private message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Wed Feb 11, 2009 9:47 pm    Post subject: Reply with quote

One more thing, you cannot run your app directly from Eclipse (this is expected), since you are cross compiling an app from a MIPS CPU while your PC runs on a Intel CPU.

The Cross compiler will generate a Elf binary which doesn't run on windows (except you have a emulator).

You can code, compile and use the psplink to upload and run your app and that can be achieved using custom tools the red toolbox icon on eclipse, but not the standard green run button.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
sicga



Joined: 10 Feb 2009
Posts: 4

PostPosted: Thu Feb 12, 2009 12:42 am    Post subject: Reply with quote

HI

Thanks for that information, I am getting further. I do have an emulator(MinGW I think). Now I am getting stuck on the makefile. I don't really know anything about makefiles and I copied a working one on the hello worl program sample, changing the names where appropriate. My makefile looks like this

make:
all: moon.exe

clean:
rm lunar.o moon.exe

moon.exe: lunar.o
g++ -g -o moon lunar.o

lunar.o
g++ -c -g lunar.c


The error I get is that there is no seperator at line 5. 'moon' is the name of the project and 'lunar' is the 'c' file. Anyone have any idea what this seperator is?

I must admit makefiles are unfamiliar to me and I don't really know how to put one together. Any advice would be greatly appreciated.
Back to top
View user's profile Send private message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Thu Feb 12, 2009 4:14 am    Post subject: Reply with quote

MinGW is not an emulator but a framework to let gcc (the compiler on wich pspsdk is heavily based) be suitable under windows (now you can use Heimdall's). We meant a PSP emulator, and even if you had a working one (it doesn't exist a full working PSP emulator) chanches are small that it comes ready for use under eclipse. The easier procedure to write and test an homebrew is:
1) write it however you like
2) compile it issuing "make" at command prompt while in your sources' path
3) copy generated EBOOT.PBP under game/[your_app_name]
4) launch app under PSP

Once you get fluent in programming and the transfer between PC and PSP becomes the bottleneck in your dev days, then start considering PSPLink.
Back to top
View user's profile Send private message
kuroneko



Joined: 08 Dec 2005
Posts: 24
Location: Chigasaki, Japan

PostPosted: Thu Feb 12, 2009 10:03 am    Post subject: Reply with quote

sicga wrote:
The error I get is that there is no seperator at line 5. 'moon' is the name of the project and 'lunar' is the 'c' file. Anyone have any idea what this seperator is?

A separator is e.g. a TAB character (don't know if make accepts SPACES, never tried), i.e. commands associated with a target can't start at the beginning of the line, you have to indent them, e.g.

clean:
<TAB>rm -f lunar.o moon.exe
Back to top
View user's profile Send private message
ITDemo



Joined: 17 Nov 2007
Posts: 20

PostPosted: Mon Feb 23, 2009 9:38 am    Post subject: Reply with quote

To be honest I think you should just visit psp-programming.com before going any futher and follow the tutorials on that site.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group