Win32 native Toolchain for PSPSDK
-
- Posts: 36
- Joined: Thu Nov 29, 2007 7:08 pm
Your are my star Heimdall. That's great!!!
One question, I installed the freetype devpack and get the following error when trying to compile a sample project:
cannot find -llibfreetype
I guess the libraries must be registered somehow but I don'tknow how. I already added the lib path to the makefile in LIBDIR = .... but not any better. Can you help?
Also, where can I download the latest release?
One question, I installed the freetype devpack and get the following error when trying to compile a sample project:
cannot find -llibfreetype
I guess the libraries must be registered somehow but I don'tknow how. I already added the lib path to the makefile in LIBDIR = .... but not any better. Can you help?
Also, where can I download the latest release?
I had a bug on the installer on the initial devpaks. The one ones from the 28th should be fixed.
starting from the 28th all devpaks install the header files to:
$PSPSDK/../include (this is the same as C:\pspsdk\psp\include) if you install to c:\pspsdk
and the libs to:
$PSPSDK/../lib (this is the same as C:\pspsdk\psp\lib) if you install to c:\pspsdk
before, since i had a bug on my installer script it was instaling to c:\pspsdk\include and c:\pspsdk\lib
I'm working in some tweaks and next build of the devpaks will also include a native port of sdl-config and freetype-config so you can just add to your makefile:
$(shell freetype-config --cflags) and it works!
Cheers!
starting from the 28th all devpaks install the header files to:
$PSPSDK/../include (this is the same as C:\pspsdk\psp\include) if you install to c:\pspsdk
and the libs to:
$PSPSDK/../lib (this is the same as C:\pspsdk\psp\lib) if you install to c:\pspsdk
before, since i had a bug on my installer script it was instaling to c:\pspsdk\include and c:\pspsdk\lib
I'm working in some tweaks and next build of the devpaks will also include a native port of sdl-config and freetype-config so you can just add to your makefile:
$(shell freetype-config --cflags) and it works!
Cheers!
i was really interested with your devkit, so i installed it to test it : it really messes up with the cygwin pspsdk i have. Not only that, when i try to build, it cannot find psp-gcc . If i run "cmd" and "echo %PATH%", i can find "d:\cygwin\usr\local\pspdev\bin" (cygwin) then "d:\dev\pspsdk\bin" (yours). So why, vsmake.bat is unable to find psp-gcc ? here the wrong psp-gcc should have been found at least. Would there be something your tutorial don't say what you need to make it run successfully ?
Note : i installed your pspsdk 0.5
Note : i installed your pspsdk 0.5
-
- Posts: 328
- Joined: Sun Jun 03, 2007 10:05 pm
Works perfect here. No need for devpackshlide wrote:i was really interested with your devkit, so i installed it to test it : it really messes up with the cygwin pspsdk i have. Not only that, when i try to build, it cannot find psp-gcc . If i run "cmd" and "echo %PATH%", i can find "d:\cygwin\usr\local\pspdev\bin" (cygwin) then "d:\dev\pspsdk\bin" (yours). So why, vsmake.bat is unable to find psp-gcc ? here the wrong psp-gcc should have been found at least. Would there be something your tutorial don't say what you need to make it run successfully ?
Note : i installed your pspsdk 0.5
Change cygwin script to this:
Works perfect.@echo off
D:
chdir D:\cygwin\bin
umount -s --remove-all-mounts
mount -s -b -f d:\cygwin\bin /bin
mount -s -b -f d:\cygwin\etc /etc
mount -s -b -f d:\cygwin\lib /lib
mount -s -b -f d:\cygwin\usr /usr
mount -s -b -f d:\cygwin\var /var
mount -s -b -f d:\cygwin\home /home
mount -s -b -f d:\ /
mount -s -b -f d:\cygwin\bin /usr/bin
mount -s -b -f d:\cygwin\lib /usr/lib
mount -c -s /cygdrive
mount -c -u /cygdrive
set PSPDEV=/usr/local/pspdev
set PSPSDK=/usr/local/pspdev
set path=/usr/local/pspdev/bin;%path%
bash --login -i
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Use it more for Development than for Gaming.
I don't use cygwin at all in my PC. but if you have cygwin and my sdk installed and both are in your path than that should be the problem. The vsmake.bat is just one simple command:hlide wrote:i was really interested with your devkit, so i installed it to test it : it really messes up with the cygwin pspsdk i have. Not only that, when i try to build, it cannot find psp-gcc . If i run "cmd" and "echo %PATH%", i can find "d:\cygwin\usr\local\pspdev\bin" (cygwin) then "d:\dev\pspsdk\bin" (yours). So why, vsmake.bat is unable to find psp-gcc ? here the wrong psp-gcc should have been found at least. Would there be something your tutorial don't say what you need to make it run successfully ?
Note : i installed your pspsdk 0.5
make 2>&1 %1 %2 %3 %4 %5 | sed2 -e "s/\([^:]*\):\([0-9][0-9]*\)\(.*\)/\1 (\2) \3/"
it tries to call the make command which is installed both on cygwin and my pspsdk, since you cygwin is first on the path than that make is excuted later the command fails because there is no command called sed2 on cygwin but there is on my sdk. One solution is to try to hardcode the paths to the commands, something like:
%PSPSDK%/../../bin/make 2>&1 %1 %2 %3 %4 %5 | %PSPSDK%/../../bin/sed2 -e "s/\([^:]*\):\([0-9][0-9]*\)\(.*\)/\1 (\2) \3/"
or in your specific case:
d:\dev\pspsdk\bin\make 2>&1 %1 %2 %3 %4 %5 | d:\dev\pspsdk\bin\sed2 -e "s/\([^:]*\):\([0-9][0-9]*\)\(.*\)/\1 (\2) \3/"
thx but it appears not to be the problem. Let me explain :Heimdall wrote:I don't use cygwin at all in my PC. but if you have cygwin and my sdk installed and both are in your path than that should be the problem. The vsmake.bat is just one simple command:hlide wrote:i was really interested with your devkit, so i installed it to test it : it really messes up with the cygwin pspsdk i have. Not only that, when i try to build, it cannot find psp-gcc . If i run "cmd" and "echo %PATH%", i can find "d:\cygwin\usr\local\pspdev\bin" (cygwin) then "d:\dev\pspsdk\bin" (yours). So why, vsmake.bat is unable to find psp-gcc ? here the wrong psp-gcc should have been found at least. Would there be something your tutorial don't say what you need to make it run successfully ?
Note : i installed your pspsdk 0.5
make 2>&1 %1 %2 %3 %4 %5 | sed2 -e "s/\([^:]*\):\([0-9][0-9]*\)\(.*\)/\1 (\2) \3/"
it tries to call the make command which is installed both on cygwin and my pspsdk, since you cygwin is first on the path than that make is excuted later the command fails because there is no command called sed2 on cygwin but there is on my sdk. One solution is to try to hardcode the paths to the commands, something like:
%PSPSDK%/../../bin/make 2>&1 %1 %2 %3 %4 %5 | %PSPSDK%/../../bin/sed2 -e "s/\([^:]*\):\([0-9][0-9]*\)\(.*\)/\1 (\2) \3/"
or in your specific case:
d:\dev\pspsdk\bin\make 2>&1 %1 %2 %3 %4 %5 | d:\dev\pspsdk\bin\sed2 -e "s/\([^:]*\):\([0-9][0-9]*\)\(.*\)/\1 (\2) \3/"
Since both cygwin and pspsdk executables are reachable from PATH, I should still be able to reach sed2. However I also tried your solution and it happens to be worse indeed (cmd.exe returning error 255).
As told in the first post, i did have a message saying psp-gcc cannot be found, which means "make" was executed but failed to find psp-gcc (being in either cygwin or pspsdk). It gets me puzzled.
Well it seems i'm the only one to have a problem here. I use a workaround by modifying build.mak and prepending $(PSPSDK)/../../bin/ to each executable (psp-gcc, cp2, etc.). It works this way.
It looks as if vsmake.bat doesn't export PATH environment to cmd.exe, silly, isn't it ?
I'm not sure to know what you mean. Cygwin may be enough for me as I got it at home, and it works for me. Heimdall's pspsdk may be interesting for non programmer people who want to be able to build a source without the necessity to install cygwin. Heimdall's pspsdk is probably the easiest solution I knew for them, so I was testing it. Sure, I still prefer to work with an SVN pspsdk through cygwin so I can get the last modifications.KickinAezz wrote:Works perfect here. No need for devpacks
Change cygwin script to this:
Works perfect.@echo off
D:
chdir D:\cygwin\bin
umount -s --remove-all-mounts
mount -s -b -f d:\cygwin\bin /bin
mount -s -b -f d:\cygwin\etc /etc
mount -s -b -f d:\cygwin\lib /lib
mount -s -b -f d:\cygwin\usr /usr
mount -s -b -f d:\cygwin\var /var
mount -s -b -f d:\cygwin\home /home
mount -s -b -f d:\ /
mount -s -b -f d:\cygwin\bin /usr/bin
mount -s -b -f d:\cygwin\lib /usr/lib
mount -c -s /cygdrive
mount -c -u /cygdrive
set PSPDEV=/usr/local/pspdev
set PSPSDK=/usr/local/pspdev
set path=/usr/local/pspdev/bin;%path%
bash --login -i
-
- Posts: 328
- Joined: Sun Jun 03, 2007 10:05 pm
That is not the point! My SDK is even for "programmers" not only for beginners, the point is you have the latest SVN changes on it (you can check that the changes from this week are incorporated) and the most important for me as a developer is why should i care about building my own compiler and libraries if i just want to make a game or an application? This is my point.hlide wrote: I'm not sure to know what you mean. Cygwin may be enough for me as I got it at home, and it works for me. Heimdall's pspsdk may be interesting for non programmer people who want to be able to build a source without the necessity to install cygwin. Heimdall's pspsdk is probably the easiest solution I knew for them, so I was testing it. Sure, I still prefer to work with an SVN pspsdk through cygwin so I can get the last modifications.
A simple SDK for getting your things done! no need to know how to build a cross compiler and spend time building it and keeping it up to date as well for the libraries.
About your problem i don't know what is going on, I'm testing the solution on 2 machines 1 without cygwin and other with cygwin and both seem to work good for me, the difference (i guess) is that i don't have any cygwin commands available on my path and my env vars under cygwin are declared on the launch bat.
Could you paste here your env vars and for the sake of it, just try to see which versions of make, psp-gcc and sed2 you have in your cmd line.
try:
set
make --version
psp-gcc --version
sed2 --version
like if you're using my sdk you should get:
make 3.81
psp-gcc 4.1.2
while if you're using cygwin it should tell you
psp-gcc 4.1.0
Relax ! I'm just saying I was testing your pspsdk for some non programmer teammates so I can tell them it is okay to use it without the need to install cygwin. That's all.Heimdall wrote:That is not the point! My SDK is even for "programmers" not only for beginners, the point is you have the latest SVN changes on it (you can check that the changes from this week are incorporated) and the most important for me as a developer is why should i care about building my own compiler and libraries if i just want to make a game or an application? This is my point.
A simple SDK for getting your things done! no need to know how to build a cross compiler and spend time building it and keeping it up to date as well for the libraries.
Using cmd.exe, I have several things in this order in my PATH :Heimdall wrote:About your problem i don't know what is going on, I'm testing the solution on 2 machines 1 without cygwin and other with cygwin and both seem to work good for me, the difference (i guess) is that i don't have any cygwin commands available on my path and my env vars under cygwin are declared on the launch bat.
Could you paste here your env vars and for the sake of it, just try to see which versions of make, psp-gcc and sed2 you have in your cmd line.
try:
set
make --version
psp-gcc --version
sed2 --version
like if you're using my sdk you should get:
make 3.81
psp-gcc 4.1.2
while if you're using cygwin it should tell you
psp-gcc 4.1.0
- D:\Program Files\CodeSourcery\Sourcery G++Lite\bin; // ARM
D:\cygwin\opt\open2x\gcc-4.1.1-glibc-2.3.6\bin; // ARM GP2X
D:\cygwin\usr\local\pspdev\bin; // CYGWIN PSP
D:\cygwin\usr\local\bin;
D:\cygwin\bin;
d:\dev\pspsdk\bin // your PSPSDK bin path added by your installer
versions are :
- make 3.81 (i686-pc-cygwin)
psp-gcc 4.1.0
sed2 3.02
Now without touching your vsmake.bat and your build.mak, i got the following logs when building or rebuilding :
Code: Select all
------ Build started: Project: hurrican, Configuration: Debug Win32 ------
Performing Makefile project actions
psp-g++ -I. -Id:/dev/pspsdk/psp/sdk/include -O3 -G0 -Wall -I. -Id:/dev/pspsdk/psp/sdk/include -O3 -G0 -Wall -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=150 -c -o main.o main.cpp
make: psp-g++: Command not found
make: *** [main.o] Error 127
Build log was saved at "file://d:\dev\hurrican\dists\psp\Debug\BuildLog.htm"
hurrican - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Code: Select all
------ Rebuild All started: Project: hurrican, Configuration: Debug Win32 ------
Performing Makefile project actions
rm2 -f hurrican.elf main.o PARAM.SFO EBOOT.PBP EBOOT.PBP
make: rm2: Command not found
make: [clean] Error 127 (ignored)
Build log was saved at "file://d:\dev\hurrican\dists\psp\Debug\BuildLog.htm"
hurrican - 0 error(s), 0 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
ok, if i change vsmake.bat into :
Code: Select all
@echo off
set PATH=%PSPSDK%\..\..\bin;%PATH%
make 2>&1 %1 %2 %3 %4 %5 | sed2 -e "s/\([^:]*\):\([0-9][0-9]*\)\(.*\)/\1 (\2) \3/"
so it looks as if cygwin "make.exe" doesn't export DOS PATH whereas your PSPSDK "make.exe" does it. I think you should not append your PSPSDK bin path to PATH when installing your PSPSDK installer but rather let your vsmake.bat prepend it to PATH since VS2008 always uses vsmake.bat to build, rebuild or clean.
yes my make uses the native paths from windows while cygwin one uses its own. from your program versions it says you're using make from cygwin and psp-gcc also from cygwin 4.1.0 mine is 4.1.2.
I appended my PSPSDK to the path not because of visual studio but because eclipse which was the initial and only supported dev env. I added VS support because some people asked for it but personally i don't use it so i only installed the express version to get barely working with the SDK.
Anyway :) you'll still have problems because other stuff from the SDK such as rm2, mkdir2 and so on (that you see on the last error) are modified versions of the unix commands to run on windows and are "supposed" to be on the path too.
I'd recommend only to keep my setting on the path when you use my sdk and remove when you use other sdk's.
I appended my PSPSDK to the path not because of visual studio but because eclipse which was the initial and only supported dev env. I added VS support because some people asked for it but personally i don't use it so i only installed the express version to get barely working with the SDK.
Anyway :) you'll still have problems because other stuff from the SDK such as rm2, mkdir2 and so on (that you see on the last error) are modified versions of the unix commands to run on windows and are "supposed" to be on the path too.
I'd recommend only to keep my setting on the path when you use my sdk and remove when you use other sdk's.
For the last weeks I've been working in version 0.6 of my PSP devkit.
The main changes are:
Man page reader has been reduced and the devkits are now installing man pages to the correct path and other types of documentation to the doc folder.
Finally but not least you have now 25 devpaks!
Full links here:
Dev Paks:
The main changes are:
- Removed the dependency for the env var PSPSDK
Fixed psp-config
Better vsmake.bat
Better man.bat
Fixed issue that some installations would end up without env vars due to delayed hdd writes
No need to hack SDK makefiles anymore
GNU tools (cp, rm, mkdir, sed) called with the original names no need to append a "2"
Man page reader has been reduced and the devkits are now installing man pages to the correct path and other types of documentation to the doc folder.
Finally but not least you have now 25 devpaks!
Full links here:
Dev Paks:
- zlib 1.2.2
libpng 1.2.8
SDL 1.2.9
pspgl SVN revision 2264
freetype 2.1.10
libzip2 1.0.4
libbulletml 0.0.5
libjpeg 6b
libmad 0.15.1
libmikmod 3.1.11
libogg 1.1.2
TinyGL 0.4
SQLite 3.3.17
smpeg 0.4.5
SDL ttf 2.0.7
SDL mixer 1.2.6
SDL image 1.2.4
SDL gfx 2.0.13
pspirkeyb 0.0.4
ODE 0.5
LUA 5.1
libvorbis 1.1.2
libTremor 1.0.2
libPThreadLite SVN r2336
libpspvram SVN r2227
Major improvements are that almost all devpaks now include documentation and sdl-config and freetype-config have been ported to a native format that works inside makefiles just like: $(shell sdl-config --cflags).
More details and comments, visit my blog: http://www.jetcube.eu.
This is great work here. I compiled a modified test program through visual studio and it worked! Next question, what's the fastest way to debug? Is there a good psp emulator for homebrew (I know there isn't one that runs games) or do I have to put it on my memory stick and run it every time? Or is there a debug app tha waits to recieve a program over usb and runs it?
Well... :) I've included GDB and "standard" debugging tools from the official toolchain. I'm investigating how can i use pspplayer or other emulator to debug and if they are good for homebrew i'll start including them as an optional download to the official site.
But for now you only have GDB, but as i've said before i've low experience with VS so i don't know how to use the internal VS debugger as an interface to GDB... If you know please let me know and i'll add it! :)
But for now you only have GDB, but as i've said before i've low experience with VS so i don't know how to use the internal VS debugger as an interface to GDB... If you know please let me know and i'll add it! :)
I don't really know where else to ask this but I'm trying to setup a copy of OpenTyrian for use in Visual Studio C++ Express 2008, am I barking up the wrong tree or is it possible? I tried doing something similar to your tutorial on your blog but to no avil. It resulted in some errors some of which were SDL.h related so I grabbed the DevKit hoping it would help. Still not looking too good for me. I apologize for this question I just love this game and I'm new to programming for the PSP and this seems like something I'd love to tinker with.
Thank you all for your time and for this DevKit you made! I was able to compile some of the samples without any issues! Thanks!
Thank you all for your time and for this DevKit you made! I was able to compile some of the samples without any issues! Thanks!
Give us more details about your problems. Right now, it is as if you said "I have a problem." and that was all.TGV wrote:I don't really know where else to ask this but I'm trying to setup a copy of OpenTyrian for use in Visual Studio C++ Express 2008, am I barking up the wrong tree or is it possible? I tried doing something similar to your tutorial on your blog but to no avil. It resulted in some errors some of which were SDL.h related so I grabbed the DevKit hoping it would help. Still not looking too good for me. I apologize for this question I just love this game and I'm new to programming for the PSP and this seems like something I'd love to tinker with.
Thank you all for your time and for this DevKit you made! I was able to compile some of the samples without any issues! Thanks!
For SDL, you may need to add some include and lib paths in the project. Probably something like "<your pspsdk path>/include/SDL" for instance.
Heimdall,
Trying to use the freetype lib and it seems like there is a problem when trying to import the header files.
In my program I am importing the freetype main header:
The compiler is finding that header file but inside that header it imports another header file:
The compiler cannot find this header file and throws an error.
I'm using the latest SDK (0.6.0) and freetype devpack (2.1.10) both of which I downloaded today.
Trying to use the freetype lib and it seems like there is a problem when trying to import the header files.
In my program I am importing the freetype main header:
Code: Select all
#include <ft2build.h>
Code: Select all
#include <freetype/config/ftheader.h>
I'm using the latest SDK (0.6.0) and freetype devpack (2.1.10) both of which I downloaded today.
nbollom i've a clean install of the sdk 0.6 and only freetype devpak and i've created a sample piece of code like this:
And now my Makefile:
Note the CFLAGS and LDFLAGS, i'm using freetype-config tool but you can hardcode it by hand:
CFLAGS = -O2 -G0 -Wall -IC:/pspsdk/psp/include/freetype2
LDFLAGS = -LC:/pspsdk/psp/lib -lfreetype
And them make
Seems to be all good!
Code: Select all
#include <ft2build.h>
#include <freetype/freetype.h>
#include <pspkernel.h>
#include <pspdebug.h>
#define printf pspDebugScreenPrintf
/* Define the module info section */
PSP_MODULE_INFO("template", 0, 1, 1);
/* Define the main thread's attribute value (optional) */
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
int main(int argc, char *argv[])
{
pspDebugScreenInit();
pspDebugScreenPrintf("FreeType Version %i.%i.%i\n", FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH);
return 0;
}
Code: Select all
TARGET = template
OBJS = main.o
INCDIR =
CFLAGS = -O2 -G0 -Wall $(shell freetype-config --cflags)
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS = $(shell freetype-config --libs)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Template
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
CFLAGS = -O2 -G0 -Wall -IC:/pspsdk/psp/include/freetype2
LDFLAGS = -LC:/pspsdk/psp/lib -lfreetype
And them make
Code: Select all
**** Build of configuration Default for project ft-test ****
make all
psp-gcc -I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -IC:/pspsdk/psp/include/freetype2 -D_PSP_FW_VERSION=150 -c -o main.o main.c
psp-gcc -I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -IC:/pspsdk/psp/include/freetype2 -D_PSP_FW_VERSION=150 -L. -LC:/pspsdk/psp/sdk/lib -LC:/pspsdk/psp/lib -lfreetype main.o -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o template.elf
psp-fixup-imports template.elf
mksfo 'Template' PARAM.SFO
psp-strip template.elf -o template_strip.elf
pack-pbp EBOOT.PBP PARAM.SFO NULL \
NULL NULL NULL \
NULL template_strip.elf 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] 79012 bytes | template_strip.elf
[7] 0 bytes | NULL
C:/pspsdk/bin/rm -f template_strip.elf
Heimdall, if you are also interested : http://forums.ps2dev.org/viewtopic.php?t=9918
-
- Posts: 328
- Joined: Sun Jun 03, 2007 10:05 pm
I wasted 30 mins diggin out a mistake. But it wasn't mine :X
Thank god I have cygwin and It compiles fine but not in this PSP SDK.
Hope you comeout with a fix Hiemdall, Thanks!
Code: Select all
. -ID:/PSPSdk/psp/sdk/include -O2 -G0 -Wall -o mylib.o mylib.s
mylib.s: Assembler messages:
mylib.s:5: Error: unrecognized opcode `stub_start "myLib",0x40090000,0x00010005'
mylib.s:6: Error: unrecognized opcode `stub_func 0x9A229F46,StartIRDAdriver'
mylib.s:7: Error: unrecognized opcode `stub_end'
make: *** [mylib.o] Error 1
Hope you comeout with a fix Hiemdall, Thanks!
Last edited by KickinAezz on Fri Mar 14, 2008 9:01 am, edited 1 time in total.
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Use it more for Development than for Gaming.
ok, this is probably a recurrent problem with .S and .s suffix : if I remember well, .S uses preprocessor and .s doesn't. With mingw, it is not sure if .s and .S is handled the same way because there is no difference.KickinAezz wrote:I wasted 30 mins diggin out a mistake. But it wasn't mine :X
Thank god I have cygwin and It compiles fine but not in this PSP SDK.Code: Select all
. -ID:/PSPSdk/psp/sdk/include -O2 -G0 -Wall -o mylib.o mylib.s mylib.s: Assembler messages: mylib.s:5: Error: unrecognized opcode `stub_start "myLib",0x40090000,0x00010005' mylib.s:6: Error: unrecognized opcode `stub_func 0x9A229F46,StartIRDAdriver' mylib.s:7: Error: unrecognized opcode `stub_end' make: *** [mylib.o] Error 1
It seems as if mylib.s doesn't use preprocessor to replace stub_start, stub_func and stub_end (if they are #define of course).
Or something similar.
Hilde is correct .s is a Unix Source file without preprocessor support and .S with pre processor.
If you looked at the SDK itself (svn trunk/pspsdk) you'd have noticed that all asm files are with an uppercase extension.
As of the build 0.6.2 my SDK compiles with the exact same patches as cygwin/linux (i managed to get it working without needing to hack anything else), so i don't think you're right by blaming my builds.
However you must note that i'm using gcc 4.1.2 and not 4.1.0, since it is considered by the GCC team as the latest stable release of teh 4.1 series, see what was fixed since the release of the compiler you're using on cygwin here: http://gcc.gnu.org/gcc-4.1/
If you looked at the SDK itself (svn trunk/pspsdk) you'd have noticed that all asm files are with an uppercase extension.
As of the build 0.6.2 my SDK compiles with the exact same patches as cygwin/linux (i managed to get it working without needing to hack anything else), so i don't think you're right by blaming my builds.
However you must note that i'm using gcc 4.1.2 and not 4.1.0, since it is considered by the GCC team as the latest stable release of teh 4.1 series, see what was fixed since the release of the compiler you're using on cygwin here: http://gcc.gnu.org/gcc-4.1/
Heimdall confirms so just rename mylib.s into mylib.S if you need preprocessor to process it before assembling. Since pspsdk itself uses a great deal of .S files which need to be preprocessed and they are successful, there is nothing to fix in this pspdk.KickinAezz wrote:Hope you comeout with a fix Hiemdall, Thanks!
-
- Posts: 328
- Joined: Sun Jun 03, 2007 10:05 pm
I tried it before posting prev. message. It is .Shlide wrote:Heimdall confirms so just rename mylib.s into mylib.S if you need preprocessor to process it before assembling. Since pspsdk itself uses a great deal of .S files which need to be preprocessed and they are successful, there is nothing to fix in this pspdk.KickinAezz wrote:Hope you comeout with a fix Hiemdall, Thanks!
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Use it more for Development than for Gaming.
I got thisKickinAezz wrote:I tried it before posting prev. message. It is .S
And yet, I have MediaEngine.S with a capital S.psp-gcc -I. -Id:/dev/pspsdk/psp/sdk/include -O3 -G0 -Wall -o MediaEngine.o MediaEngine.s
MediaEngine.s: Assembler messages:
MediaEngine.s (5) : Error: unrecognized opcode `stub_start "MediaEngine",0x40090000,0x00040005'
MediaEngine.s (6) : Error: unrecognized opcode `stub_func 0x284FAFFC,InitME'
MediaEngine.s (7) : Error: unrecognized opcode `stub_func 0xE6B12941,KillME'
MediaEngine.s (8) : Error: unrecognized opcode `stub_func 0xF107252F,CallME'
MediaEngine.s (9) : Error: unrecognized opcode `stub_func 0xEE216DA1,WaitME'
MediaEngine.s (10) : Error: unrecognized opcode `stub_end'
No wonder gcc didn't preprocess it. So yes there is a problem.
there are two solutions :
- - gcc shouldn't find a file if the case of .S suffix doesn't match (doable for mingw ? or does it regard .s and .S as being equivalent ?)
- gcc should enforce preprocessor even with .s file
One of the biggest problems I've seen with people developing in Windows (cough - nanodesktop - cough - pikey - cough) are people using any case they feel like (since Windows ignores case), and even worse - using \ in paths. Every time I get pikey code from one of the other team members, I have to spend a few minutes correcting all the cases before I can compile the code again. Nanodesktop uses \ in a bunch of paths, and has case issues as well.
Sorry for this little OT, but i don't know if my problem is SDK related... i just migrated to the latest Heimdall's SDK and i can't compile for 3.xx...i.e. code compiles but freezes my PSP when executed. I think i'm mistaking something very stupid but i can't find where...if someone could be so cute to point me to some answer/page/post, he/she will gain a place in heaven!
This is the the problem:
http://forums.ps2dev.org/viewtopic.php?t=9948
This is the the problem:
http://forums.ps2dev.org/viewtopic.php?t=9948
It may not be the SDK. Pikey really only works completely up to 3.52. Theoretically, it should work in 3.80 or better with the NID resolver, but there are apparently problems that are being looked into. It's another reason I don't think you should be using pikey for developing the input from the chatpad - it won't work with current firmwares. Pspirkeyb doesn't have that problem.