![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on Compiling eboot need help within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I have installed psp toolchain and now on CYGWIN I get this error screen: Could this be because my code ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
![]() |
I have installed psp toolchain and now on CYGWIN I get this error screen:
![]() Could this be because my code is wrongor is it something else? This is my main.c code: Code:
// Hello World - My First App for the PSP
/*
This program was created by Christopher Cooke
It is a simple "Hello World" Application.
*/
#include <pspkernel.h>
#include <pspdebug.h>
PSP_MODULE_INFO("HELLOWORLD",0,1,1);
#define printf pspDebugScreenPrintf
/* Exit callback */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}
/* Callback thread */
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0;
}
/* Sets up the callback thread and returns its thread id */
int SetupCallbacks(void) {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) {
sceKernelStartThread(thid, 0, 0);
}
return thid;
int myFunction() {
//Print Out 'A'
return 0;
}
int main() {
//Print Out 'B'
myFunction();
//Print Out 'C'
return 0;
}
int main() {
pspDebugScreenInit();
SetupCallbacks()
printf("Hello World");
sceKernelSleepThread();
return 0;
}
Code:
TARGET = hello OBJS = main.o CFLAGS = -O2 -G0 -Wall CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS = $(CFLAGS) EXTRA_TARGETS = EBOOT.PBP PSP_EBOOT_TITLE = Hello World PSPSDK=$(shell psp-config --pspsdk-path) include $(PSPSDK)/lib/build.mak |
|
|
|
|
|
#2 |
![]() ![]() ...in a dream...
|
....this is quite funny actually, the tutorials said in the example code to NOT do the print out A fake function junk...
try this lol... Code:
// Hello World - My First App for the PSP
/*
This program was created by Christopher Cooke
It is a simple "Hello World" Application.
*/
#include <pspkernel.h>
#include <pspdebug.h>
PSP_MODULE_INFO("HELLOWORLD",0,1,1);
#define printf pspDebugScreenPrintf
/* Exit callback */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}
/* Callback thread */
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0;
}
/* Sets up the callback thread and returns its thread id */
int SetupCallbacks(void) {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) {
sceKernelStartThread(thid, 0, 0);
}
return thid;
}
int main() {
pspDebugScreenInit();
SetupCallbacks();
printf("Hello World");
sceKernelSleepThread();
return 0;
}
__________________
...you'll never know what it's like... spending your whole life in a dream...
Launch a Kitten out of a Cannon and win real cash! Checkout my newly updated site for all my projects (Kitten Cannon, BOXHEAD, Light Cycle 3D) |
|
|
|
|
|
#5 |
![]() |
Instead of using SetupCallbacks(); use SetupCallback();. Drop the S. I was having the same problem, and i compiled without a problem. See if that works.
If it doesn't, then I don't know what else to tell you. :sad: Last edited by PSPduh; 04-05-2006 at 04:30 AM.. Reason: I put an l next to SetupCallbacks(); |
|
|
|
|
|
#6 |
![]() |
Here is my main.c:
// Hello World - My First App for the PSP /* This program was created by PSPduh on 3/31/2006 It is a simple "Hello World" Application. */ #include <pspkernel.h> #include <pspdebug.h> PSP_MODULE_INFO("Hello World", 0, 1, 1); #define printf pspDebugScreenPrintf /* Exit callback */ int exit_callback(int arg1, int arg2, void *common) { sceKernelExitGame(); return 0; } /*Callback thread */ int CallbackThread(SceSize args, void *argp) { int cbid; cbid = sceKernelCreateCallback(" Exit Callback", exit_callback, NULL); sceKernelRegisterExitCall back(cbid); sceKernelSleepThreadCB(); return 0; } /* Sets up the callback thread and returns it thread id */ int SetupCallback(void) { int thid = 0; thid = sceKernelCreateThread("up date_thread", CallbackThread, 0x11, 0xFA0, 0, 0); if(thid >=0) { sceKernelStartThread(thid , 0, 0); } return thid; } int main() { pspDebugScreenInit(); SetupCallback(); printf("Hello World"); sceKernelSleepThread(); return 0; } Try to compare it with yours, and I compiled this without a problem. EDITTED on 10/15/2006 - to hide my first name.
Last edited by duh; 10-15-2006 at 06:58 AM.. |
|
|
|
![]() |
| Tags |
| compiling , eboot |
| Thread Tools | |
|
|