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 

sdk samples run problems

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



Joined: 22 Jan 2006
Posts: 7

PostPosted: Sun Jan 22, 2006 2:55 am    Post subject: sdk samples run problems Reply with quote

Hi!

I recently downloaded newtoolchain and builded it. Everything went fine. For start, I wanted to try running some samples provided in sdk on my psp. The few I tried (ie. template) compiles fine (using "make kxploit", because I've got 1.50). But when I tried run it on my PSP screen go black, and after few seconds it shutdown. I've tried other samples to with the same effect.

Please, tell me, what could it be? Yesterday I tried older toolchain and it was exactly the same.

Cheers
Marcin
Back to top
View user's profile Send private message
koziadupa



Joined: 22 Jan 2006
Posts: 7

PostPosted: Sun Jan 22, 2006 7:48 am    Post subject: Reply with quote

hmm... I was messing up with others samples from sdk and it still does the same - screen going black and psp turns off.

It seems like the compiler generates bad executables - I really don't know what's going on :/
Back to top
View user's profile Send private message
koziadupa



Joined: 22 Jan 2006
Posts: 7

PostPosted: Thu Jan 26, 2006 7:35 am    Post subject: Reply with quote

Hi!

I've finally find out why it didn't work !
I had to add this line to the Makefile:

USE_PSPSDK_LIBC = 1

with this, everything is working now! :)

I hope this thread (written all by me :D) will help anyone in the future.

Bye
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Thu Jan 26, 2006 8:02 am    Post subject: Reply with quote

That would imply that there's something broken in newlib; if that's true we should fix it. Can you provide a copy of a built sample (something simple, like template/elf_template) that doesn't load properly?
Back to top
View user's profile Send private message
koziadupa



Joined: 22 Jan 2006
Posts: 7

PostPosted: Thu Jan 26, 2006 8:18 am    Post subject: Reply with quote

hmm, do you mean compiled one?
Back to top
View user's profile Send private message
Panajev2001a



Joined: 20 Aug 2005
Posts: 100

PostPosted: Thu Jan 26, 2006 8:48 pm    Post subject: Reply with quote

jimparis wrote:
That would imply that there's something broken in newlib; if that's true we should fix it. Can you provide a copy of a built sample (something simple, like template/elf_template) that doesn't load properly?


Oh, no... 2-2.5 hours to re-compile everything again :(.

Oh, well if it is an error in newlib I am glad it is getting caght early... I am just wondering why it happened to just one person... myabe all the others were already using PSPSDK's LIBC and did not check the built-in samples that did not use it ?
Back to top
View user's profile Send private message
Panajev2001a



Joined: 20 Aug 2005
Posts: 100

PostPosted: Thu Jan 26, 2006 8:50 pm    Post subject: Reply with quote

koziadupa wrote:
hmm, do you mean compiled one?


I do think so.

Basically take the sample that did not work and you "fixed".

Remove the PSPSDK LIBC line you added as the fix.

Re-compile as you did the first time then try the EBOOT on the PSP and verify that it does not work. Zip the directory with the sample and the compiled EBOOT and send it to jim (sorry jim, did not mean to step on your feet, but just to help koziadupa give you what you need earlier).


Last edited by Panajev2001a on Thu Jan 26, 2006 9:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
koziadupa



Joined: 22 Jan 2006
Posts: 7

PostPosted: Thu Jan 26, 2006 9:07 pm    Post subject: Reply with quote

Ok, i did what you say.

Here's the file:

http://rapidshare.de/files/11860537/elf_template.zip.html

I hope I helped
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Thu Jan 26, 2006 10:21 pm    Post subject: Reply with quote

If it's any hint, I've had problems starting homebrew on my 1.5 if I link in too many libraries that the built-in make already has, eg, I had old makefiles that had pspkernel, pspdebug etc in the LIBS which stopped working about a month or so ago. Removing those libs fixed it. The error the PSP shows is something like 'the app could not be started'.

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Fri Jan 27, 2006 1:47 am    Post subject: Reply with quote

I see the problem: the strlen function didn't get linked into your binary, and all calls to it turn into "jal 0" which causes the PSP to crash. But I have no idea how that could happen without generating an error at build time. Linker issue? Anyone have an idea? What version of the toolchain/pspsdk do you use to build that (look at the dates on /usr/local/pspdev/psp/lib/libc.a and /usr/local/pspdev/psp/sdk/lib/libpspuser.a)?
Back to top
View user's profile Send private message
koziadupa



Joined: 22 Jan 2006
Posts: 7

PostPosted: Fri Jan 27, 2006 2:07 am    Post subject: Reply with quote

these are those files:

2006-01-21 15:31 libc.a
2006-01-23 14:13 ../sdk/lib/libpspuser.a

Hm, could it be possible that linker works inappropiate because i've installed it in different prefix? (/opt/pspdev instead usr/local/pspdev)

I mean is there any else place than beginning of toolchain script, that prefix is set?
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