Changing linker file for bootloader

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Changing linker file for bootloader

跳至解决方案
2,248 次查看
barbercolman
Contributor III

I have a MQX 3.7 and CW 10.1 I want to be able to bootloader. I edit the .lcf file and compile the project. If I exit and restart the project the linker file has reverted! How do I make a change to the linker perminate.

0 项奖励
回复
1 解答
1,571 次查看
petr_uhlir
NXP Employee
NXP Employee

 

The original linker command file for Codewarrior is located in "\bsp\{board_name}\cw\" directory

After compilation of bsp library the linker file is copied by postbuild batch file "\build\bat\bsp_{board_name}.bat " to 

"\lib\{board_name}.cw10\bsp lib directory.

 

So if you have 2 options

1. Modify the original linker file

or

2. Change the Linker Command File path in your application project so it refers to your custom linker file.

   Menu->Project ->Properties->C/C++ Build->Settings->Tool Settings Tab->ARM Linker->Input->Linker Command File-> Browse...

You have to change it for all Build configurations or select [All configurations] in Build configuration settings.

 

 

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,572 次查看
petr_uhlir
NXP Employee
NXP Employee

 

The original linker command file for Codewarrior is located in "\bsp\{board_name}\cw\" directory

After compilation of bsp library the linker file is copied by postbuild batch file "\build\bat\bsp_{board_name}.bat " to 

"\lib\{board_name}.cw10\bsp lib directory.

 

So if you have 2 options

1. Modify the original linker file

or

2. Change the Linker Command File path in your application project so it refers to your custom linker file.

   Menu->Project ->Properties->C/C++ Build->Settings->Tool Settings Tab->ARM Linker->Input->Linker Command File-> Browse...

You have to change it for all Build configurations or select [All configurations] in Build configuration settings.

 

 

0 项奖励
回复
1,571 次查看
barbercolman
Contributor III

Hi

I change the linker command file path for all confiurations. I also added my linker file to the linker files folder in the project. When I compiled I received a no rault toe make target for my linker config file. Any ideas?

0 项奖励
回复
1,571 次查看
DavidS
NXP Employee
NXP Employee

Hi Barber,

MQX is setup so that the RTOS gets built up with libraries that are placed in the mqx/libpath.

The application you build will link against those libraries.

When debugging an application the header files and linker files that get opened are in the mqx/lib path.  When the RTOS is built, the library and header files are copied from their source path to the mqx/lib path.  So any edits you make to a header file in the mqx/lib path will get over written the next time the RTOS is re-built (this has happened to me many times...).

So when editing a linker or header file, always check the path (mouse over the file name in the editor window).

Your method of placing the linker script into your project is OK too.

From your reply I do not understand the error you are getting.  Can you elaborate?

Regards,

David

0 项奖励
回复
1,571 次查看
barbercolman
Contributor III

Thanks it now makes more sense.

 

I a m new to Freescale and looking at the project in CW how do I tell which files can be edited? I see files that are linked and some of them can be edited and some can not! 

 

How do I know which is which

0 项奖励
回复