Changing linker file for bootloader

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Changing linker file for bootloader

ソリューションへジャンプ
2,227件の閲覧回数
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,550件の閲覧回数
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,551件の閲覧回数
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,550件の閲覧回数
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,550件の閲覧回数
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,550件の閲覧回数
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 件の賞賛
返信