工具/软件:Code Composer Studio
你好
指定 BIOS 系统堆的建议方法似乎要求我们对位置和大小进行硬编码:
var loadAndBss = 25 * 1024 * 1024; var totalRam = 0x20000000; BIOS.heapSize = totalRam - textAndBss; var heapSection = new Program.SectionSpec (); heapSection.loadAddress = 0x80000000 + textalRam - BIOS.heapSize; heapSection.runAddress = heapot.Section= Program.sectMap[".system.heap"] ;heap.Section ="Heapotap.back.backs";"inch"="ina.load.Section ="ina.load.back"
很明显、这种情况并不好、因为我们必须假定 text+bss 的大小值过大而浪费大量的内存、或者我们在每次编译时都被迫手动更新硬编码值。 是否有办法让链接器找出堆的最佳位置以实现最大内存利用率?