Link Error: Unexpected relocation R_68K_SDA16: __SDA_BASE not set in file libm.a e_log.o

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

Link Error: Unexpected relocation R_68K_SDA16: __SDA_BASE not set in file libm.a e_log.o

455 Views
catalinpetrescu
Contributor I

Hi there,

 

I have some code that compiles and links just fine under CodeWarrior, 7.1.

I imported the project in CodeWarrior Development Studio for ColdFire Architectures Version 7.2 and I get the above linker error.

Does anyone know how can I get rid of this error message?

 

Thanks.

Labels (1)
0 Kudos
1 Reply

306 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Catalin Petrescu,

Before Migrating to Codewarrior 7.2 from a previous CodeWarrior version I strongly recommend you to review the following document that explains the changes on the Compiler Parameter passing convention and Library Set:

http://www.freescale.com/files/soft_dev_tools/doc/app_note/TN268.pdf

If you use assembly functions in your code this may cause problems. The reason is that previous CW versions pass parameters through the stack. CW7.2 and CW10 do it by registers. In C language there is no problem as CW solves these differences, but assembly functions must be edited to work properly. You can find a useful video showing how to edit these functions in the next link:

http://www.youtube.com/watch?v=SlHldoQWt_8

Also if you are migrating from 7.1 to 7.2 I would suggest you to follow these steps:

- Create a new project in CW v7.2 using the New Project wizard, selecting the corresponding MCU and connections you are using.

- Copy the source files from the old project into the Sources folder of the new project.

- Make adjustments to the source files and settings to get the project to build correctly.

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos