CW6.3 L1907 fixup problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CW6.3 L1907 fixup problem

Jump to solution
2,019 Views
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

Labels (1)
0 Kudos
1 Solution
534 Views
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

 

View solution in original post

0 Kudos
4 Replies
534 Views
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 Kudos
534 Views
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 Kudos
535 Views
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 Kudos
534 Views
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 Kudos