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 do I combine multiple non-contiguous SARAM?

Other Parts Discussed in Thread: TMS320F28035

Device is TMS320F28035. I need a larger stack space. Currently it's sitting on 0x00 0040 to 0x00 07FF. .ebss is using 0x00 8000 to 0x00 9FFF (about 0x10f7 is currently consumed by .ebss).

That way, I want to combine the current stack space with 0x00 8000 to 0x00 87FF.

Currently:

M0SARAM is from 0x00 0040, length is 0x7C0.

L0SARAM is from 0x00 8000, length is 0x800.

L1SARAM is FROM 0x00 8800, length is 0x1800.

How do I make stack space to occupy M0SARAM and L0SARAM?

Thanks

  • Hi Gloria,

    stacks has to be allocated in continuous addressable memory. you can combine L0 and L1 to one section as L0L1 and allocate stack to that space. but you cannot combine M0 and L0 memory into single section because of discontinuity in addresses.

    correct me if I'm wrong, but I'm sure about that.

     

    Best Regards

    Santosh

  • In that case, I'll make stack to occupy 0x00 8000 to 0x00 8FFF. So now the question becomes how do I put .ebss to occupy 0x00 9000 to 0x00 9FFF (call it HRAM) *and* 0x00 0040 to 0x00 07FF (call it LRAM). Is this possible?

    And one more thing, if I have this declaration as global:

    static char readBuffer0[512]; // unintialized, declared before main()

    Would that variable be allocated to .ebss section?

    Thanks

  • Hi Gloria

    Gloria Budiman said:

    In that case, I'll make stack to occupy 0x00 8000 to 0x00 8FFF. So now the question becomes how do I put .ebss to occupy 0x00 9000 to 0x00 9FFF (call it HRAM) *and* 0x00 0040 to 0x00 07FF (call it LRAM). Is this possible?

    yes, you can do that. But thats a lot of stack - please verify if you would need that much stack. You can do this by Filling all the stack memory with some signature value (55AA or ABCD or DEAD...something like that), then run your applciation for however long you need and see at what memory address you still have your signature that you filled in memory. you wouldn't need all that memory for stack.

    Gloria Budiman said:

    And one more thing, if I have this declaration as global:

    static char readBuffer0[512]; // unintialized, declared before main()

    Would that variable be allocated to .ebss section?

    After you link your application, look at the MAP file in your debug or release directory (it will be same directory as your COFF file is in). The map file has all the information needed to see where your global buffer is allocated at. In your case you are right it will be in ebss section.

    hope that helps.

    Best Regards

    Santosh

  • So, how do I combine two memory location for .ebss again?

    I tried:

    .ebss : >> LOC_A | LOC_B, PAGE = 1

    But linker reports the amount of space un-combined.

  • nope, just increase the size of the LOC_A section in the memory{} directive on the linker command file to include entire LOC_B, then the in sections directive allocate ebss to LOC_A (whose size is now increased to include LOC_B.

     

    Thanks

    santosh