forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Win32 native Toolchain for PSPSDK
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Fri Feb 29, 2008 2:06 am    Post subject: Reply with quote

A new release 0.5 now with 20 devpaks... and counting... :)

Uninstall any previous SDK and do a fresh install, then install the devpaks you like. Devpaks have no uninstall feature so you need to remove them by hand if you want to uninstall.

Have fun!

More detail soon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
kasikeeper



Joined: 29 Nov 2007
Posts: 36

PostPosted: Sat Mar 01, 2008 5:45 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Sat Mar 01, 2008 7:54 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Sat Mar 01, 2008 10:10 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
KickinAezz



Joined: 03 Jun 2007
Posts: 328

PostPosted: Sun Mar 02, 2008 5:58 am    Post subject: Reply with quote

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


Works perfect here. No need for devpacks

Change cygwin script to this:

Quote:

@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


Works perfect.
_________________
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Back to top
View user's profile Send private message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Sun Mar 02, 2008 7:21 pm    Post subject: Reply with quote

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


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:

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/"
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Sun Mar 02, 2008 9:21 pm    Post subject: Reply with quote

Heimdall wrote:
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


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:

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 :

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 ?
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Sun Mar 02, 2008 9:35 pm    Post subject: Reply with quote

KickinAezz wrote:
Works perfect here. No need for devpacks

Change cygwin script to this:

Quote:

@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


Works perfect.


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.
Back to top
View user's profile Send private message
KickinAezz



Joined: 03 Jun 2007
Posts: 328

PostPosted: Mon Mar 03, 2008 12:38 am    Post subject: Reply with quote

Looks like I misread your post; thought your cygwin cant find executables due to change in env variables after installing this sdk.
_________________
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Back to top
View user's profile Send private message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Mon Mar 03, 2008 12:49 am    Post subject: Reply with quote

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.


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.

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
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Mon Mar 03, 2008 4:24 am    Post subject: Reply with quote

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.


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:
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


Using cmd.exe, I have several things in this order in my PATH :

    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


I have also PSPSDK=d:/dev/pspsdk/psp/sdk

versions are :
    make 3.81 (i686-pc-cygwin)
    psp-gcc 4.1.0
    sed2 3.02

note that sed2 is nowhere else in your PSPSDK

Now without touching your vsmake.bat and your build.mak, i got the following logs when building or rebuilding :


Code:
------ 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:
------ 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 ==========


as you can see "make" fails to find "psp-gcc" and "rm2".

ok, if i change vsmake.bat into :
Code:
@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/"


it works.

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.
Back to top
View user's profile Send private message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Mon Mar 03, 2008 5:09 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Fri Mar 07, 2008 4:36 am    Post subject: Reply with quote

For the last weeks I've been working in version 0.6 of my PSP devkit.

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"


So from now on the same makefile from the Official PSPSDK will work with the native windows SDK. For visual studio users, there were some comments that vsmake was kind of buggy (due to %PATH% problems). Now all commands except the compiler are fixed to the SDK trying this way to reduce conflicts.

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:

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
s00pcan



Joined: 20 Jun 2005
Posts: 3

PostPosted: Sat Mar 08, 2008 1:59 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Sat Mar 08, 2008 4:05 am    Post subject: Reply with quote

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! :)
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
TGV



Joined: 08 Mar 2008
Posts: 1

PostPosted: Sat Mar 08, 2008 6:41 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Sat Mar 08, 2008 7:57 pm    Post subject: Reply with quote

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!


Give us more details about your problems. Right now, it is as if you said "I have a problem." and that was all.

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.
Back to top
View user's profile Send private message
nbollom



Joined: 19 Feb 2008
Posts: 6

PostPosted: Sun Mar 09, 2008 11:21 pm    Post subject: Reply with quote

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:

Code:
#include <ft2build.h>


The compiler is finding that header file but inside that header it imports another header file:

Code:
#include <freetype/config/ftheader.h>


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.
Back to top
View user's profile Send private message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Mon Mar 10, 2008 12:15 am    Post subject: Reply with quote

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:

Code:
#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;
}


And now my Makefile:

Code:
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


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

Code:

**** 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


Seems to be all good!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Mon Mar 10, 2008 6:41 am    Post subject: Reply with quote

Heimdall, if you are also interested : http://forums.ps2dev.org/viewtopic.php?t=9918
Back to top
View user's profile Send private message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Mon Mar 10, 2008 5:59 pm    Post subject: Reply with quote

Thanks, I'll try to get it in. I'll come back to you if i face some troubles to get it done.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
KickinAezz



Joined: 03 Jun 2007
Posts: 328

PostPosted: Fri Mar 14, 2008 6:44 am    Post subject: Reply with quote

I wasted 30 mins diggin out a mistake. But it wasn't mine :X


Code:
. -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


Thank god I have cygwin and It compiles fine but not in this PSP SDK.

Hope you comeout with a fix Hiemdall, Thanks!
_________________
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.


Last edited by KickinAezz on Fri Mar 14, 2008 9:01 am; edited 1 time in total
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Fri Mar 14, 2008 7:10 am    Post subject: Reply with quote

KickinAezz wrote:
I wasted 30 mins diggin out a mistake. But it wasn't mine :X


Code:
. -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


Thank god I have cygwin and It compiles fine but not in this PSP SDK.


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.

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.
Back to top
View user's profile Send private message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Fri Mar 14, 2008 5:47 pm    Post subject: Reply with quote

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/
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Fri Mar 14, 2008 6:27 pm    Post subject: Reply with quote

KickinAezz wrote:
Hope you comeout with a fix Hiemdall, Thanks!


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.
Back to top
View user's profile Send private message
KickinAezz



Joined: 03 Jun 2007
Posts: 328

PostPosted: Sat Mar 15, 2008 4:54 am    Post subject: Reply with quote

hlide wrote:
KickinAezz wrote:
Hope you comeout with a fix Hiemdall, Thanks!


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.

I tried it before posting prev. message. It is .S
_________________
Intrigued by PSP system Since December 2006.
Use it more for Development than for Gaming.
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Sat Mar 15, 2008 7:13 am    Post subject: Reply with quote

KickinAezz wrote:
I tried it before posting prev. message. It is .S


I got this
Quote:
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'

And yet, I have MediaEngine.S with a capital S.

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
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Mar 15, 2008 8:32 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Mon Mar 17, 2008 9:49 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Mar 17, 2008 12:39 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 2 of 9

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group