Win32 native Toolchain for PSPSDK
-
- Posts: 328
- Joined: Sun Jun 03, 2007 10:05 pm
Manual solution for now to compile stubs with psp-gcc using this toolchain itself.
Atleast I donot have to switch to cygwin back and forth!psp-gcc -I. -Id:/PSPSdk/psp/sdk/include -O2 -G0 -g -Wall -c -o myKutils.o myKutils.S
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Use it more for Development than for Gaming.
i'm wondering if adding :KickinAezz wrote:Manual solution for now to compile stubs with psp-gcc using this toolchain itself.
Atleast I donot have to switch to cygwin back and forth!psp-gcc -I. -Id:/PSPSdk/psp/sdk/include -O2 -G0 -g -Wall -c -o myKutils.o myKutils.S
Code: Select all
%.o : %.S
$(AS) $(ASFLAGS) -c -o $@ $<
-
- Posts: 328
- Joined: Sun Jun 03, 2007 10:05 pm
Gives me :hlide wrote:i'm wondering if adding :KickinAezz wrote:Manual solution for now to compile stubs with psp-gcc using this toolchain itself.
Atleast I donot have to switch to cygwin back and forth!psp-gcc -I. -Id:/PSPSdk/psp/sdk/include -O2 -G0 -g -Wall -c -o myKutils.o myKutils.Sin build.mak and build-prx.mak (\pspsdk\psp\sdk\lib), may help too.Code: Select all
%.o : %.S $(AS) $(ASFLAGS) -c -o $@ $<
Code: Select all
D:/PSPSdk/psp/sdk/lib/build.mak:207: *** multiple target patterns. Stop.
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Use it more for Development than for Gaming.
Excuse me, but i've try to compile the source of the M33 Psar Dumper, but
I reiceve this error:
unrecognized opcode `stub_start "pspPSAR",0x40090000,0x00020005'
unrecognized opcode `stub_func 0x56C924E1,pspPSARInit'
unrecognized opcode `stub_func 0x9C91DD9D,pspPSARGetNextFile'
unrecognized opcode `stub_end'
The file ext is .S not .s, i haven't find the stub.S file, where can I find it?
and there are other file needed for "compile" .S files?
Makefile:
I've the Heimdall win32 dev-kit v.0.4
Please, help...
I reiceve this error:
unrecognized opcode `stub_start "pspPSAR",0x40090000,0x00020005'
unrecognized opcode `stub_func 0x56C924E1,pspPSARInit'
unrecognized opcode `stub_func 0x9C91DD9D,pspPSARGetNextFile'
unrecognized opcode `stub_end'
The file ext is .S not .s, i haven't find the stub.S file, where can I find it?
and there are other file needed for "compile" .S files?
Makefile:
Code: Select all
TARGET = newpsardump
OBJS = main.o pspPSAR.o pspDecrypt.o
INCDIR = ../include
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS) -c
LIBDIR = ../lib
LDFLAGS =
LIBS = -lpsppower
PSP_FW_VERSION = 271
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = NEW PSAR DUMPER
BUILD_PRX = 1
include $(PSPSDK)/lib/build.mak
Please, help...
.s (or.S) files ARE the stubs themselves... when you specify a ".o" as a target, the compiler sees if there's a ".c" ".cpp" or a ".s" to make specified target object that lately will be linked with the others. The compiler will seek for functions in sources or stubs: a stub is something that says "dear compiler, i know where to find such a function, don't seek elsewhere" mainly because it's a sort of pointer to firmware's or your module's functions. So, if you have
then probably you have a main.c; the other 2 can be either .c or .s (i never played with that code, sorry)...from your message error it's likely that you need a "pspPSAR.s"...but again, i've never played with that code myself.
In modern custom firmwares, kernel functions like those needed to dump a PSAR are to be put in a kernel prx. To build a program that will make use of that prx (statically linked ), its stub is needed. So when bulding a program subdivided between main trunk and modules, you have to compile prxes FIRST, then copy all "yourprxname.s" in the folder of main program and THEN build it.
If someone has a direct experience, then i'll let him answer more indeep. Good luck.
jean
Code: Select all
OBJS = main.o pspPSAR.o pspDecrypt.o
In modern custom firmwares, kernel functions like those needed to dump a PSAR are to be put in a kernel prx. To build a program that will make use of that prx (statically linked ), its stub is needed. So when bulding a program subdivided between main trunk and modules, you have to compile prxes FIRST, then copy all "yourprxname.s" in the folder of main program and THEN build it.
If someone has a direct experience, then i'll let him answer more indeep. Good luck.
jean
Some notes :
since MINGW PSPSDK cannot distinguish .s and .S, rename .S files with .sx may work.
Otherwise, i was looking for a way to force preprocessor when assembling : two solutions.
First solution, in your own Makefile, replace :
with
Second solution, so you don't need to modify your makefiles,
in "pspsdk\psp\sdk\lib\build.mak" (build-prx.mak too), replace :
with
It works for me
Code: Select all
file.s
Assembler code.
file.S
file.sx
Assembler code which must be preprocessed.
Otherwise, i was looking for a way to force preprocessor when assembling : two solutions.
First solution, in your own Makefile, replace :
Code: Select all
ASFLAGS = ...
Code: Select all
ASFLAGS= ... -c -x assembler-with-cpp
in "pspsdk\psp\sdk\lib\build.mak" (build-prx.mak too), replace :
Code: Select all
ASFLAGS := $(CFLAGS) $(ASFLAGS)
Code: Select all
ASFLAGS := $(CFLAGS) $(ASFLAGS) -c -x assembler-with-cpp
I've resolve with:
But i haven't the file "pspstub.s", where I can find it?
Code: Select all
ASFLAGS := $(CFLAGS) $(ASFLAGS) -c -x assembler-with-cpp
no idea, the solutions I gave here were for assembling EXISTING .S files, not for CREATING them :).ne0h wrote:I've resolve with:But i haven't the file "pspstub.s", where I can find it?Code: Select all
ASFLAGS := $(CFLAGS) $(ASFLAGS) -c -x assembler-with-cpp
... Reading your earlier post ...
i don't understand your problem. The errors you gave shows that you have a .S file which was assembled WITHOUT being preprocessed. But this file needs to be preprocessed before being assembled. What I gave as solution should allow this file to be assembled AFTER being processed. So you shouldn't have any problem now if you use one of my solutions.
To update you have 2 options:
1st wait for me to have some free time and build a nice installer for you ;-)
2nd download the toolchain script from my site, http://www.jetcube.eu/projects/gcc/pspt ... 080311.zip, read the read me and get the build environment with the stuff i wrote there, for a more detailed build environment just digg on the blog it is the same build env i used for porting a linux game engine (raydium) to windows and run the script and wait about 2hr (deppends on your machine) and you'll have the same result.
Cheers!
1st wait for me to have some free time and build a nice installer for you ;-)
2nd download the toolchain script from my site, http://www.jetcube.eu/projects/gcc/pspt ... 080311.zip, read the read me and get the build environment with the stuff i wrote there, for a more detailed build environment just digg on the blog it is the same build env i used for porting a linux game engine (raydium) to windows and run the script and wait about 2hr (deppends on your machine) and you'll have the same result.
Cheers!
In the experimental folder there is a 0.6.3 build with the latest SVN changes from yesterday.
It is on experimental because I got 2 bash errors building but I think it should be ok. I'll try to build it again tonight and tag it as release 0.7.
http://sourceforge.net/project/showfile ... _id=223830
It is on experimental because I got 2 bash errors building but I think it should be ok. I'll try to build it again tonight and tag it as release 0.7.
http://sourceforge.net/project/showfile ... _id=223830
Last edited by Heimdall on Tue Apr 08, 2008 6:49 pm, edited 1 time in total.
build 0.7 is out:
these were the changes:
* Removed the dependency on groff, less, cp, mkdir, rm on the script,
now they are downloaded from the internet
* Added patch for GCC to accept: -mpreferred-stack-boundary=#
* update to SVN 2377
* PS2DEV toolchain patches are downloaded from the internet, so no
need to keep then sync with this TC
* Update usbpsplink to latest SVN
* No input required during all TC script, all configs are
- SourceForge MIRROR url
- SVN host for PS2DEV
- target dir (e.g. c:/pspsdk)
get it from the usual places:
http://www.jetcube.eu (sources)
http://sourceforge.net/project/showfile ... _id=223830 (binaries)
these were the changes:
* Removed the dependency on groff, less, cp, mkdir, rm on the script,
now they are downloaded from the internet
* Added patch for GCC to accept: -mpreferred-stack-boundary=#
* update to SVN 2377
* PS2DEV toolchain patches are downloaded from the internet, so no
need to keep then sync with this TC
* Update usbpsplink to latest SVN
* No input required during all TC script, all configs are
- SourceForge MIRROR url
- SVN host for PS2DEV
- target dir (e.g. c:/pspsdk)
get it from the usual places:
http://www.jetcube.eu (sources)
http://sourceforge.net/project/showfile ... _id=223830 (binaries)
Last edited by Heimdall on Tue Apr 08, 2008 6:49 pm, edited 1 time in total.
-
- Posts: 328
- Joined: Sun Jun 03, 2007 10:05 pm
One of the Precompiled Toolchains out there! Thank you.Heimdall wrote:build 0.7 is out:
these were the changes:
* Removed the dependency on groff, less, cp, mkdir, rm on the script,
now they are downloaded from the internet
* Added patch for GCC to accept: -mpreferred-stack-boundary=#
* update to SVN 2377
* PS2DEV toolchain patches are downloaded from the internet, so no
need to keep then sync with this TC
* Update usbpsplink to latest SVN
* No input required during all TC script, all configs are
- SourceForge MIRROR url
- SVN host for PS2DEV
- target dir (e.g. c:/pspsdk)
get it from the usual places:
http://www.jetcube.eu (sources)
http://www.box.net/shared/icfh8q944s#1:12897153 (binaries)
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Use it more for Development than for Gaming.
It means that before i had the binaries for the rm, cp and mkdir included with my source distribution, but in case you don't trust me (you are entitled to it) i now download them from the sourceforge projects during the build of the toolchain, this way you don't blame me if they don't work right :)
The second thing was, that on my toolchain scripts i used to pack the svn code from ps2dev.org, again and to avoid having to keep synchronizing all the time, I now also download them from the SVN repository.
If your internet connection is free you can use the SVN protocol and connect directly to ps2dev.org or if you're in a restrictive place you can use jim's http svn replication.
Any other questions let me know!
The second thing was, that on my toolchain scripts i used to pack the svn code from ps2dev.org, again and to avoid having to keep synchronizing all the time, I now also download them from the SVN repository.
If your internet connection is free you can use the SVN protocol and connect directly to ps2dev.org or if you're in a restrictive place you can use jim's http svn replication.
Any other questions let me know!
hilde, ne0h, jean, KickinAezz and anyone else i might have forgotten:
The problem with .S and .s files *IS NOT* related to GCC, it is all related to the gnu make port on windows, it seems that version 3.80 and 3.81 and even the latest snapshot from mingw is faulty, however 3.79 seems to work fine, for a quick fix download 3.79 from here:
http://downloads.sourceforge.net/mingw/ ... g_mirror=1
and replace the make.exe from your pspsdk\bin folder with the make.exe inside the tar.gz
I'll test if the samples compile with this version without any problem and if they do, i'll start packing this one instead of 3.81.
The problem with .S and .s files *IS NOT* related to GCC, it is all related to the gnu make port on windows, it seems that version 3.80 and 3.81 and even the latest snapshot from mingw is faulty, however 3.79 seems to work fine, for a quick fix download 3.79 from here:
http://downloads.sourceforge.net/mingw/ ... g_mirror=1
and replace the make.exe from your pspsdk\bin folder with the make.exe inside the tar.gz
I'll test if the samples compile with this version without any problem and if they do, i'll start packing this one instead of 3.81.
For this problem i've resolved with put this line in the makefile:
I've try to replace the make.exe in the pspsdk\bin folder but my compiler give me the same errors!
I've integrate the pspsdk with Dev-C++ (Bloodshed), Eclipse is better?
However tanks Heimdall!
Code: Select all
ASFLAGS := $(CFLAGS) $(ASFLAGS) -c -x assembler-with-cpp
I've integrate the pspsdk with Dev-C++ (Bloodshed), Eclipse is better?
However tanks Heimdall!
Since i've no idea what exactly is your specific problem with asm files, I tryed to reproduce the error with minifire asm demo from TyRaNiD.ne0h wrote:I've try to replace the make.exe in the pspsdk\bin folder but my compiler give me the same errors!
With the original make it fails because it replaces the name main.S with main.s when invoking psp-gcc and it gives errors, with 3.79 the name is correct and it compiles and builds the EBOOT perfectly (well only after adding the true command to the SDK whick basically is a simple int main() { return 0;} C app.
Can you please send a sample project with the error so i can try to investigate it further.
Thanks!
ne0h,
I've downloaded the m33 psar dumper and build it with SDK 0.7 and new make.exe and this is my output:
and the Makefile was untouched:
Can you confirm you're using the correct make (just for the sake of it), this is what shows on my system:
Cheers!
I've downloaded the m33 psar dumper and build it with SDK 0.7 and new make.exe and this is my output:
Code: Select all
Microsoft Windows XP [Versão 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Paulo>cd\
C:\>cd gdk\M33_NEWPSARDUMPER
C:\gdk\M33_NEWPSARDUMPER>cd src\main
C:\gdk\M33_NEWPSARDUMPER\src\main>make
psp-gcc -I../include -I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VER
SION=271 -c -o main.o main.c
psp-gcc -I../include -I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -I../include
-I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -c -c -o pspPSAR.o pspPSAR.S
psp-gcc -I../include -I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -I../include
-I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -c -c -o pspDecrypt.o pspDecrypt
.S
psp-gcc -I../include -I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VER
SION=271 -L../lib -L. -LC:/pspsdk/psp/sdk/lib -specs=C:/pspsdk/psp/sdk/lib/prxs
pecs -Wl,-q,-TC:/pspsdk/psp/sdk/lib/linkfile.prx main.o pspPSAR.o pspDecrypt.o
C:/pspsdk/psp/sdk/lib/prxexports.o -lpsppower -lpspdebug -lpspdisplay -lpspge -
lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -l
psputility -lpspuser -lpspkernel -o newpsardump.elf
psp-fixup-imports newpsardump.elf
psp-prxgen newpsardump.elf newpsardump.prx
mksfo 'NEW PSAR DUMPER' PARAM.SFO
pack-pbp EBOOT.PBP PARAM.SFO NULL \
NULL NULL NULL \
NULL newpsardump.prx NULL
[0] 408 bytes | PARAM.SFO
[1] 0 bytes | NULL
[2] 0 bytes | NULL
[3] 0 bytes | NULL
[4] 0 bytes | NULL
[5] 0 bytes | NULL
[6] 95806 bytes | newpsardump.prx
[7] 0 bytes | NULL
C:\gdk\M33_NEWPSARDUMPER\src\main>
Code: Select all
TARGET = newpsardump
OBJS = main.o pspPSAR.o pspDecrypt.o
INCDIR = ../include
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS) -c
LIBDIR = ../lib
LDFLAGS =
LIBS = -lpsppower
PSP_FW_VERSION = 271
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = NEW PSAR DUMPER
BUILD_PRX = 1
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
Code: Select all
C:\gdk\M33_NEWPSARDUMPER\src\main>make --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for mingw32
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <[email protected]>.
C:\gdk\M33_NEWPSARDUMPER\src\main>
Yes the output version is the same, but i haven't your last SDK! I've the 0.4 version, excuse me but i can't update it yet becuse i'ven't the ADSL, now i've the modem 56k connection and download 30 MB of data it was too slow!
However when i've downloaded your lastest SDK, if the compiler give me the same error i'll contact you! Excuse me for the bad english!
However when i've downloaded your lastest SDK, if the compiler give me the same error i'll contact you! Excuse me for the bad english!
Get Xplora!
-
- Posts: 51
- Joined: Sun Feb 24, 2008 3:36 am