GP32 Mr.mirkos Sdk Replacement


mr.mirko posted on Feb 3 2004 at 05:08 PM said:
Q: How to Cross Compile gcc 3.4 at and use my SDK lib ??
A: Read on.

Download:
ftp://ftp.mpi-sb.mpg.de/pub/gnu/mirror/ft...ils-2.14.tar.gz
ftp://sources.redhat.com/pub/newlib/newlib-1.11.0.tar.gz
ftp://ftp.gwdg.de/pub/misc/gcc/snapshots/...0040202.tar.bz2
And of course my SDK :)

mkdir gp32
mv binutils-2.14.tar.gz newlib-1.11.0.tar.gz gcc-3.3-20040202.tar.bz2 gp32
cd gp32

declare -x CFLAGS="-s "
tar xvfz binutils-2.14.tar.gz
cd binutils-2.14/
./configure --target=arm-elf --prefix=/opt/gp32_gcc && make
make install
cd ..

tar xvfz newlib-1.11.0.tar.gz
tar xvfj gcc-3.3-20040202.tar.bz2
cd gcc-3.4-20040202
ln -s ../newlib-1.11.0/newlib .
mkdir build
cd build

CFLAGS="-pipe -s "
../configure --target=arm-elf --prefix=/opt/gp32_gcc --with-cpu=arm9 --disable-threads --enable-languages=c,c++ --with-newlib --disable-multilib --with-gnu-ld --with-gnu-as

#The following is ONE LINE
make all \
CFLAGS_FOR_TARGET="-DTAG_CFLAGS_FOR_TARGET -s -march=armv4t -marm -msoft-float \
-ffast-math -fshort-enums -mstructure-size-boundary=8 -O2" \
CXXFLAGS_FOR_TARGET="-DTAG_CXXFLAGS_FOR_TARGET -s -march=armv4t -marm -msoft-float \
-ffast-math -fshort-enums -mstructure-size-boundary=8 -O -fno-implicit-templates" \
LIBCFLAGS_FOR_TARGET="-DTAG_LIBCFLAGS_FOR_TARGET -s -march=armv4t -marm -msoft-float \
-ffast-math -fshort-enums -mstructure-size-boundary=8 -O2" \
LIBGCC2_CFLAGS="-DIN_GCC -DCROSS_COMPILE -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -W -Wall \
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -Dinhibit_libc \
-fno-inline -DTAG_LIBGCC_FLAGS -s -march=armv4t -marm -msoft-float -O2 -ffast-math -fshort-enums -mstructure-size-boundary=8"

make install
cd ../..

Now you arm cross compiler is installed in : /opt/gp32_gcc
You can now remove the gp32 dir.

Now set a Path to the new arm-elf-* files
export PATH=/opt/gp32_gcc

You can use the SDK03 from whereever you want.

I try to compile using these instructions but when compiling gcc i get
Code:
Mirkomake[2]: arm-elf-ar: Command not found
make[2]: *** [libgcc.a] Error 127
make[2]: Leaving directory `/root/gp32/gcc-3.3-20041103/build/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/root/gp32/gcc-3.3-20041103/build/gcc'
make: *** [all-gcc] Error 2

arm-elf-ar is in /opt/gp32_gcc/bin but it still cant be found without putting in the full pathname
 
Last edited by a moderator:
chris_r posted on Apr 22 2005 at 06:38 PM said:
mr.mirko posted on Feb 3 2004 at 05:08 PM said:
Q: How to Cross Compile gcc 3.4 at and use my SDK lib ??
A: Read on.

Download:
ftp://ftp.mpi-sb.mpg.de/pub/gnu/mirror/ft...ils-2.14.tar.gz
ftp://sources.redhat.com/pub/newlib/newlib-1.11.0.tar.gz
ftp://ftp.gwdg.de/pub/misc/gcc/snapshots/...0040202.tar.bz2
And of course my SDK :)

mkdir gp32
mv binutils-2.14.tar.gz newlib-1.11.0.tar.gz gcc-3.3-20040202.tar.bz2  gp32
cd gp32

declare -x CFLAGS="-s "
tar xvfz binutils-2.14.tar.gz
cd binutils-2.14/
./configure --target=arm-elf --prefix=/opt/gp32_gcc && make
make install
cd ..

tar xvfz newlib-1.11.0.tar.gz
tar xvfj  gcc-3.3-20040202.tar.bz2
cd gcc-3.4-20040202
ln -s ../newlib-1.11.0/newlib .
mkdir build
cd build

CFLAGS="-pipe -s "
../configure --target=arm-elf --prefix=/opt/gp32_gcc --with-cpu=arm9 --disable-threads --enable-languages=c,c++ --with-newlib --disable-multilib --with-gnu-ld --with-gnu-as

#The following is ONE LINE
make all \
  CFLAGS_FOR_TARGET="-DTAG_CFLAGS_FOR_TARGET -s -march=armv4t -marm -msoft-float \
  -ffast-math -fshort-enums -mstructure-size-boundary=8 -O2" \
  CXXFLAGS_FOR_TARGET="-DTAG_CXXFLAGS_FOR_TARGET -s -march=armv4t -marm -msoft-float \
  -ffast-math -fshort-enums -mstructure-size-boundary=8 -O -fno-implicit-templates" \
  LIBCFLAGS_FOR_TARGET="-DTAG_LIBCFLAGS_FOR_TARGET -s -march=armv4t -marm -msoft-float \
  -ffast-math -fshort-enums -mstructure-size-boundary=8 -O2" \
  LIBGCC2_CFLAGS="-DIN_GCC -DCROSS_COMPILE -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -W -Wall \
  -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -Dinhibit_libc \
  -fno-inline -DTAG_LIBGCC_FLAGS -s -march=armv4t -marm -msoft-float -O2 -ffast-math -fshort-enums -mstructure-size-boundary=8"

make install
cd ../..

Now you arm cross compiler is installed in :  /opt/gp32_gcc
You can now remove the gp32 dir.

Now set a Path to the new arm-elf-* files
export PATH=/opt/gp32_gcc

You can use the SDK03 from whereever you want.

I try to compile using these instructions but when compiling gcc i get
Code:
Mirkomake[2]: arm-elf-ar: Command not found
make[2]: *** [libgcc.a] Error 127
make[2]: Leaving directory `/root/gp32/gcc-3.3-20041103/build/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/root/gp32/gcc-3.3-20041103/build/gcc'
make: *** [all-gcc] Error 2

arm-elf-ar is in /opt/gp32_gcc/bin but it still cant be found without putting in the full pathname

Yes, you must put /opt/gp32_gcc/bin to your PATH enviroment, before you begin with the stuff.
So first type this:
export PATH=/opt/gp32_gcc/bin:$PATH
And start again.

Also, the files suggested in this very old message, are not recommed any more. Use the latest 3.4.3 gcc, (or the new 4.0), a newer newlib, and newer binutils.

btw, there is a fully automated script to do this all on my HP: www.mirkoroller.de
 
Last edited by a moderator:
MirkoSDK v.095 have screen bug on my blu (not blu+).

post-299-1114457753.jpg


MirkoSDK v.091 works excellent.
 
Hahahoj posted on Apr 25 2005 at 07:37 PM said:
MirkoSDK v.095 have screen bug on my blu (not blu+).

post-299-1114457753.jpg


MirkoSDK v.091 works excellent.
Hey Hahahoj, you must maintain pressed the LEFT button when you launch the example program to hability compatibilty with BLU.

This is because version 0.95 active compatibility with BLU+ by defect, reason why you obtain the graphical errors that you comment.

Un Saludo!
 
Last edited by a moderator:
Just a bug(?) to report:

The MIKRO SDK rules, I use now this one instead of the rest!

Anyways,. before this I tried DevKitARM or minigp32 and then I have heard about this one, so I thought I should test. I ported my old code to the MIKRO SDK, there was one demoeffect running but noticed some kind of wrong line in the upper screen. The gfx were shifted one pixel there. Even with double buffering, vsync or not vsync and every clock rate, it was still there at the same place. But after hours of debugging (in the wrong places ;PPP), spending half of my day trying lame stuff, I found out that it was the fault of the function gp_initFrameBuffer.

Anyways,. I just wanted to point out this: I am sure that I have a normal GP32 and not a BLU+ but the function gp_initFrameBuffer was running on my GP32 for the BLU+ instead of the right one. I found out after looking at the code that gp_initFrameBuffer selects between gp_initFrameBufferBP and gp_initFrameBufferN (which is not on the documentation), then I run the initialization with the second function instead of the plain, and everything worked fine. So even if I don't have BLU+, something wrong happens in the detection and the wrong init happens ;P

I can have an option for the user to select between BLU+ and Normal for the moment, but I just wanted to mention it in case you know if it is a bug or something..

p.s. Great option for clocktest, smc, mod player (Yey!) and other stuff. Runs fast! A 320*240*8bpp software plasma effect, after optimized, at 166Mhz outputs 300fps(!!!) here =)

p.p.s. Why timer is so low (Only 64 ticks per second?), hope it will be improved in the future. Nice for FPS counting, but I am not sure about gfx timing.

p.p.p.s. There is an option on the init routine to choose screen refresh rates. I didn't knew that, I thought Gp32 was running on 50hz. But even if I give it a specific value, diferrent clock speeds seem to have diferrent refresh (My plasma, even if vsynced, runs more fast than I want in over 100, I thought it would be vsynced at the same framerate regardless cpu (except from the slow cases of course ;). I guess I will also use the timer). How does the cpu affect the refresh? Then what is that refresh option in initbuffer function then for?
 
>fine. So even if I don't have BLU+, something wrong happens in the detection >and the wrong init happens ;P

Just a self thought. Is the problem happening because of diferrences in BIOS ver.? Actually, I have not tried to install a new one yet, I have the one in my GP32 (but I borrowed this from a friend).

Is there a programm out there which can properly detect the type, bios and other infos for my GP32?
 
>fine. So even if I don't have BLU+, something wrong happens in the detection >and the wrong init happens ;P

Just a self thought. Is the problem happening because of diferrences in BIOS ver.? Actually, I have not tried to install a new one yet, I have the one in my GP32 (but I borrowed this from a friend).

Is there a programm out there which can properly detect the type, bios and other infos for my GP32?

Well the BLU and BLU+ have the same bios version number, so thats why it doesn't work right. So either hold L while starting up the program or use initframebufferN in your code.

To find out your bios version, press LRRLRRLL at startup time.
 
Last edited by a moderator:
>I can have an option for the user to select between BLU+ and Normal for the moment, but I just wanted to mention it in case you know if it is a bug or something..

Press the L or R shoulder Buttons at programm loading and starting, and you can select between BLU and BLU+ Mode.

>p.p.s. Why timer is so low (Only 64 ticks per second?), hope it will be improved in the future. Nice for FPS counting, but I am not sure about gfx timing.

The 64ticks timer is the RTC Timer, and the only one, that will give us 64Ticks at every CPU Clock.

>p.p.p.s. There is an option on the init routine to choose screen refresh rates. I didn't knew >that, I thought Gp32 was running on 50hz. But even if I give it a specific value, diferrent clock >speeds seem to have diferrent refresh (My plasma, even if vsynced, runs more fast than I >want in over 100, I thought it would be vsynced at the same framerate regardless cpu (except >from the slow cases of course ;). I guess I will also use the timer). How does the cpu affect >the refresh? Then what is that refresh option in initbuffer function then for?

The Refreshrate of the LCD depends on the CPU-Clock you set. You can set a refresh rate, but it is not guaranteed that this is set. The function will return the TRUE setted Refresh-Rate. Its not possible to get the Same Refreshrate on different CPU-clocks.
If you set it to 85Hz, it will use the nearest rate, that could be 90, or 70Hz, ...
 
Hello all,

What was the code that was changed to make the Mirko SDK compatible with geepee32 again?

I can't just use an alternative compiled library as I am making chnges to the SDK source, and want to make sure I add thoe changes in too.
 
>What was the code that was changed to make the Mirko SDK compatible with >geepee32 again?

Is there such a code? I think I need to read about that too! Testing my code on the emulator first, would make my life easier..
 
Hi!

I hope this thread is not closed yet?

Does anyone ever tried to compile the klimt libraries with mr mirko sdk? I'm having linking problems with the latest version of the sdk, and it seems it was developed for the 0.85 version. :blink:

I sent a messege to mirko, but i'm posting the thread just in case anyone is interested... ;)

Regards

@B^)>
 
Back
Top