how to specify an .lcf file on the codewarrior IDE?

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

how to specify an .lcf file on the codewarrior IDE?

1,777 Views
ispd
Contributor II

Dear All,

 

i am trying to specify within the codewarrior IDE a .lcf file for the linker but I am unable to add  -lcf mylinker.lcf file. How to do that?. I have added the .lcf extension to the IDE and also I have added the .lcf file to the project but it seems is using another one. I am using Codewarrior for mpc55xx v2.3.

 

Thanks a lot and best regards,

 

ispd

Labels (1)
0 Kudos
6 Replies

596 Views
stanish
NXP Employee
NXP Employee

Hello ispd,

 

in order to use your own .lcf file in CodeWarrior IDE:

1) make sure the project is configured to use linker command file: ALT+F7 -> "EPPC Linker" -> "Use Linker Command File" (see the CW_Linker_settings_lcf.jpg)

 

2) add your .lcf file into a project and assign the .lcf file to appropriate target (see the black point in the target icon column at .lcf file row - CW_Project_lcf.jpg). There can be only one .lcf file associated with a target otherwise warning message appears.

 

Hope it will help.

 

Stanish

0 Kudos

596 Views
kleckerspur
Contributor III

Hello  Stanislav Sliva ,

coud you please tell me where are the following files?

the CW_Linker_settings_lcf.jpg

row - CW_Project_lcf.jpg

Thanks kleckerspur

0 Kudos

596 Views
stanish
NXP Employee
NXP Employee

Hello,

I reattached the files below:

CW_Linker_settings_lcf.jpg

CW_Linker_settings_lcf.JPG.jpg

CW_Project_lcf.jpg

CW_Project_lcf.JPG.jpg

Hope it helps.

Stan

0 Kudos

596 Views
ispd
Contributor II

Thanks a lot Stanish,

 

Could the same .lcf file being used for debug and release?. What should be different. I am trying to do a .lcf that loads from flash the data to RAM and executes the code from flash. I have read the RomToRam (for coldfire but not for mpc55xx) and some ApNote on this forum but I was not able to run it. Do you have a tested .lcf that works for an mpc55xx device for debugging on flash and another for debugging on RAM?.

 

I have used some that define LOAD_RAM_SIZE, etc. but I don't know if that depends if the start is on .asm or on .c. 

 

Thanks a lot and best regards,

 

ispd

0 Kudos

596 Views
stanish
NXP Employee
NXP Employee

Hi ispd,

 

Yes, single .lcf could be used for multiple build targets (e.g. for both debug and release build targets)

Default CodeWarrior project generated by the IDE Wizard creates two different build targets - Internal_FLASH and RAM.

Since in both cases the code/data are located at different addresses there are two separate .lcf files (MPC55xxx.lcf and MPC55xxx_DEBUG).

 

RAM build target is for debugging in RAM and Internal_FLASH generates a ROM image = loads data from flash to RAM during startup and executes from FLASH.

 

I'd suggest you to create an IDE project using wizard and see the settings + .lcf. This project includes all the files and routines needed for startup to main. Or you can open the projects from "CodeWarrior Examples directory" which use little different starup file and project settings than projects generated by the Wizard

 

Hope it will help.

 

Stanish

 

 

 

0 Kudos

596 Views
ispd
Contributor II

Helllo I have some doubt about the script that the pemicro executes mpc55xx_ebook2. I mean, if I use .lcf for flash is it not supposed that the MMU, etc. are configured by the code. Why do I need to execute the script.

0 Kudos