Page 39
GP2X User Guide –
www.emuholic.com
Developing for the GP2X introduction
First download DevkitGP2X from
http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,14,873
. Run this file and
install it to c:\devkitgp2x\. You will also need MinSys installed which you can download from
http://www.devkitpro.org/
. Don’
t forget to include a PATH to the MinSys folder, more information can be
found at
http://www.devkitpro.org/setup.shtml
Next download my SDL libraries at
http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,19,1875
. Extract this file to
a temporary location on your PC. Now locate the extracted folder and select and copy all the folders as follows:
bin
etc
include
info
lib
main
share
Now go to your c:\devkitgp2x\ folder and paste the above folders. You will be asked if it is OK to overwrite
some files and folders, choose Yes for all of these prompts.
Please refer to the GP2X Wiki at
http://wiki.gp2x.org/wiki/Getting_started_with_GP2X_development
for more
information on how to set up your development environment for various compilers and IDEs.
I have provided a SDL Test Program project for you to test your development setup; you can download it at
http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,46,1047
. Extract this file to a folder on your PC and from the
command prompt type ‘
make’
and press return.
The demo project should now start to compile and after a few seconds will finish. You should now have a new
file named
sdltest.gpe
, copy this file and the /sdltest/ folder to the root folder of your GP2X and from the Game
menu select
sdltest
. After a few seconds a menu containing the tests should appear. Use the joystick to navigate
the options and press the
button to select.
Using a Serial/USB cable
The GP2X supports serial data to your PC for debugging purposes via a Serial cable such as with the breakout
board. An alternative method is possible via your USB cable included with your GP2X but you do not gain the
full functionality of a Serial cable. If you have a Serial cable you can skip the following section as you do not
need to setup the connection for USB.
Setting up the USB Serial cable connection
As the USB serial cable is not a true serial cable you need to perform a few tasks before you can use the USB
cable as a serial cable. The first task is to install the drivers for your PC; this is only needed to be done once.
Download the GP2X USB Serial drivers from the GP2X Archive
here
.
Extract the files to your PC and copy the
bash.gpe
and
g_serial.o
files to your GP2X. Switch on your GP2X
with the USB cable connected to both the GP2X and your PC and once booted, run the
bash.gpe
file. The GP2X
should display a black screen and after a few seconds you will be prompted on your PC to install a Gadget Serial
device.
Locate the extracted
gserial.inf
file from the drivers above and follow the normal procedure for installing new
hardware. Once this is complete the USB serial cable almost ready for use.