V810 patches for binutils-2.10 and gcc-2.95.2 are modification of V850 source.
An ldscript similar to one for Virtual Boy should be made.
Applies for Cygwin, Linux, BSD, OSX, Unix, etc.
The following commands should build a good binutils. Substitute V810DEV with whatever directory you'd like, and make sure you have write access (or use sudo for make install). You should also put the first two export statements in your .bash_profile or equivalent.
$ export V810DEV=/opt/v810 $ export PATH=$V810DEV/bin:$PATH $ tar xvf binutils-2.10.tar.gz $ cd binutils-2.10 $ patch -p1 <../binutils-2.10-v810patch20110320.patch $ ./configure --target=v810 --prefix=$V810DEV $ make $ make install
Make sure you have a similar setup from installing binutils. I assume you have V810DEV and your path properly set.
$ tar xvf gcc-2.95.2.tar.gz $ cd gcc-2.95.2 $ patch -p1 <../gcc-2.95.2-v810patch20110320.patch $ ./configure --target=v810 --prefix=$V810DEV --with-newlib $ make # make install
Switch between forcing long and short calls. Long is JMP [reg], and short is JAL or JR.
Save registers in the prolog with a function, or not
Reduce output code size
static and global variable scratch size (for gp register use)
static and global variable fast size (for fast memory access)
Use a word for the jumptable index in a switch. Otherwise, only use half word. (This may fix bugs on large switch statements)
"By the way, PC-FX PC-FX in the area zda work area because there zda I do not think that you are using."
GCC and binutils create ELF files. These must be converted to PC-FXGA binary files like so:
$ v810-objcopy -O binary -R .stack -R .zdata foo.elf foo.bin