source: XOpenSparcT1/trunk/tools/compila @ 36

Revision 36, 1.0 KB checked in by pntsvt00, 14 years ago (diff)

modificati i file per la compilazione. boot.s linkato a 0xFFF0000020

Line 
1#!/bin/bash
2
3##bisognerebbe fare un makefile ma per ora:
4
5if [ ! $# == 1 ]; then
6                  echo "usage: compila nome_file (without extension)"
7                  exit 0
8fi
9
10
11#assembla il boot.S
12echo "create boot.o"
13/opt/sparc64-sun-solaris2.8-toolchain/bin/sparc-sun-solaris2.8-as -xarch=v9 -64 boot.S -o boot.o
14
15## compila con ISA SPARC-V9
16echo "compile $1.c"
17/opt/sparc64-sun-solaris2.8-toolchain/bin/sparc64-sun-solaris2.8-gcc -m64 -ffreestanding -nostdinc -Os -c $1.c
18
19## linka con ISA SPARC-V9 a 64 bits
20echo "create $1.bin"
21#/opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/ld -melf64_sparc --script linker.lds boot.o $1.o -o $1.bin
22
23### da codice S1
24/opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/ld -melf64_sparc --script=linker.map -EB -o $1.bin boot.o $1.o
25
26
27## fa il dump del file
28/opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/objdump -zD $1.bin >$1.dump
29
30### crea memory.hex
31echo "create memory_hello.hex for simulation"
32
33../tools/dump2hex.php <$1.dump >../sim/memory_hello.hex
Note: See TracBrowser for help on using the repository browser.