Changeset 429


Ignore:
Timestamp:
Dec 15, 2010, 5:16:29 PM (9 years ago)
Author:
mulligan
Message:

1) README upated
2) executable now reads the name of the HEX file from argv

Location:
Deliverables/D4.1
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D4.1/README

    r188 r429  
    88    understood by the O'Caml emulator.
    99  * Build the emulator by running:
    10       $ ocamlbuild test.native
     10      $ ocamlbuild Test.native
    1111  * The emulator outputs on stderr.  As all 8051 programs loop infinitely, you
    1212    must manually terminate the emulator process after a few seconds, in order
    1313    to view the execution trace.  To execute the emulator, run:
    14       $ ./test.native HEX_FILE 2> /tmp/log
     14      $ ./Test.native Test.hex 2> /tmp/log
    1515    (assuming you are using the Bash shell, where 2> /tmp/log is a pipe from
    16      stderr to a temporary log file).
     16     stderr to a temporary log file and Test.hex is any Intex Hex file).
    1717  * Open /tmp/log.  The first section, above the dotted lines, is a sequential
    1818    readout from the emulator's code memory.  You can turn this off by editing
     
    3030    respectively, and the B register is 0xFF (if I remember correctly).
    3131
    32     NOTE: although most of the opcodes are debugged and tested, you may still
    33     come across bugs in the ones we have not reached yet.  If you do find a bug,
    34     please let us know!
     32-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
     33             Translating an INTEL HEX file to Matita.
     34-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
     35
     36  * Compile the C source file with SDCC.  SDCC will generate a number of files,
     37    including two files in the standard Intel Hex format (extensions .hex and
     38    .ihx).  These files (both are the same, just with differing extensions) are
     39    understood by the O'Caml translator.
     40  * Build the translator by running:
     41      $ ocamlbuild ToMatita.native
     42  * The translator outputs on stdout. To execute the translator, run:
     43      $ ./ToMatita.native Test.hex > Test.ma
     44    (assuming you are using the Bash shell, where > Test.ma is a pipe from
     45     stdout to a file and Test.hex is any Intex Hex file).
  • Deliverables/D4.1/Test.ml

    r426 r429  
    44open Pretty;;
    55
    6 let hex = IntelHex.intel_hex_of_file "Test.hex" in
     6let hex = IntelHex.intel_hex_of_file Sys.argv.(1) in
    77let mem = IntelHex.process_intel_hex hex in
    88let status = ASMInterpret.load_mem mem ASMInterpret.initialize in
  • Deliverables/D4.1/ToMatita.ml

    r428 r429  
    44open MatitaPretty;;
    55
    6 let hex = IntelHex.intel_hex_of_file "Test.hex" in
     6let hex = IntelHex.intel_hex_of_file Sys.argv.(1) in
    77let mem = IntelHex.process_intel_hex hex in
    88let status = ASMInterpret.load_mem mem ASMInterpret.initialize in
Note: See TracChangeset for help on using the changeset viewer.