This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to get memory segment base address

Hi all,

I'm faced with the following problem and maybe someone can help me.

I’m using IRAM segment in L2 memory to buffer all data that are frequently accessed and I defined global variable that points on it. This value is used to point at the beginning of IRAM section and it’s currently hardcoded. That means that I calculated manually (L2 base address + cache size in L2 => IRAM base address) so if I change cache size in L2 then I need to recalculate that value and update the code. So my question is: Does anyone knows if there is variable, constant or function that is automatically updated or any other way to get updated value and use it to initialize my pointer to the base address of the IRAM section. I found MEM_getBaseAddress function but it returns the base address of the memory heap in particular segment. Not the base address of the segment.

Thanks in advance!

  • I don't believe there is such a function in BIOS for this, but you could make one fairly easily having it check the L2MODE value in the L2CFG register and knowing the base address of L2 generating a new effective base address. If one existed within BIOS this is probably what it would be doing.

    Since this seems like a fairly simple operation I am curious why you would desire an existing function to do this?