How to set the heap address for a CodeWarrior project with the MPC5125

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

How to set the heap address for a CodeWarrior project with the MPC5125

1,041 次查看
Tim562
Senior Contributor I

Hi All, I'm trying to figure out how to move the location of the heap in my MPC5125 project. I'm using Code Warrior for MobileGT 9.2 and when my .rodata section grew too large it grew into the section with the heap. I've looked in the Linker Control File for the project but it doesn't specify the location for the heap. The project memory.MAP file shows that the heap is located at 0x003D_FFF0 and that would conflict with the .rodata section. How do I relocate it (or insert a gap in the .rodata section)? Thanks!

~Tim

标签 (1)
标记 (3)
0 项奖励
回复
1 回复

829 次查看
Tim562
Senior Contributor I

If anyone needs to do this I believe I've got it working. I've added a new entry to the Linker Control File after the last GROUP entry in the ram section, like this:

GROUP :
{
__HEAP_START = .;
_heap_addr = __HEAP_START;
// __HEAP_END = __HEAP_START + __heap_size; /* Prefer not to spec the size */
} > ram

It was important to find the name "_heap_addr" as the value to be set, but once that was learned this seems to place the heap at the end of the specified data sections in the ram segment. Hope this helps!

~Tim

0 项奖励
回复