GP2X Ok To Update Wiki Entry For .net2005 Rules File?


MadDog

Member
Joined
Mar 4, 2006
Messages
262
Age
55
Location
UK
Website
www.maddoggames.com
I was going to add my addition to the 2005 rules file for building 940 bin file. I've tweeked it since that last time I posted it to the demo thread. I had a few problems getting the bin conversion to happen after the link. I did cheat and use the pipe operator but this was not 100% reliable. I've now got it using a bat file that goes in the bin file of the gp2x sdk. I've been using this for week or so now and works a treat.

As with the other rules you have to add a trigger file. This one uses file.940
(I've put my 'trigger' files in my sdk root folder, they can be reused ok by more than one project)

Here is the bat file and the addition to the rules file I was going to add.

//---------------------Bat file called "make_940_bin.bat"
ld.exe -o %1 -Ttext 0x0 %3 %4 %5 %6 %7 %8 %9 2>&1
arm-linux-objcopy.exe -O binary %1 %2
//---------------------------------------


//--------------------------------------Addition to the rules file.
<CustomBuildRule
Name="arm-940-link"
DisplayName="GCC 940 Linker"
CommandLine="make_940_bin.bat $(TargetPath) $(TargetDir)$(TargetName).bin [AllOptions] [AdditionalOptions] $(IntDir)\*.o"
Outputs="never-exists"
FileExtensions="*.940"
ExecutionDescription="Linking 940 $(TargetFileName)..."
>
<Properties>
<StringProperty
Name="LibPaths"
DisplayName="Additional Library Paths"
Description="Specifies one or more directories to add to the lib path; use semi-colon delimited list if more than one."
Switch="-L"[value]""
Delimited="true"
Inheritable="true"
/>
<StringProperty
Name="Libraries"
DisplayName="Additional Dependencies"
Description="Specifies one or more libraries to link to; use semi-colon delimited list if more than one."
Switch="-l[value]"
DefaultValue="pthread"
Delimited="true"
Delimiters=";, "
Inheritable="true"
/>
<StringProperty
Name="EntryPoint"
DisplayName="Entry point for 940 cpu"
Description="Specifies where the execution starts"
Switch="-e"[value]""
Delimited="true"
Inheritable="true"
/>
</Properties>
</CustomBuildRule>
 
Back
Top