CW6.3 L1907 fixup problem

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

CW6.3 L1907 fixup problem

ソリューションへジャンプ
2,030件の閲覧回数
Herman
Contributor I

Hello,

I recompile CW specialedition 5 code with 6.3 (last week downloaded) and get L1907 fixup problems

usually it's something with crossreference and xdef etc. but now I don't understand it.

I an asm-file I have:

   xdef    parBatt

   org     $8400
parBatt

   dcl     32768

 

in a c-file I call it

   l = Ucalc(Vbuf, parBatt);

What's causing the error?

 

Any help appriciated

Regards

Herman

ラベル(1)
0 件の賞賛
1 解決策
545件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

The L1907, Fixup overflow is issued when the referred object cannot be reached with the used addressing mode, for example when accessing a far function with the near calling convention or an extended allocated variable with direct addressing mode.

For example if the parBatt variable would be accessed in the tiny memory model I would expect a 

L1907  when accessing it as it is not allocated in the direct segment, the default in the tiny model.

The declaration would have to be in a __FAR_SEG qualified pragma.

What exactly is the problem in this particular case? I don't know, really not enough information.

Check in the map file how the objects are allocated and check the code how the compiler is accessing the variable.

Things which could provide more insight:

- Map file entries about the mentioned objects

- The actual error text (Tip: Ctrl-C works in the message window!)

- memory model used

- #pragma's and other special topics

- disassembly of the code for which the error is issued.

- which derivative, banking?

 

Daniel

 

元の投稿で解決策を見る

0 件の賞賛
4 返答(返信)
545件の閲覧回数
CrasyCat
Specialist III

Hello

 

How is the prototype for Ucalc looking like?

How does the external declaration for parBatt look like in your C source file?

 

CrasyCat

0 件の賞賛
545件の閲覧回数
Herman
Contributor I

Sorry, I forgot.

 

Ucalc is at the beginning of the file and is not in the .h file

 

long Ucalc(unsigned int ivalue, long lPar)

{

...

}

In the (included) .h file it's defined as.

extern long parBatt;

 

Regards

Herman

0 件の賞賛
546件の閲覧回数
CompilerGuru
NXP Employee
NXP Employee

The L1907, Fixup overflow is issued when the referred object cannot be reached with the used addressing mode, for example when accessing a far function with the near calling convention or an extended allocated variable with direct addressing mode.

For example if the parBatt variable would be accessed in the tiny memory model I would expect a 

L1907  when accessing it as it is not allocated in the direct segment, the default in the tiny model.

The declaration would have to be in a __FAR_SEG qualified pragma.

What exactly is the problem in this particular case? I don't know, really not enough information.

Check in the map file how the objects are allocated and check the code how the compiler is accessing the variable.

Things which could provide more insight:

- Map file entries about the mentioned objects

- The actual error text (Tip: Ctrl-C works in the message window!)

- memory model used

- #pragma's and other special topics

- disassembly of the code for which the error is issued.

- which derivative, banking?

 

Daniel

 

0 件の賞賛
545件の閲覧回数
Herman
Contributor I

Thanks Daniel,

 

I played around a little with the pragma's and had to add 3 of them to get it compiled.

It's still strange because a few have pragma's and some don't have allthough it looks the same?

Now I'm testing the lot.

 

I also found out that the memory model has changed from small to tiny?

I have to look into this, because I took the 'last-release' files without any changes.

 

Thanks again

Herman

 

0 件の賞賛