Gp2x Code::blocks Pre-configured Sdk Rc2


yaustar

UK GP32 & GP2X Owner
Joined
Oct 18, 2003
Messages
2,714
Location
UK
Website
Visit site
Download: http://www.sendspace.com/file/vyc7yo
Gp2x archive: http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,14,2295

I will get this to the GP2X file archive as soon as I can, for the moment it is downloadable from sendspace.

Major props to Pickle for testing this out and ironing a few wrinkles from the configuration :)

Readme.txt:
QUOTE
=================================================================
GP2X Code::Blocks complete development setup RC 2
By Steven Yau
Email yaustar_8p@yahoo.co.uk
=================================================================
> What is this?
- This is a complete development environmet for GP2X development as a complete
preconfigured package as many people are still having trouble setting up the
toolchain, IDE, etc from the Wiki.

> What is included?
- Code::Blocks IDE nightly build (10 Aug 2007): http://www.codeblocks.org/
- MinGW compiler: http://www.mingw.org/
- SDL libraries: http://www.libsdl.org/
- DJWillis Open2x SDK: http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,14,1918
- Guyfawkes SDL test: http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,46,1047
[Modified by me with Code::Blocks project setup and PC build]
- SDL template project by myself based from Lazy Foo's tutorials
http://lazyfoo.net/SDL_tutorials/index.php

> What isn't included?
- A warranty. You run this setup at your own risk. I am not to blame if anything
goes wrong with the PC, GP2X or anything as a result of the use of these
programs.
[cut]
- Personal support. Please do not PM me for extra help in setting this up. Post
in the release threads and I will do my best to get round to you. This stops the
same problem being sent to me dozens of times.

> How to install
- *IMPORTANT*
To use this, you must delete your current Code::Blocks user settings. This
is the only way that we can get C::B to check for local settings. To delete
your current user settings, go to %APPDATA% (or
C:\Documents and Settings\User_name\Application Data) and delete the
codeblocks folder.

- Decompress the package to the root of the C drive.

- You will have the following folders:
- CodeBlocks
- devkitGP2X
- GP2X Template
- MinGW
- SDL Test

- MinGW and devkitGP2X MUST stay at the root of the C: drive for the pre-config
to work. If you want them somewhere else, you have to change the paths yourself.
The other folders can be moved whereever you want.

- [Skip this step if you don't want to use file association]
- Run Codeblocks.exe. Go to Settings->Environment Settings. On General
settings, tick the box for Check & set file associations and press the
button Set now.

- That's it, everything is ready to go.

> Extra notes on the folders
- SDL Test: This contains a modified version of Guyfawkes SDL test code. The
project can buld either the PC or the GP2X version. The execuatables are built
to the built sub directory.

- GP2X Template
- This is a simple Hello world template that you can copy the entire directory
to start a brand new project. It has been preconfigured for 3 bulid targets:
- PC Debug: You main development build
- PC Release: Optimised build to release to peers/users
- GP2X Release: Optimised build for GP2X platform

- The executables are built to the built sub directory.

- You can change all the settings, output file names etc in Project->Properties.

> Extra notes on running the PC build from the IDE
- Use F8 (Debug->Start), this runs the exe via the debugger and uses the DLLs
from the bin directory in MinGW. If you use F9 or Ctrl+F10 (Build->Build/Run),
it will try to find the DLLs in the working folder which is set in
Project->Properties.

- If you want to run the exe as a separate application (i.e. double clicking on
the exe), then you need to put the SDL DLLs in the same directory as the exe.
They can be in the C:\MinGW\bin directory:
- mingwm10.dll
- SDL.dll
- SDL_image.dll
- SDL_mixer.dll
- SDL_ttf.dll
- SDLgfx.dll
- smpeg.dll
- zlib1.dll
- jpeg.dll
- libfreetype-6.dll
- libogg-0.dll
- libpng12-0.dll
- libtiff-3.dll
- libvorbis-0.dll
- libvorbisfile-3.dll

> Shoutouts
- The entire GP2X development community (too many names;)

=================================================================
RC 2 16 Aug 2007
=================================================================
> What has been added/changed?
- GDB 6.6 has been installed over 6.3

=================================================================
RC 1 16 Aug 2007
=================================================================
> What has been added/changed?
- Everything, it is the first version :)

[/cut]
 
Thats freakin awsome, if its too much to ask just to get a newbies mental gears goin. A small tutorial app like tic tac toe or something simple so newbies can get a general idea how programming works.
 
Cervante said:
Thats freakin awsome, if its too much to ask just to get a newbies mental gears goin. A small tutorial app like tic tac toe or something simple so newbies can get a general idea how programming works.
I was about to ask something similar-- Is the included SDL template app a useful tool for people new to C++ and SDL to get their feet wet?
 
Last edited by a moderator:
P-J said:
Cervante said:
Thats freakin awsome, if its too much to ask just to get a newbies mental gears goin. A small tutorial app like tic tac toe or something simple so newbies can get a general idea how programming works.
I was about to ask something similar-- Is the included SDL template app a useful tool for people new to C++ and SDL to get their feet wet?


The SDL template is very basic. The Guyfawkes SDL demo has more SDL stuff in it.
But I highly suggest anyone who want to use SDL to go to the Lazy foo tutorials: http://lazyfoo.net/index.php
 
Last edited by a moderator:
Last edited by a moderator:
OK, I posted this in the original thread, but I may as well try again here. Any chance of a template project for GPU940? This is one thing that I'm personally having great difficulty in getting a working project going...
 
PokeParadox said:
OK, I posted this in the original thread, but I may as well try again here. Any chance of a template project for GPU940? This is one thing that I'm personally having great difficulty in getting a working project going...
I thought i saw a demo in the devkitGP2X, if it were me I would get it working with regular make files first then try to see it could be done in the IDE. Im sure you hit the WIKI for info.
 
Last edited by a moderator:
Yes I can't see much info on the wiki about this... it only has info about the project itself, not anything to help us USE the library... :)

EDIT: Just a quick note that I've used this package and converted over CromoZome to use it.... and it's nice to be able to build/debug for both platforms on the one IDE! so thanks yaustar! I hope I can fix up these bugs... and finally release my source!
 
PokeParadox said:
OK, I posted this in the original thread, but I may as well try again here. Any chance of a template project for GPU940? This is one thing that I'm personally having great difficulty in getting a working project going...
ok, i dug around, i seem to remember this project, i think it was made for the Vektor game.
Dzz made a simple program that plays an OGG file on the 940. Source is here http://www.gp2x.de/cgi-bin/cfiles.cgi?0,1,0,0,19,2132
I havnt compiled through codeblocks but I was able to run the make through MSYS. Heres the steps:
1. extrace the project to C:\devkitGP2X\minsys\home
2. Run the C:\devkitGP2X\minsys\msys.bat
3. You should see a linux like terminal, go to where ever you put the project
4. Go into the 940 dir and type make, it makes a bin and copies it to the ogg940 dir
5. GO back to the ogg940 and type make and you will get your gpe

I dont have a GP2X with me and this of course cant be run on a PC so i cant say the bin's actually work. Im going to try and compile each as its own project in C::B, it should be doable.
I hope this helps.

UPDATE: using the existing template the main gpe ogg940 can be compiled. Im having problems linking the 940 bin.
 
Last edited by a moderator:
As far as I can tell, I don't think that the minGW compiler is compatible with Windows Vista. I get this error whenever I try to compile something (doesn't matter if I debug or build):
CODE
mingw32-gcc.exe: installation problem, cannot exec `cc1': Invalid argument
 
geo12 said:
As far as I can tell, I don't think that the minGW compiler is compatible with Windows Vista. I get this error whenever I try to compile something (doesn't matter if I debug or build):
CODE
mingw32-gcc.exe: installation problem, cannot exec `cc1': Invalid argument
sounds like a path problem
does the Gp2X compile and link?
maybe try running as admin if your not already
 
Last edited by a moderator:
Very nice, will try that package to continue dev over gp2x.
Could be better than the default gp2x SDK.
Thanx so much !
 
I compiled my sdltest program and tried it on the gp2x, the screen flickers like when you look at a monitor through a video camera (refresh lines). I tried a few other of my programs and they all do the exact same.

I thought at first it might be because I just recently started using Open2x, but I tried some old builds of my software and they display fine. Not sure if it is my gp2x or the dev setup.

Anyone got any ideas what is causing the problem? It must lay at my end otherwise someone would have posted about it before me, but I cant work out what the problem is. I can upload a compile of the sdltest if you want to try it on your gp2x.
 
I've never seen anything like that, but if you can upload your binaries, I'll take a look.
 
I uploaded to http://www.emuboards.com/codeblocks-sdltest.zip , you will see the screen flicker very fast, on round em up theres black bars which may be because theres a frame limiter or a non white background? It only does the flickering if compiled with this package, compiled with my usual package it works fine.

Not sure if it helps, could it be a double buffering issue?
 
I see what you mean, it can't be an Open2x firmware problem because when I recompiled it (statically still) with my own toolchain setup it worked fine. Maybe the libs in this package need updating (if they aren't already the latest?).
 
Back
Top