Win32 PS2DEV

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
avisonjohn
Posts: 2
Joined: Thu Jul 28, 2005 3:20 am
Location: Basildon, UK
Contact:

Win32 PS2DEV

Post by avisonjohn »

Hello. I am using Windows XP (i haveno linux system avaliable) and have installed ps2dev on it. i have used notepad to create a simple .c file. I now need to know how to make it into an .elf file. i am new to this and despite searching i cannot find anything that works. please can somebody help me.
Thank you in advance.
- AJ
shawn_t
Posts: 11
Joined: Tue Jul 26, 2005 4:32 am

Post by shawn_t »

You are going to need a Makefile. You then will type the command 'make' to build your elf file. When you type 'make', it will look for either 'Makefile' or 'makefile' in the current directory as the input makefile. You can also specify the Makefile name explicity by typing: 'make -f myMakefile'

If you are really unfamiliar with 'make', and instead would like to use Visual Studio, there is a tutorial on creating Visual Studio projects to build PS2DEV ELF files. It is located at: http://www.internalreality.com/

scroll down to September 2003 and there is a ZIP file with instructions. It is a little outdated (i.e. using InLink, but if you follow the instructions, everything will work) If you are using XLink, it doesn't seem to take command line arguments like InLink did so you won't be able to launch your ELF from the Visual Studio IDE, but you can easily launch it from within XLink so that isn't a huge problem.


There are a few simple samples included with the PS2DEV SDK. They are located in: <INSTALL_LOCATION>/ps2sdk/samples

For example, here is the Makefile for the math3d sample (be aware that this Makefile references two other Makefiles so you will need those as well!! Makefile.pref and Makefile.eeglobal):

Code: Select all

# _____     ___ ____     ___ ____
#  ____|   |    ____|   |        | |____|
# |     ___|   |____ ___|    ____| |    \    PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2001-2004, ps2dev - http&#58;//www.ps2dev.org
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.
#

EE_BIN = math3d.elf
EE_OBJS = math3d.o
EE_LIBS = -ldma -lgraph -lmath3d -lmf -lpacket

all&#58; $&#40;EE_BIN&#41;
	ee-strip --strip-all $&#40;EE_BIN&#41;

clean&#58;
	rm -f *.elf *.o *.a

run&#58; $&#40;EE_BIN&#41;
	ps2client execee host&#58;$&#40;EE_BIN&#41;

reset&#58;
	ps2client reset

include $&#40;PS2SDK&#41;/samples/Makefile.pref
include $&#40;PS2SDK&#41;/samples/Makefile.eeglobal
With this makefile you can perform the following tasks from the command line:
  • make - will build your ELF
    make clean - will remove all OBJ, LIB and ELF files
    make run - will launch your application using ps2client
    make reset - will reset the ps2 using ps2client
MAKE is a very common build environment so there are plenty of references out there to help you learn. However, you can probably figure out how to modify the above Makefile to build your application...[/url][/list]
Post Reply