How linking is done from command line?..

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

How linking is done from command line?..

1,506 Views
ajays
Contributor I
hello,
 
 I am a new user of codewarrior. I am using Codewarrior v6.4 for Coldfire.Target is MCF5282. I need to to know what all steps are involved in doing linking from command line. What all environment variables need to be set? Which runtime libraries need to be added?
 
I have set the Env var MWCLibraries. What to add in MWLibraryFiles?
  I have tried to use:
       mwldmcf -g -map -proc  MCF5282 main.o E68k_startup.o C_4i_CF_Runtime.a C_TRK_4i_CF_SZ_MSL.a M52282 fp_coldfire.o M5282EVB_EXT_ROM.lcf M5282EVB_INT_ROM.lcf M5282EVB_RAM.lcf
 
But its giving Illegal 16-bit absolute adddress reference to symbol errors.
 
Please Help.
Labels (1)
0 Kudos
3 Replies

429 Views
CrasyCat
Specialist III
Hello
 
Did you check the sample project {Install}\(CodeWarrior_Examples)\CmdlineTools.
The .bat files there should contain all the environment variable configuration you need.
 
CrasyCat
0 Kudos

429 Views
ajays
Contributor I
hi CrasyCat,
 Thanks for the quick reply. But I am using an evaluation version.I cannot find batch files here.
This is the procedure i followed. Please tell me if anything else is needed.
 
1) I have opened a sample project for MCF522111. Built it and executed succesfully on IDE.
2) I have compiled the sample main.c from command line to generate main.o with options:
    mwccmcf -c -v main.c    (is this enough?)
3)  I am using only the default ".LCF" file given in project directory.
I have used the following in command line:
 
mwldmcf -nodefaults  -g -proc MCF5221x –map “C:\Program Files\Freescale\CodeWarriorV6.4\(CodeWarrior_Examples)\new\sources\M52211EVB_CONSOLE.lcf" main.o E68k_Startup.o mcf52211_startup.o -L"C:\Program Files\Freescale\CodeWarriorV6.4\E68K_SUPPORT\Libraries"
-L"C:\Program Files\Freescale\CodeWarriorV6.4\E68K_SUPPORT\Runtime"
-L"C:\Program Files\Freescale\CodeWarriorV6.4\E68K_SUPPORT\msl\MSL_C\MSL_E68k\Lib"              -lfp_coldfire.o -lC_4i_CF_Runtime.a -lC_4i_CF_MSL.a
 
But i am getting errors like:
mwldmcf: between 0x00000000 and 0x00007FFF or 0xFFFF8000 and 0xFFFFFFFF in memory
mwldmcf: Illegal 16-bit absolute address reference to symbol '__START_SBSS'
 
mwldmcf: between 0x00000000 and 0x00007FFF or 0xFFFF8000 and 0xFFFFFFFF in memory
mwldmcf: Illegal 16-bit absolute address reference to symbol '__END_SBSS'
 
mwldmcf: between 0x00000000 and 0x00007FFF or 0xFFFF8000 and 0xFFFFFFFF in memory
mwldmcf: Illegal 16-bit absolute address reference to symbol '__START_BSS'
 
mwldmcf: between 0x00000000 and 0x00007FFF or 0xFFFF8000 and 0xFFFFFFFF in memory
mwldmcf: Illegal 16-bit absolute address reference to symbol '__START_BSS'
 
Please help.
 
 
 
 
0 Kudos

429 Views
CrasyCat
Specialist III
Hello

It looks like you have a problem with your .lcf file and that you are trying to place sections .sbss and bss outside of the recommended address range.

I do not have a V6.4 installed here, so I would recommend you to submit a service request around that to get one of our support engineer looking at that.

To log the issue please go to following URL:
http://www.freescale.com/TechSupport
and click on "Submit a service request"

CrasyCat
0 Kudos