Linker Error: symbol too far way for a R_56800E_WORD16 relocation

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

Linker Error: symbol too far way for a R_56800E_WORD16 relocation

2,890 Views
admin
Specialist II

I am using a 56f8345 micro with CodeWarrior 8.2.

 

I download the booterload source code which named "56F8300BOOTLOADER" from the Freescale website, and compile & make with codewarrior 8.2. it appears some linker Errors showed following:

 

Link Error   : Symbol F_vector_begin_addr referenced from address 0x000401A8 in section .text of file bootloader.c
is too far away for a R_56800E_WORD16 relocation, which has a range from 0 to 131070 bytes

Link Error   : Symbol F_Pcode_begin_addr_in_ROM referenced from address 0x000406D2 in section .text of file bootloader.c
is too far away for a R_56800E_WORD16 relocation, which has a range from 0 to 131070 bytes

Link Error   : Symbol F_Pcode_end_addr_in_ROM referenced from address 0x000406DE in section .text of file bootloader.c
is too far away for a R_56800E_WORD16 relocation, which has a range from 0 to 131070 bytes

Link failed.

 

 

but it is working fine with codewarrior 7.3 version.

 

what's wrong with it?  How can i fix this problem in my codewarrion 8.2 version?

 

 pls help me. Thanks!

Labels (1)
Tags (1)
0 Kudos
Reply
4 Replies

794 Views
trytohelp
NXP Employee
NXP Employee

Hi,

 

Let me know if you still need assistance for this problem.

 

Regards

Pascal

0 Kudos
Reply

794 Views
CapelliNeri
Contributor I

I am using a 56f8345 micro with CodeWarrior 8.2.

 

I download the booterload source code which named "56F8300BOOTLOADER" from the Freescale website, and compile & make with codewarrior 8.2. it appears some linker Errors showed following:

 

Link Error   : Symbol F_vector_begin_addr referenced from address 0x000401A8 in section .text of file bootloader.c
is too far away for a R_56800E_WORD16 relocation, which has a range from 0 to 131070 bytes

Link Error   : Symbol F_Pcode_begin_addr_in_ROM referenced from address 0x000406D2 in section .text of file bootloader.c
is too far away for a R_56800E_WORD16 relocation, which has a range from 0 to 131070 bytes

Link Error   : Symbol F_Pcode_end_addr_in_ROM referenced from address 0x000406DE in section .text of file bootloader.c
is too far away for a R_56800E_WORD16 relocation, which has a range from 0 to 131070 bytes

Link failed.

 

 

but it is working fine with codewarrior 7.3 version.

 

what's wrong with it?  How can i fix this problem in my codewarrion 8.2 version?

 

 pls help me. Thanks!

0 Kudos
Reply

794 Views
trytohelp
NXP Employee
NXP Employee

Hi,

 

The last version is:

 CodeWarrior Development Studio for Freescale 56800/E Digital Signal Controllers Version 8.2.3

Several examples are delivered under the installation.

We provided bootloader too.

Please have a look in the folder \Stationery\Processor_Expert_Examples\Bootloaders.

This can be accessed by the project Wizard too:

 File ¦ NEW ¦ Processor Expert Examples Stationery ¦ Bootloaders

 

We recommend you to use it.

If this could not be an option for you, I can propose you another solution explaining the problem.

The bootloader downloaded was design for the previous version (before V8.x).

 

Abstract     Linker error appears after switching from DSC8.0 to DSC 8.1.  Problem     A same application worked fine on the DSC 8.0.
Now with the DSC 8.1, the linker generates some error.

Extract of type of errors:

Link Error : Symbol F_vector_addr referenced from address 0x000411CC in section .text of file ACPBootloader.c
is too far away for a R_56800E_WORD16 relocation, which has a range from 0 to 131070 bytes

Link Error : Symbol F_Pcode_start_addr referenced from address 0x00041506 in section .text of file ACPBootloader.c
is too far away for a R_56800E_WORD16 relocation, which has a range from 0 to 131070 bytes

Link Error : Symbol F_Pcode_end_addr referenced from address 0x00041512 in section .text of file ACPBootloader.c
is too far away for a R_56800E_WORD16 relocation, which has a range from 0 to 131070 bytes

Link failed.
  Solution       The problem is due to a compiler improvment.
In previous version the compiler generated 24 bits access when 16 bits was possible.
The DSC8.o generated "long" instruction to all structure's data fields which are below the first appearance of
the pointer, array or nested structure in large data model when "Globals live in lower memory" checkbox is checked.

With the DSC8.1 We were worked on removing this different behaviour of compiler in generating code for structure
fields at different offsets.
So this performance issue is addressed in the DSC8.1
Now the compiler always makes use of 16-bit access in "small data model" and "large data model + globals live in lower mem".

In your case, if you disable "globals live in lower mem" and it should link fine.
So disabling "globals live in lower mem" is one workaround that is unfortunately losing performance (size, speed).
Another possible solution is to write some simple assembly functions that return the addresses of the symbols with problem
and use those functions as interface with the C code.
This way the performance will not be affected by the "globals live in lower mem" option.
 

 

Regards

Pascal

 

0 Kudos
Reply

794 Views
zhangpeihua
Contributor I

HOW can I get the Bootloaders.I can't find it!


thanks for your help!!

0 Kudos
Reply