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.

AWRL6432: Shared Memory setting (SBL, Main)

Part Number: AWRL6432
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi team,

This is Lina covering Radar. Below is the customer's question.

.

The current development structure is structured using SBL.

They want to set the Shared Memory Config to 1 and subtract 128K from the HWA to set it on the MAIN side.

.

[ MAIN linker.com ]

MEMORY

{

    M4F_VECS : ORIGIN = 0x00400000 , LENGTH = 0x00000140

    M4F_VERINFO : ORIGIN = 0x00400140 , LENGTH = 0xC0

    M4F_RAM12  : ORIGIN = 0x00400200 , LENGTH = (0x00058000 - 0x200) /* 32KB of RAM2 is being used by RBL */

    M4F_RBL    : ORIGIN = 0x00458000 , LENGTH = 0x8000 /* 32KB of RAM2 is being used by RBL */

    M4F_RAM3  : ORIGIN = 0x00460000 , LENGTH = 0x00040000

    HWASS_SHM_MEM : ORIGIN = 0x60000000, LENGTH = 0x00060000 /* 256KB in APPSS PD, 96KB in FECSS PD and 160KB in HWA PD */

}

 .

[ SBL linker.cmd ]

MEMORY

{

    M4F_VERINFO : ORIGIN = 0x00400140 , LENGTH = 0xC0

    M4F_VECS : ORIGIN = 0x00480000 , LENGTH = 0x00000200

    M4F_SHA_RAM  : ORIGIN = 0x00480200 , LENGTH = 0x00040000 - 0x00000200

    M4F_RAM  : ORIGIN = 0x00400200 , LENGTH = 0x00010000

}

.

They want to set it as above and use it, but the M4F_VECS area on the SBL side overlaps with the M4F_RAM3 area on the MAIN side, causing a problem.

They'd like to move the M4F_VECS area of SBL to another place, is there any possible area?

(If possible, They want to move to the area after 0x400200, but if I set it that way, it won't boot.)

.

Regards,

Lina

  • Hi Lina,

    Thanks for posting your question over E2E. Please allow us a day for our software expert to respond.

  • We also encountered the same problem, when can we get the answer? Thank you!

  • I have currently resolved this issue
    The following is the modified part

    ---> makefile_ccs_bootimage_gen

    BOOT_VECTOR_ADDRESS=0x400000
    SH_MEM_CONFIG=0x03

    --->example.syscfg

    CONFIG_MPU_REGION1=>Region Size(bytes) : 1MB

    --->linker.cmd

    SECTIONS
    {
        /* This has the M4F entry point and vector table, this MUST be at 0x0 */
        .vectors:{} palign(8) > M4F_VECS
        .bss:    {} palign(8) > M4F_RAM12     /* This is where uninitialized globals go */
        RUN_START(__BSS_START)
        RUN_END(__BSS_END)
        .text:   {} align(8) >> M4F_SHA_RAM     /* This is where code resides */
        .data:   {} align(8) >> M4F_RAM12 | M4F_RAM3     /* This is where initialized globals and static go */
        .rodata: {} align(8) >> M4F_RAM12 | M4F_RAM3     /* This is where const's go */
        .sysmem: {} palign(8) > M4F_RBL     /* This is where the malloc heap goes */
        .stack:  {} palign(8) > M4F_RBL     /* This is where the main() stack goes */
        .l3:     {} palign(8) > HWASS_SHM_MEM     /* This is where L3 data goes */
        /* This section has code that configures the APPSS/HWASS shared memory either to APPSS or HWASS based on SH_MEM_CONFIG parameter in meta header.
           Hence this code has to run from regular RAM */
        .jumptoApp: {} palign(8) > M4F_RAM3
        .jumptoAppdata: {} palign(8) > M4F_RAM3
    }
    
    MEMORY
    {
        M4F_VECS : ORIGIN = 0x00400000 , LENGTH = 0x00000200
        M4F_RAM12  : ORIGIN = 0x00400200 , LENGTH = (0x00058000 - 0x200) /* 32KB of RAM2 is being used by RBL */
        M4F_RBL    : ORIGIN = 0x00458000 , LENGTH = 0x8000 /* 32KB of RAM2 is being used by RBL */
        M4F_RAM3  : ORIGIN = 0x00460000 , LENGTH = 0x00020000
        M4F_SHA_RAM  : ORIGIN = 0x00480200 , LENGTH = 0x00040000 - 0x00000200
    
        HWASS_SHM_MEM : ORIGIN = 0x60000000, LENGTH = 0x00080000 /* 256KB in APPSS PD, 96KB in FECSS PD and 160KB in HWA PD */
    }

    *** The key is to clean build ***

  • Hey Lina,

    You should be able to move M4F_VECS to the same location as the application image itself - i..e, M4F_VECS : ORIGIN = 0x00400000 , LENGTH = 0x00000140 - since the vector table should match for both unless you are using a project with a different RTOS version from the SBL. Additionally, have you configured MPU_REGION1 as 1 MB in SysConfig? 

    Regards,

    Kristien

  • Hello Kristien,

    Thank you for your attention and kind response! He's my customer who asked that question.

    Have a good day.

    Regards,

    Lina

  • Hey Lina,

    Perfect, thanks for letting me know. I will close out this thread now.

    Cheers,

    Kristien