Trying to get 'hello world' to work ...
Posted: Sat May 21, 2005 4:12 am
Hi,
I have an umodded PS2 with the independece exploit on my MC.
I've installed the toolchain using Cygwin on Windows XP.
Now I try to get the 'Hello world !' program to work on my PS2.
It builds, but when I ty to execute it on my PS2 using PS2Menu Loader
(v2.1) nothing happens (at least not what I expect to happen).
I've put the hello.elf in /mc/0/BEDATA-SYSTEM.
After executing I get;
PSMENU Loader v.2.1.
Init Mr Brown sbv(?) patches
argv[0]=/mc/0/... path to hello.elf
argv[1]=hdd0:... last installed game hdloader
Loading mc0:/... path again
EE:LoadElf returned 0
EE:Creating User Thread ( .. some numbers ..)
Created user thread 12
LoadElf returned 12
... and then it 'hangs'.
This is my source:
#include <tamtypes.h>
#include <sifcmd.h>
#include <kernel.h>
#include <sifrpc.h>
#include "sio.h"
int main(int argc, char *argv[])
{
int i;
SifInitRpc(0);
printf("Oscar Says: Hello, world!\n");
printf("I am called %s\n", argv[0]);
for (i=0;i< argc; i++)
printf("Oscar says Arg[%d]: %s\n",i, argv);
sio_init(115200, 0, 0, 0, 0);
sio_printf("Hello from EE SIO!\n");
/* Return to the bootloader or PS2 browser. */
return 0;
}
I don't think the Rpc init is nessecary because I don't do RPC.
Is the above program supposed to work of my MC ?
If anyone could give me some info that would be nice (I do RTFM but
there are many FM's :-))
BTW: I've changed the original hello.c a bit but the original did not
work either ...
Cheers for any comments,
Oscar
I have an umodded PS2 with the independece exploit on my MC.
I've installed the toolchain using Cygwin on Windows XP.
Now I try to get the 'Hello world !' program to work on my PS2.
It builds, but when I ty to execute it on my PS2 using PS2Menu Loader
(v2.1) nothing happens (at least not what I expect to happen).
I've put the hello.elf in /mc/0/BEDATA-SYSTEM.
After executing I get;
PSMENU Loader v.2.1.
Init Mr Brown sbv(?) patches
argv[0]=/mc/0/... path to hello.elf
argv[1]=hdd0:... last installed game hdloader
Loading mc0:/... path again
EE:LoadElf returned 0
EE:Creating User Thread ( .. some numbers ..)
Created user thread 12
LoadElf returned 12
... and then it 'hangs'.
This is my source:
#include <tamtypes.h>
#include <sifcmd.h>
#include <kernel.h>
#include <sifrpc.h>
#include "sio.h"
int main(int argc, char *argv[])
{
int i;
SifInitRpc(0);
printf("Oscar Says: Hello, world!\n");
printf("I am called %s\n", argv[0]);
for (i=0;i< argc; i++)
printf("Oscar says Arg[%d]: %s\n",i, argv);
sio_init(115200, 0, 0, 0, 0);
sio_printf("Hello from EE SIO!\n");
/* Return to the bootloader or PS2 browser. */
return 0;
}
I don't think the Rpc init is nessecary because I don't do RPC.
Is the above program supposed to work of my MC ?
If anyone could give me some info that would be nice (I do RTFM but
there are many FM's :-))
BTW: I've changed the original hello.c a bit but the original did not
work either ...
Cheers for any comments,
Oscar