30
APPENDIX
152
30
Appendix
30.1
GCC Quick How To
note: the instructions in this chapter are only for dyhards that want to bootstrap their own GCC from vanilla sources. For everyone else
a toolchain containing allegrex specific patches is highly recommended. For short: you dont need this :)
30.1.1
compile ASM to object:
<GCCROOT>/bin/???-elf-as -c \
-I <GCCROOT>/???-elf/include -I <additional includes> \
testasm.s -o testasm.o
30.1.2
compile C to object:
<GCCROOT>/bin/???-elf-gcc -c \
-I <GCCROOT>/???-elf/include -I <additional includes> \
-nostdlib testc.c -o testc.o
30.1.3
compile C++ to object:
<GCCROOT>/bin/???-elf-g++ -c \
-I <GCCROOT>/???-elf/include -I <additional includes> \
-nostdlib -fno-exceptions testcpp.cpp -o testcpp.o
30.1.4
link objects
<GCCROOT>/bin/???-elf-ld -T mips-pspbin.x -o test.elf crt0.o \
<GCCROOT>/lib/gcc-lib/???-elf/3.3/crtbegin.o \
<GCCROOT>/lib/gcc-lib/???-elf/3.3/crtend.o \
testasm.o testc.o testcpp.o -lg -lstdc++ -lm -lc -lnosys
you only need to link against crtbegin.o/crtend.o if you are using c++, and you only need -lg,-lstdc++,-lc,-lm if you are actually us-
ing these libraries (of course:)). however if you do so, linking against -lnosys as well is essential.
30.1.5
remove unneeded sections (debug info etc) from object
<GCCROOT>/bin/???-elf-strip -s test.elf
30.1.6
convert object to plain binary
<GCCROOT>/bin/???-elf-objcopy -O binary test.elf test.bin
30.1.7
convert absolute address into filename/line number/function
compile with "-g" flag, then use
<GCCROOT>/bin/???-elf-addr2line -f -e test.elf <address>
30.1.8
Building a Crosscompiler
configure options:
--target=misel-elf
--with-cpu=r4000
--disable-threads
Содержание PlayStationPortable
Страница 114: ...12 AUDIO PROCESSING 114 12 Audio Processing 12 1 Overview 44100 Hz Sample Frequency ...
Страница 116: ...14 WLAN 116 14 WLAN ...
Страница 117: ...15 USB PORT 117 15 USB Port ...
Страница 118: ...16 UMD 118 16 UMD ...
Страница 119: ...17 MEMORY STICK 119 17 Memory Stick ...
Страница 128: ...21 FLASH MEMORY STRUCTURE FLASH1 128 21 Flash Memory Structure flash1 DIC REGISTRY VSH THEME ...
Страница 141: ...28 IPL 141 28 IPL ...