Friday, June 02, 2006

Using an assembler code with ham in Linux

I have done a small code in ARM assembler for the game boy.
The program has to contain at minimum these lines:


.globl _start
_start:




And here are the steps to use it properly.



  1. Compile the source code:


    arm-thumb-elf-as prog.s -o prog.o -gdwarf2


    The option: -gdwarf2 is used to inform that we want a debug version

  2. Link the file:


    arm-thumb-elf-ld prog.o -o prog.elf




  3. Run the debugger:


    arm-thumb-elf-insight prog.elf




  4. Now, you have to open an other console, and type the command:


    vba -Gtcp


    It is used to inform that the emulator will hear on port 55555 the code sent by insight.


  5. You just have now to set the target settings with target: Remote/TCP, Hostname is blank and Port is 55555.

  6. Now you just have to connect to target, download and run...

0 Comments:

Post a Comment

<< Home