Part Number: PROCESSOR-SDK-AM335X
Tool/software: Code Composer Studio
Hello
It seems that the recommended way of specifying the BIOS system heap requires us to hard-code the location and size:
var textAndBss = 25 * 1024 * 1024; var totalRam = 0x20000000; BIOS.heapSize = totalRam - textAndBss; var heapSection = new Program.SectionSpec(); heapSection.loadAddress = 0x80000000 + totalRam - BIOS.heapSize; heapSection.runAddress = heapSection.loadAddress; heapSection.type = "NOLOAD"; Program.sectMap[".system.heap"] = heapSection; BIOS.heapSection = ".system.heap"
Obviously this is not good because we would either have to waste a lot of memory by assuming an overly large value for size of text+bss, or we are forced to manually update the hard-coded values every time we compile. Is there a way to let the linker figure out the best placement of the heap for maximum memory utilization?