脚本链接文件link.lds添加可用存储区域
使用文本编辑器修改脚本链接文件(link.lds)
增加文本(添加在RAM下面即可)
/* external sram data, do not initialize at startup */
.ext_sram(NOLOAD) :
{
. = ALIGN(4);
_sext_sram = .; /* create a global symbol at ext_sram start */
*(.ext_sram)
*(.ext_sram*)
. = ALIGN(4);
_eext_sram = .; /* define a global symbol at ext_sram end */
} >SRAM AT> FLASH
定义变量方法
uint8_t temp_u8[1024] _attribute_((section(".ext_sram")));