Using CW for ColdFire v.6.4, target MCF5307, assembly error: "Illegal relocatable".

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using CW for ColdFire v.6.4, target MCF5307, assembly error: "Illegal relocatable".

1,422件の閲覧回数
Veter
Contributor I
I have this simple statement in my os_cpu_a.s file:
...
TER0 .equ ___MBAR+0x151
...
 
It seems quite legal but compiler throws exception bellow:
Error   : Illegal relocatable expression
os_cpu_a.s line 161   TER0 .equ ___MBAR+0x151
 
I'm quite sure the answer is very simple I just can't find any info in the help files.
Can anyone please give me a hint what I'm I missing here?
 
ラベル(1)
0 件の賞賛
返信
1 返信

727件の閲覧回数
SimonMarsden_de
Contributor II
The CodeWarrior assembler only supports equates which can be fully resolved at assembly time. I think that a lot of assemblers work this way.

You can achieve the effect that you want by using a .textequ directive:

TER0:     .textequ "___MBAR+0x151"

When the assembler encounters the symbol TER0 in the source code, it will substitute the string __MBAR+0x151 (Like #define in the C preprocessor).


Hope this helps


Simon
0 件の賞賛
返信