M52223EVB Link error

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

M52223EVB Link error

5,174 Views
schildt
Contributor I
Hi,
I'm using the M52223EVB together with the CW Special edition 5.7.0. I'm having problems when trying to compile my code. I was down to 1 linking error and then added the lcf files and suddenly I had 1001 errors. Almost all errors are are like this:
"Link error : Unexpected relocation R_68K_SDA16: __SDA_BASE not set in file xcp_usb.c"
Followed by:
"Link error : Illegal 16-bit small data area relative reference to symbol '_xcp_daq_dto_buffer_status'
from address 0x20004F0 in section '.text' of file 'xcp_usb.c'.
This type of reference has a range from 4294934528 to 32767 bytes."
I can't find any solution to the problem either in the manuals or on the forum.
What am I doing wrong?
I'm trying to implement the ASAM standard communication "XCP on USB" for communication between the evaluation board and my PC.
 
Thanks in advance!
 
Hakan Schildt
Labels (1)
0 Kudos
Reply
13 Replies

1,092 Views
cristina_c
Contributor I

Hi,

I am migrating my project from CW 5.7 in a XP windows machine to a CW 7.2 in a  W8 machine. When I try to compile I got exactly the same error reported by schildt :

"Link error : Unexpected relocation R_68K_SDA16: __SDA_BASE not set in file xcp_usb.c"

"Link error : Illegal 16-bit small data area relative reference to symbol '_xcp_daq_dto_buffer_status'
from address 0x20004F0 in section '.text' of file 'xcp_usb.c'.
This type of reference has a range from 4294934528 to 32767 bytes."

I have tried with all the solutions suggested above:

- I have changed in Standard Settings-> Coldfire Processor-> Core Model to Smart (16/32)

- I haved changed the Coldfire Processor" panel for the "use .sdata /.sbss for" area to "All data smaller than" to "0"

- By last I have done Project/Remove Object code to force a rebuilt.


Any of those worked for me. Has someone found another solution?


Thanks a lot in advance!!



0 Kudos
Reply

1,092 Views
carloscuevas
Contributor III

I had this problem opening a CFV1 proyect from CW MCU v6.2 in CW MCU v6.3, I solved it this way:

 

Edit > Standard Settings

then under the target setting panel called Coldfire Processor

change the Core Model to Smart (16/32 bit)

or try other options under that combobox.

0 Kudos
Reply

1,092 Views
paulsky
Contributor II

I had the same errors (hundreds of them) when converting from CW6.2 to 6.3. I changed the setting to Smart(16/32 bit) and it worked. Thanks for making your solution available.

 

 

0 Kudos
Reply

1,092 Views
stv7755
Contributor I

I've tried each of the above mentioned suggestions with no luck. Are there any updates to this issue?

0 Kudos
Reply

1,092 Views
Alexutzu
Contributor I

Hi,

 

Try going to ColdFire Compiler->Processor and clear the textbox near "Use .sdata/.sbiss for..... "

 

Alex

0 Kudos
Reply

1,092 Views
CrasyCat
Specialist III
Hello
 
Which Code Model and Data Model did you activate in the "Coldfire Processor" panel?
Try activating "Far (32 bit)".
 
Does it help?
 
CrasyCat
0 Kudos
Reply

1,092 Views
schildt
Contributor I
Hi,
thanks for the quick response! Both the code and data model are set to "Far (32 bit)". I've also tried using smart and near and neither works.
 
Do I need the linking command files (lcf) from the CMX USB stack?
 
/Hakan
0 Kudos
Reply

1,092 Views
CrasyCat
Specialist III
Hello
 
To get someone investigate the .lcf file issue, I would suggest you to submit a service request.
 
I would recommend you to submit a service request for that.

Click here to submit a service request.

Make sure to attach a reproducible project and installed product information to the service request.
To generate the required information:
- Start CodeWarrior
- Open the project
- Select "Help" -> "Pack and Go" and follow instructions on the screen.

Attach the generated .zip file to the SR.
 
Something else you can try the following:
In the "Coldfire Processor" panel set "All data smaller than" and enter "0" in the group "use .sdata /.sbss for". 
 
CrasyCat
0 Kudos
Reply

1,092 Views
schildt
Contributor I
hi,
 
I tried changing the Coldfire Processor" panel for the "use .sdata /.sbss for" area to "All data smaller than" to "0". But it didn't help so I did the pack and go and submitted a SR.
 
Tanks for your help anyway!
 
/Hakan
0 Kudos
Reply

1,092 Views
SanjayJ
Contributor I
How your problem resolved? I am also facing similar kind of linker problem.
0 Kudos
Reply

1,092 Views
JimDon
Senior Contributor III
I have noticed that when you change the link file, all modules do not always get rebuilt, and I have fixed link error doing this.

Project/Remove Object code to force a rebuilt.

0 Kudos
Reply

1,092 Views
SanjayJ
Contributor I
I have already done this, but problem remains the same.
0 Kudos
Reply

1,092 Views
DRuffer
Contributor I
Has anyone found a solution to this yet?  I just ran into it converting an application from 6.1 to 7.1.
0 Kudos
Reply