# build script/batch-file via gcc cross-compiler and cross-binutils # /opt/mips/bin/mips-idt-elf-as -o initcodeelf.o initcodeelf.s # # we need -g instead of -O here, because we don't want the compiler to # optimize the I/O store operations away... # /opt/mips/bin/mips-idt-elf-gcc -g -O0 -c ks0108.c # # but we do want -O2 or -O3 optimization for the main program... # /opt/mips/bin/mips-idt-elf-gcc -g -O2 -c lcd.c /opt/mips/bin/mips-idt-elf-ld -o lcd.elf initcodeelf.o lcd.o ks0108.o -Ttext 00000010 -Tdata 00002000 /opt/mips/bin/mips-idt-elf-objdump -d lcd.elf > lcd.elf.txt # # generate .rom file with method label annotations # java hades.models.mips.tools.Elf2Rom lcd.elf lcd.rom java hades.models.mips.basic.ElfTxtLabels2Rom lcd.elf.txt lcd.rom # # some copies renamed to .txt for the website # cp lcd.c lcd.c.txt cp ks0108.c ks0108.c.txt cp lcd.rom lcd.rom.txt # echo "ok."