PSP turns off with my homebrew, any ideas?

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

Moderators: cheriff, TyRaNiD

Post Reply
LuaNoob
Posts: 4
Joined: Wed Sep 21, 2005 12:13 pm

PSP turns off with my homebrew, any ideas?

Post by LuaNoob »

Hi, this is my first post, I've read all the instructions to install cygwin and the pspsdk, after 4 days finally I made it 100% and I was able to copy and build the hello world example, my bios is 1.5 and used the kxploit tool to generate the eboot.pbp and the exploit one, copied them into my memory stick, but after I run the hello world, my psp went to the PSP logo screen, then after some seconds it just turns off, and that's all.

Just in case... After I compiled the hello world example I've got this on screen:

Code: Select all

$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/
pspdev/psp/sdk/lib   main.o  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk
-lc -lpspuser -lpspkernel -o hello.elf
psp-fixup-imports hello.elf
psp-strip hello.elf -o hello_strip.elf
pack-pbp EBOOT.PBP PARAM.SFO NULL  \
        NULL NULL NULL  \
        NULL  hello_strip.elf NULL
rm -f hello_strip.elf
And then:

Code: Select all

$ ls
EBOOT.PBP  Makefile  PARAM.SFO  hello.elf  main.c  main.o
So I've got the eboot.pbp, can anyone tell what did I did wrong?

Thanks for any help


I am new to the PSP Homebrew but not to programming


Oh, I forgot, here is also the hello world code I copied:

Code: Select all

 // Hello World - My First App for the PSP

/*
          This program was created by (Your Name Here) on (Date Here)
          It is a simple "Hello World" Application.
*/
#include <pspkernel.h>
#include <pspdebug.h>
PSP_MODULE_INFO&#40;"Hello World", 0, 1, 1&#41;;
#define printf pspDebugScreenPrintf

 /* Exit callback */
int exit_callback&#40;int arg1, int arg2, void *common&#41; &#123;
          sceKernelExitGame&#40;&#41;;
          return 0;
&#125;

/* Callback thread */
int CallbackThread&#40;SceSize args, void *argp&#41; &#123;
          int cbid;

          cbid = sceKernelCreateCallback&#40;"Exit Callback", exit_callback, NULL&#41;;
          sceKernelRegisterExitCallback&#40;cbid&#41;;

          sceKernelSleepThreadCB&#40;&#41;;

          return 0;
&#125;

/* Sets up the callback thread and returns its thread id */
int SetupCallbacks&#40;void&#41; &#123;
          int thid = 0;

          thid = sceKernelCreateThread&#40;"update_thread", CallbackThread, 0x11, 0xFA0, 0, 0&#41;;
          if&#40;thid >= 0&#41; &#123;
                    sceKernelStartThread&#40;thid, 0, 0&#41;;
          &#125;

          return thid;
&#125;
int main&#40;&#41; &#123;
	pspDebugScreenInit&#40;&#41;;
	SetupCallbacks&#40;&#41;;
	
	printf&#40;"Hello World Test"&#41;;
	sceKernelSleepThread&#40;&#41;;
	return 0;
&#125;
Thanks for any help
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

The PSP turns off because your thread hangs for some reason, which the watchdog notices this and shuts down the system. Look into installing the exceptionhandler which will give you a hint about what went wrong, instead of just crashing.
GE Dominator
LuaNoob
Posts: 4
Joined: Wed Sep 21, 2005 12:13 pm

Post by LuaNoob »

this is really weird...
I compiled the Sprites demo in the SDK, again no problems (while compiling), then generated the KXploit files, put everything in my 1.50 PSP and again it shut off :(

I don't know what is exactly wrong, then I run PSPe 0.9b, and I got this error:

Code: Select all

libpng error&#58; Not a PNG file
Fatal signal&#58; Segmentation Fault &#40;SDL Parachute Deployed&#41;
with my hello world homebrew example, then I compiled the sprite demo from the SDK and got the same error, PSP Shuts off and same error in PSPe.

Anyone have an idea?
My install is a fresh install of cygwin , i did finished installing everything yesterday so I can assume that PSP SDK is the latest.

Thanks =(
LuaNoob
Posts: 4
Joined: Wed Sep 21, 2005 12:13 pm

Post by LuaNoob »

Well, seems that still I am stuck with this problem...
Here is another update, if someone have an idea that can help me, I've downloaded "ghost_in_the_matrix_v_0_1_src" source code, and I tried to compile it, and got this error:

Code: Select all

$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D _droponly -D _m
ute -D _god -D _debug   -c -o main.o main.c
In file included from main.c&#58;21&#58;
home_button.c&#58; In function 'CallbackThread'&#58;
home_button.c&#58;21&#58; warning&#58; passing argument 2 of 'sceKernelCreateCallback' from
incompatible pointer type
home_button.c&#58; In function 'SetupCallbacks'&#58;
home_button.c&#58;33&#58; warning&#58; passing argument 2 of 'sceKernelCreateThread' from in
compatible pointer type
In file included from main.c&#58;23&#58;
menu_home.c&#58; In function 'waitHomeMenu'&#58;
menu_home.c&#58;70&#58; error&#58; 'CTRL_DOWN' undeclared &#40;first use in this function&#41;
menu_home.c&#58;70&#58; error&#58; &#40;Each undeclared identifier is reported only once
menu_home.c&#58;70&#58; error&#58; for each function it appears in.&#41;
menu_home.c&#58;76&#58; error&#58; 'CTRL_UP' undeclared &#40;first use in this function&#41;
menu_home.c&#58; In function 'drawHomeMenu'&#58;
menu_home.c&#58;140&#58; error&#58; 'CTRL_START' undeclared &#40;first use in this function&#41;
menu_home.c&#58;140&#58; error&#58; 'CTRL_CROSS' undeclared &#40;first use in this function&#41;
menu_home.c&#58;140&#58; error&#58; 'CTRL_SQUARE' undeclared &#40;first use in this function&#41;
menu_home.c&#58;140&#58; error&#58; 'CTRL_TRIANGLE' undeclared &#40;first use in this function&#41;
menu_home.c&#58;140&#58; error&#58; 'CTRL_CIRCLE' undeclared &#40;first use in this function&#41;
In file included from main.c&#58;24&#58;
menu_howtosurvive.c&#58; In function 'waitHowToSurviveMenu'&#58;
menu_howtosurvive.c&#58;67&#58; error&#58; 'CTRL_START' undeclared &#40;first use in this functi
on&#41;
menu_howtosurvive.c&#58;67&#58; error&#58; 'CTRL_CROSS' undeclared &#40;first use in this functi
on&#41;
menu_howtosurvive.c&#58;67&#58; error&#58; 'CTRL_SQUARE' undeclared &#40;first use in this funct
ion&#41;
menu_howtosurvive.c&#58;67&#58; error&#58; 'CTRL_TRIANGLE' undeclared &#40;first use in this fun
ction&#41;
menu_howtosurvive.c&#58;67&#58; error&#58; 'CTRL_CIRCLE' undeclared &#40;first use in this funct
ion&#41;
menu_howtosurvive.c&#58; In function 'drawHowToSurviveMenu'&#58;
menu_howtosurvive.c&#58;95&#58; error&#58; 'CTRL_START' undeclared &#40;first use in this functi
on&#41;
menu_howtosurvive.c&#58;95&#58; error&#58; 'CTRL_CROSS' undeclared &#40;first use in this functi
on&#41;
menu_howtosurvive.c&#58;95&#58; error&#58; 'CTRL_SQUARE' undeclared &#40;first use in this funct
ion&#41;
menu_howtosurvive.c&#58;95&#58; error&#58; 'CTRL_TRIANGLE' undeclared &#40;first use in this fun
ction&#41;
menu_howtosurvive.c&#58;95&#58; error&#58; 'CTRL_CIRCLE' undeclared &#40;first use in this funct
ion&#41;
In file included from main.c&#58;25&#58;
menu_credits.c&#58; In function 'waitCreditsMenu'&#58;
menu_credits.c&#58;47&#58; error&#58; 'CTRL_START' undeclared &#40;first use in this function&#41;
menu_credits.c&#58;47&#58; error&#58; 'CTRL_CROSS' undeclared &#40;first use in this function&#41;
menu_credits.c&#58;47&#58; error&#58; 'CTRL_SQUARE' undeclared &#40;first use in this function&#41;
menu_credits.c&#58;47&#58; error&#58; 'CTRL_TRIANGLE' undeclared &#40;first use in this function
&#41;
menu_credits.c&#58;47&#58; error&#58; 'CTRL_CIRCLE' undeclared &#40;first use in this function&#41;
menu_credits.c&#58; In function 'drawCreditsMenu'&#58;
menu_credits.c&#58;75&#58; error&#58; 'CTRL_START' undeclared &#40;first use in this function&#41;
menu_credits.c&#58;75&#58; error&#58; 'CTRL_CROSS' undeclared &#40;first use in this function&#41;
menu_credits.c&#58;75&#58; error&#58; 'CTRL_SQUARE' undeclared &#40;first use in this function&#41;
menu_credits.c&#58;75&#58; error&#58; 'CTRL_TRIANGLE' undeclared &#40;first use in this function
&#41;
menu_credits.c&#58;75&#58; error&#58; 'CTRL_CIRCLE' undeclared &#40;first use in this function&#41;
main.c&#58; In function 'halt'&#58;
main.c&#58;53&#58; error&#58; 'CTRL_START' undeclared &#40;first use in this function&#41;
main.c&#58; In function 'main'&#58;
main.c&#58;85&#58; error&#58; 'g_elf_name' undeclared &#40;first use in this function&#41;
make&#58; *** &#91;main.o&#93; Error 1
From here, I assume that (1) my sdk is wrong? cause using different names for variables means I am using the wrong sdk?
(2) my set up is wrong?
(3) or the source code I downloaded shouldn't be compiled with this sdk.

Anyone can help me? I am really confused about which SDK to use, I followed the tutorial posted everywhere, how to instal cygwin, the toolchain and the sdk but seems that I did something wrong?

Thanks.
taejung kim
Posts: 3
Joined: Mon Jan 02, 2006 12:37 pm

Re: PSP turns off with my homebrew, any ideas?

Post by taejung kim »

LuaNoob wrote:Hi, this is my first post, I've read all the instructions to install cygwin and the pspsdk, after 4 days finally I made it 100% and I was able to copy and build the hello world example, my bios is 1.5 and used the kxploit tool to generate the eboot.pbp and the exploit one, copied them into my memory stick, but after I run the hello world, my psp went to the PSP logo screen, then after some seconds it just turns off, and that's all.

Just in case... After I compiled the hello world example I've got this on screen:

Code: Select all

$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/
pspdev/psp/sdk/lib   main.o  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk
-lc -lpspuser -lpspkernel -o hello.elf
psp-fixup-imports hello.elf
psp-strip hello.elf -o hello_strip.elf
pack-pbp EBOOT.PBP PARAM.SFO NULL  \
        NULL NULL NULL  \
        NULL  hello_strip.elf NULL
rm -f hello_strip.elf
And then:

Code: Select all

$ ls
EBOOT.PBP  Makefile  PARAM.SFO  hello.elf  main.c  main.o
So I've got the eboot.pbp, can anyone tell what did I did wrong?

Thanks for any help


I am new to the PSP Homebrew but not to programming


Oh, I forgot, here is also the hello world code I copied:

Code: Select all

 // Hello World - My First App for the PSP

/*
          This program was created by &#40;Your Name Here&#41; on &#40;Date Here&#41;
          It is a simple "Hello World" Application.
*/
#include <pspkernel.h>
#include <pspdebug.h>
PSP_MODULE_INFO&#40;"Hello World", 0, 1, 1&#41;;
#define printf pspDebugScreenPrintf

 /* Exit callback */
int exit_callback&#40;int arg1, int arg2, void *common&#41; &#123;
          sceKernelExitGame&#40;&#41;;
          return 0;
&#125;

/* Callback thread */
int CallbackThread&#40;SceSize args, void *argp&#41; &#123;
          int cbid;

          cbid = sceKernelCreateCallback&#40;"Exit Callback", exit_callback, NULL&#41;;
          sceKernelRegisterExitCallback&#40;cbid&#41;;

          sceKernelSleepThreadCB&#40;&#41;;

          return 0;
&#125;

/* Sets up the callback thread and returns its thread id */
int SetupCallbacks&#40;void&#41; &#123;
          int thid = 0;

          thid = sceKernelCreateThread&#40;"update_thread", CallbackThread, 0x11, 0xFA0, 0, 0&#41;;
          if&#40;thid >= 0&#41; &#123;
                    sceKernelStartThread&#40;thid, 0, 0&#41;;
          &#125;

          return thid;
&#125;
int main&#40;&#41; &#123;
	pspDebugScreenInit&#40;&#41;;
	SetupCallbacks&#40;&#41;;
	
	printf&#40;"Hello World Test"&#41;;
	sceKernelSleepThread&#40;&#41;;
	return 0;
&#125;
Thanks for any help
um..

i met this problem..
i resolve it..
you modify makefile
"CFLAGS = -O2 -G0 -Wall -mlong32"
"-mlong32" option

good luck!!
Koba
Posts: 59
Joined: Thu Sep 29, 2005 10:57 am

Post by Koba »

i would uninstall Cygwin, and do a complete reinstall of cygwin and your libs... that usually fixes the problem.
Post Reply