Re: A89: Re: Re: Showing Var-Link dialog


[Prev][Next][Index][Thread]

Re: A89: Re: Re: Showing Var-Link dialog




Hi!

> I can't get it to work.  I use the -outputbin option in TI-GCC,
> then convert the binary file to hex using a program I got on the
> Internet, copy and paste the hex into Graph-Link 89, and run the
> program on VTI.  When I do this (with any program, not just this
> specific one)  I get address errors, illegal instructions, you 
> name it, I got it.  I even got a neat flashing, moving address 
> error once.  Does anyone know where my mistake is?  I must be 
> doing it wrong.

Huh, huh... I am afraid that I know what is wrong. Exec strings
must consist of absolutely position-independent machine code (e.g.
everything must be done exculusively using relative addressing).
TI-GCC produces very often (read: almost always) non-relocatable 
code. But how TI-GCC programs may work on TI? Because .89z files 
contains (at the end) relocation table, and TIOS relocates and 
ASM program properly (depending of the actual address where it 
is stored) before executing.

So, if I am right (and I believe that I am), your problem seems
hardly solvable... you need to use -S option to produce ASM
source and to replace manually all position-dependent instructions
into independent ones. Principally, there exist a switch in
TI-GCC for producing position-independent code, but when I tried
this, it didn't work. Maybe somebody knows more about this?

Zeljko Juric



Follow-Ups: