[vmips] ---Help, cannot run?

Brian R. Gaeke brg at dgate.org
Mon May 1 08:47:43 PDT 2006


To get a better idea of what is going on in a small program, it is
often convenient to use "-o instdump" and/or "-o dumpcpu".

Vmips simulates a bare MIPS R3000 board, not an operating system
environment.  You are very likely taking an exception because you
didn't set up a stack pointer, so you will need to run some startup
code to do this before you call main().  An example is in
"sample_code/setup.S" in the Vmips source distribution.

Also, in general, you will need to use vmipstool --link before --make-rom. 
For example:
    vmipstool --compile -c foo.c          
    vmipstool --verbose --link sample_code/setup.o foo.o -o foo
    vmipstool --make-rom foo foo.rom

-Brian

Bob Li wrote:
>    the main.c file is so simple like.
> 
>    int main(void)
>    {
>       int i;
> 
>       i=5;
>       return 0;
>    }
>    I compile using "vmipstool --compile -c main.c"
>    and then make rom using "vmipstool --make-rom main.o main.rom"
>    and then  I run using "vmips main.rom"
> 
>    the console log is:
>    -------------------------------------
>    Little-Endian host processor detected.
>    Mapping ROM image (main.rom, 1024 words) to physical address 0x1fc00000
>    Mapping RAM module (host=0x40115008, 1024KB) to physical address 0x0
>    Mapping Halt device to physical address 0x01010024
>    Mapping Clock device to physical address 0x01010000
>    Connected IRQ7 to the Clock device
>    Mapping SPIM console to physical address 0x02000000
>    Connected IRQ2-IRQ6 to SPIM console
>    Connected fd 4 to SPIM console line 0.
> 
>    *************RESET*************
> 
>    * Instruction bus error occurred -- HALTING *
> 
>    *************HALT*************
> 
>    Goodbye.
>    ---------------------------------------------------
> 
>    What kind of error it is?
> 
>    Please help!
> 
>    (I downloaded vmips-1.3.1 and mipsel-ecoff.tar.gz yesteday)
>    (host os is: redhat 9.0)
> 
>    Bob Li
>    2006.5.1
> 
> 
> 
> 

> _______________________________________________
> Vmips mailing list
> Vmips at dgate.ORG
> http://www.dgate.ORG/mailman/listinfo/vmips


More information about the Vmips mailing list