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 ( )函数?不是已经是全局地址了吗?不明白,求指导,谢谢了?
Shine:
请问你的L2SRAM地址定义的是0x00800000 Local L2 RAM还是0x1x800000全局地址?