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.

F28377D Memory Space 0x0000 0800~0x0000 0AFF

Hello,

I couldn't find where the RAM section from 0x0000 0800 to 0x0000 0AFF belongs to. Anybody can tell me?

In my program, some of the local variables are in this section, and these variables are not function correctly.

For example, the following for loop doesn't work. The program stuck in the loop, no matter how many times the loop executed, the value of variable ‘i’ is still 0. Does anybody have an idea about this? what may cause this kind of problem? Does the data locations cause this issue?

              uint8                i;

             for (i = 0; i < RSI_FRAME_DESC_LEN; i++)
            {
               uFrameDscFrame->uFrmDscBuf[i] = 0x00;

            }

Thanks.

Xiaowei

  • Hi,

    0x000 to 0x7FF is M0 and M1 RAM an should be ok to use. Some of the RAM is used for BOOTROM usage. Please refer BOOTROM section in TRM for the same.

    0x800 to 0xAFF is reserved space and should not be used.

    Regards,

    Vivek Singh 

  • Hi Vivek,

    The linker file links  .stack to RAMM1 (0x400 to 0x7ff). But why some variables are still go to 0x800 to 0xAFF section.  

    Xiaowei

  • Hi Xiaowei,

    Please check the mapping of .bss section as well. Also check for the warning in compile log.

    Regards,

    Vivek Singh

  • Hi Vivek,

    I didn't see anything unusual from warning.

    The way I can fix this problem is by using RAMM0 for .stack.  ".stack      : > RAMM0,     PAGE = 1"

    The thing I can not figure out is why some of the variables go to RAMM1, even I have specified nothing in RAMM1. And by checking Memory Browser, RAMM0 still has lot of space available.

          BOOT_RSVD       : origin = 0x000002, length = 0x000120     /* Part of M0, BOOT rom will use this for stack */
           RAMM0               : origin = 0x000122, length = 0x0002DE    // moved from page 0
           RAMM1           : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1 */
           TI_RSVD         : origin = 0x000800, length = 0x000300    //added
           RAMD1           : origin = 0x00B800, length = 0x000800

           .stack              : > RAMM0        PAGE = 1

           .ebss               : >> RAMLS5 | RAMGS0       PAGE = 1

    So I think when I assign RAMM0 for .Stack, some thing will go to RAMM1. When I assign RAMM1 for .stack, something will go to reserved memory and cause error.

    Xiaowei

  • Sounds like you are overflowing the stack. The compiler doesn't do any checks on the size you allocated for stack and the actual stack that is needed. Perhaps a large array or structure within a function? Or nesting a number of functions? You can try filling the memory M0 and M1 with a known value and then run your program. It will show you how large the stack grew.