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

898件の閲覧回数
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 返信

686件の閲覧回数
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 件の賞賛
返信