Changeset 30 in XOpenSparcT1 for trunk/tools


Ignore:
Timestamp:
04/05/11 20:08:31 (14 years ago)
Author:
pntsvt00
Message:

aggiornata tool-chain

Location:
trunk/tools
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/tools/compila

    r19 r30  
    33##bisognerebbe fare un makefile ma per ora: 
    44 
     5if [ ! $# == 1 ]; then 
     6                  echo "usage: compila nome_file (without extension)" 
     7                  exit 0 
     8fi 
     9 
     10 
    511## compila con ISA SPARC-V9 
    6 /opt/sparc64-sun-solaris2.8-toolchain/bin/sparc64-sun-solaris2.8-gcc -ffreestanding -nostdinc -c test.c 
     12/opt/sparc64-sun-solaris2.8-toolchain/bin/sparc64-sun-solaris2.8-gcc -ffreestanding -nostdinc -Os -c $1.c 
     13 
     14## linka con ISA SPARC-V9 a 64 bits 
     15echo "create $1.bin" 
     16/opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/ld -melf64_sparc --script linker.lds $1.o -o $1.bin 
     17 
    718 
    819## fa il dump del file 
    9 /opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/objdump -d test.o >test.dump 
     20/opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/objdump -d $1.bin >$1.dump 
    1021 
    1122### crea memory.hex 
    12 ../tools/dump2hex.php <test.dump >../sim/memory.hex 
     23echo "create memory_hello.hex for simulation" 
     24 
     25../tools/dump2hex.php <$1.dump >../sim/memory_hello.hex 
  • trunk/tools/dump2hex.php

    r26 r30  
    66 
    77  // Discard first lines 
    8   for($i=0; $i<8; $i++) fgets($fp); 
     8  for($i=0; $i<7; $i++) fgets($fp); 
    99 
    1010  // instruction start at address 10h 
    1111  //echo "@ 10\n"; 
    1212  echo "// inserisco 16 ff per partire da 10h e scrivo op4,op3,op2,op1 \n"; 
    13   echo "ffff\n"; 
    14   echo "ffff\n"; 
    15   echo "ffff\n"; 
    16   echo "ffff\n"; 
    17   echo "ffff\n"; 
    18   echo "ffff\n"; 
    19   echo "ffff\n"; 
    20   echo "ffff\n"; 
    21   echo "ffff\n"; 
    22   echo "ffff\n"; 
    23   echo "ffff\n"; 
    24   echo "ffff\n"; 
    25   echo "ffff\n"; 
    26   echo "ffff\n"; 
    27   echo "ffff\n"; 
    28   echo "ffff\n"; 
     13  echo "0001\n"; 
     14  echo "0000\n"; 
     15  echo "0001\n"; 
     16  echo "0000\n"; 
     17  echo "0001\n"; 
     18  echo "0000\n"; 
     19  echo "0001\n"; 
     20  echo "0000\n"; 
     21  echo "0001\n"; 
     22  echo "0000\n"; 
     23  echo "0001\n"; 
     24  echo "0000\n"; 
     25  echo "0001\n"; 
     26  echo "0000\n"; 
     27  echo "0001\n"; 
     28  echo "0000\n"; 
     29 
    2930  // Print only the opcodes to stdout 
    3031  while (!feof($fp)) { 
Note: See TracChangeset for help on using the changeset viewer.