本帖最后由 rekludge 于 2022-8-1 16:53 编辑
想把一个图片数组存到W25Q128中,通过QSPI的内存映射模式,
直接存到绝对地址时是正确的,代码如下 static const unsigned char image_a2[] __attribute__((at(0x90000000)))={ }
但当使用段名,即static const unsigned char image_a2[] __attribute__((section("ExtFlashSection"))) ={ }
且在分散加载文件中加入以下代码后,
[C] 纯文本查看 复制代码 LR_EROM1 0x90000000 0x800000 { ; load region size_region
ER_EROM1 0x90000000 0x800000 { ; load address = execution address
*.o (ExtFlashSection)
}
}
编译会显示 “ warning: L6329W: Pattern *.o(ExtFlashSection) only matches removed unused sections. ”
而且.map文件中也显示该段没有数据
[C] 纯文本查看 复制代码 Load Region LR_EROM1 (Base: 0x90000000, Size: 0x00000000, Max: 0x00800000, ABSOLUTE)
Execution Region ER_EROM1 (Base: 0x90000000, Size: 0x00000000, Max: 0x00800000, ABSOLUTE)
**** No section assigned to this execution region ****
请问这是什么原因?
|