| View previous topic :: View next topic |
| Author |
Message |
lynx44
Joined: 01 Jun 2005 Posts: 12
|
Posted: Mon Jun 20, 2005 6:19 pm Post subject: Can't get my compiled "Hello world" code to execut |
|
|
So I finally got everything to compile, but when I attempt to run the code on my 1.5 using the swap method, it just freezes on the white screen with a solid lit memory stick light. I'm using these commands to compile it in Cygwin, using the PSP toolchain:
| Code: |
./psp-gcc -march=r4000 -g -mgp32 -mlong32 -c hellopsp.c
./psp-gcc -march=r4000 -g -mgp32 -mlong32 -c pg.c
./psp-as -march=r4000 -g -mgp32 -O -o startup.o startup.s
./psp-ld -O0 startup.o hellopsp.o pg.o -M -Ttext 8900000 -q -o out > hellopsp.map
|
I'm assuming that using the assembler is fine, rather than using:
| Code: |
./psp-gcc -march=r4000 -g -mgp32 -c -xassembler -O -o startup.o startup.s
|
as it shows in the make.bat for helloworld. I tried that method, but it gives me errors, where as it doesn't with the psp assembler.
However, at the end of the make.bat in the helloworld source, it has a command, "outpatch." I'm totally new to command line stuff, and when I try to call it, it doesn't do anything. I've successfully been able to run the already compiled helloworld source, but not my own.
I also noticed that the size of data.psp in the already compiled version is about 62Kb, where mine is about 71Kb. However, when I used psp-strip, it made my file 62Kb. I've tried both versions, and neither work.
Sorry for the newb questions, but I don't see what I'm doing wrong.
-Matt |
|
| Back to top |
|
 |
Warren
Joined: 24 Jan 2004 Posts: 173 Location: San Diego, CA
|
Posted: Mon Jun 20, 2005 7:28 pm Post subject: |
|
|
There is no need to use -march=r4000 -mgp32 -mlong32 with the PSP toolchain. The -march is just plain wrong and the two -m's are builtin. You need to use outpatch as it fixes some things that the psp toolchain doesn't do yet and I suspect this is your problem.
Note to everyone that is reading this:
DO NOT USE -march=r4000 WITH THE PSP TOOLCHAIN!!!!! |
|
| Back to top |
|
 |
Guest
|
Posted: Mon Jun 20, 2005 7:35 pm Post subject: |
|
|
| Yes, those options were only suggested as temporary workarounds for some issues with using the ee-gcc toolchain for PSP dev. It was never perfect, but thats why people worked on the psp dev toolchain. From this point on, don't use any flags unless you know why they need to be used specifically for use with that toolchain. |
|
| Back to top |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Mon Jun 20, 2005 7:55 pm Post subject: |
|
|
| gorim wrote: | | Yes, those options were only suggested as temporary workarounds for some issues with using the ee-gcc toolchain for PSP dev. It was never perfect, but thats why people worked on the psp dev toolchain. From this point on, don't use any flags unless you know why they need to be used specifically for use with that toolchain. |
-march=4000 was wrong even for the EE toolchain :). If anything it should've been -march=6000, since that's what the Allegrex is closest to. |
|
| Back to top |
|
 |
lynx44
Joined: 01 Jun 2005 Posts: 12
|
Posted: Wed Jun 22, 2005 8:47 pm Post subject: |
|
|
Alright, well I still can't get this to work, not even with the new non-swap method for 1.5.
I compile with these commands:
| Code: |
./psp-gcc -c hellopsp.c
./psp-gcc -c pg.c
./psp-as startup.s
(Then I rename the a.out to startup.o)
./psp-ld startup.o pg.o hellopsp.o
(Then I rename the a.out to out)
./outpatch
|
Then I pack it into a PBP and run it, and it gives me error 800200D9. I'm supposed to use the -c flag, that tells GCC to compile it as C code, right? I don't know if I need to use some other flags or what, I'm completely new to Linux and toolchains (I've always had a Windows program of some sort with a nice "compile" button).
I'm probably making a stupid mistake, but I don't know what else to do. I've tried other variations of commands, but nothing has worked.
-Matt |
|
| Back to top |
|
 |
Savoury SnaX
Joined: 22 Jun 2005 Posts: 3
|
Posted: Thu Jun 23, 2005 12:00 am Post subject: |
|
|
| outpatch will generate a file outp from out . it is this outp that needs to be put into the pbp. |
|
| Back to top |
|
 |
lynx44
Joined: 01 Jun 2005 Posts: 12
|
Posted: Thu Jun 23, 2005 8:32 am Post subject: |
|
|
Yeah, sorry, I forgot to say that I was using the outp for the elf file. Any other suggestions?
-Matt |
|
| Back to top |
|
 |
jboldiga
Joined: 20 Jun 2005 Posts: 27
|
|
| Back to top |
|
 |
|