MQX_init_struct Values From A Linker Control File - TWR-MPC-5125

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

MQX_init_struct Values From A Linker Control File - TWR-MPC-5125

跳至解决方案
716 次查看
Tim562
Senior Contributor I

Hi All,

 

    I have a question about creating a custom *.lcf file for my application (MQX 3.8, CW 9.2, TWR-MPC-5125). The default Linker Command File for the TWR-MPC-5125 only allocates about half of the DDR RAM available with this hardware and I've created a custom *.lcf for my project to make use of all 256 MB on the board.

 

    My question is this: It looks like several of the values in the default MQX_INITIALIZATION_STRUCT (used to start MQX) are set by values originally defined in a Linker Command File. For example, BSP_DEFAULT_START_OF_KERNEL_MEMORY is set to the value of __KERNEL_DATA_START in the twrmpc5125.h file located in the ...\mqx\source\bsp\twrmpc5125\ folder. If I change the value of __KERNEL_DATA_START in a custom *.lcf for my project do I also need to change the *lcf file used when MQX was compiled and then recompile MQX? If the answer is yes, are the *.lsf files that I need to change the ones located in the ...mqx\source\bsp\twrmpc5125\cw folder? Thanks!

 

~Tim

 

0 项奖励
回复
1 解答
416 次查看
pavel_chromy
NXP Employee
NXP Employee

Dear Tim,

 

the LCF files which are provided along with BSP are not used for compilation of the libraries at all, this are used only in the fnal linking stage of the application. Thus if you force the linker to use custom LCF file for you application there is no need to replace the ones in MQX source tree.

__KERNEL_DATA_START symbol is assigned in the liniing stage and it this should be placed dynamically just behind the code, unfortunately as you found out, this is not the case with 5125 - this is hopefully going to be fixed in the next release.

 

Pavel

 

在原帖中查看解决方案

0 项奖励
回复
2 回复数
417 次查看
pavel_chromy
NXP Employee
NXP Employee

Dear Tim,

 

the LCF files which are provided along with BSP are not used for compilation of the libraries at all, this are used only in the fnal linking stage of the application. Thus if you force the linker to use custom LCF file for you application there is no need to replace the ones in MQX source tree.

__KERNEL_DATA_START symbol is assigned in the liniing stage and it this should be placed dynamically just behind the code, unfortunately as you found out, this is not the case with 5125 - this is hopefully going to be fixed in the next release.

 

Pavel

 

0 项奖励
回复
416 次查看
Tim562
Senior Contributor I

Hi Pavel,

 

    Thanks very much for your reply. Things seemed to work properly as I modified the *.lcf files for my project but it sure helps to have someone else confirm what I observed. Have a great day and thanks again for your reply.

 

Best Regards,

Tim

0 项奖励
回复