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

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

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

Jump to solution
637 Views
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 Kudos
1 Solution
337 Views
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

 

View solution in original post

0 Kudos
2 Replies
338 Views
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 Kudos
337 Views
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 Kudos