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.

数组的存放位置的疑问?



1,在.cfg文件中有如下定义:

Program.sectMap[".resmgr_memregion"] = {loadSegment: "L2SRAM", loadAlign:128};    /* QMSS descriptors region     */

2,在源文件中定义个数组:

#pragma DATA_SECTION(gHostDesc, ".resmgr_memregion");
#pragma DATA_ALIGN (gHostDesc, 128)
uint8_t         gHostDesc[MAX_DESC_SIZE * MAX_NUM_DESC];

3,代码中有

    /* Initialize and setup CPSW Host Descriptors required for example */
    memset (gHostDesc, 0, p_qmss_cfg->desc_size * p_qmss_cfg->max_num_desc);
    memCfg.descBase             =   (uint32_t *) Convert_CoreLocal2GlobalAddr ((uint32_t) gHostDesc);

疑问:1和2是相关的定义,这样定义之后gHostDesc不是放在了共享内存了吗,为什么在使用时还用Convert_CoreLocal2GlobalAddr ( )函数?不是已经是全局地址了吗?不明白,求指导,谢谢了?