Problem with 'Hello World'
-
- Posts: 13
- Joined: Mon Jul 03, 2006 5:20 pm
Problem with 'Hello World'
Ok, I'm following this tutorial: http://www.psp-programming.com/tutorials/c/lesson02.htm
And I've gotten all the way to here-
"Now open up a CYGWIN Bash Shell and "cd" into your "projects/helloworld" directory. Type "make" and your shell should output some stuff to you. It will tell you if your source code had any errors that made it uncompilable. Generally, if it gives you a few warnings, it's not a big deal. Errors are what you want to watch out for, warnings are just possible points that could cause bugs. Note: if you have Firmware Version 1.50, you can automatically generate your two folders by typing "make kxploit" instead of "make.""
But when I do that I get this-
make: *** No rule to make target 'main.o', needed by 'hello.elf'. Stop.
What went wrong?
And I've gotten all the way to here-
"Now open up a CYGWIN Bash Shell and "cd" into your "projects/helloworld" directory. Type "make" and your shell should output some stuff to you. It will tell you if your source code had any errors that made it uncompilable. Generally, if it gives you a few warnings, it's not a big deal. Errors are what you want to watch out for, warnings are just possible points that could cause bugs. Note: if you have Firmware Version 1.50, you can automatically generate your two folders by typing "make kxploit" instead of "make.""
But when I do that I get this-
make: *** No rule to make target 'main.o', needed by 'hello.elf'. Stop.
What went wrong?
-
- Posts: 13
- Joined: Mon Jul 03, 2006 5:20 pm
-
- Posts: 13
- Joined: Mon Jul 03, 2006 5:20 pm
Got a problem with Lesson 3 though:
here's my code-
And here's the error I'm getting-
here's my code-
Code: Select all
// Counter Program - My Second App for the PSP
/*
This program was created by Pac Man on July 3, 2006.
It is a simple Counter Program.
*/
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <pspctrl.h>
PSP_MODULE_INFO("Counter Program", 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();
int counter = 0;
int i = 0;
SceCtrlData pad;
printf("Press [X] To Start the Timer");
sceKernelSleepThread();
return 0;
}
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CROSS) {
break;
}
}
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CIRCLE) {
break;
}
pspDebugScreenClear();
printf("Press [O] To Stop the Timer\n");
printf("Counter: %i", counter);
counter++;
for(i=0; i<5; i++) {
sceDisplayWaitVblankStart();
}
}
pspDebugScreenClear();
printf("Counter Finished.");
printf("Final Count: %i", counter);
The link at the top of the page where that tutorial was found leads to their own forums:
http://www.psp-programming.com/dev-forum/
Perhaps you'll find better support there?
http://www.psp-programming.com/dev-forum/
Perhaps you'll find better support there?
all after this is outside main function so code is
incorrect
incorrect
Code: Select all
return 0;
}
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
10011011 00101010 11010111 10001001 10111010