sdk samples run problems

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
koziadupa
Posts: 7
Joined: Sun Jan 22, 2006 2:21 am

sdk samples run problems

Post by koziadupa »

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
koziadupa
Posts: 7
Joined: Sun Jan 22, 2006 2:21 am

Post by koziadupa »

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 :/
koziadupa
Posts: 7
Joined: Sun Jan 22, 2006 2:21 am

Post by koziadupa »

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
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

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?
koziadupa
Posts: 7
Joined: Sun Jan 22, 2006 2:21 am

Post by koziadupa »

hmm, do you mean compiled one?
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Post by Panajev2001a »

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 ?
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Post by Panajev2001a »

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.
koziadupa
Posts: 7
Joined: Sun Jan 22, 2006 2:21 am

Post by koziadupa »

Ok, i did what you say.

Here's the file:

http://rapidshare.de/files/11860537/elf ... e.zip.html

I hope I helped
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

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
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

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)?
koziadupa
Posts: 7
Joined: Sun Jan 22, 2006 2:21 am

Post by koziadupa »

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?
Post Reply