一.在link.ld文件中添加此段程序:
.end_flash : { PROVIDE( _end_flash = .); }>FLASH AT>FLASH
添加位置如下:
二.在程序中获取其大小:
extern const uint32_t _end_flash[]; PRINT("flash end address:%d\n",_end_flash);
三.编译结果和打印输出结果对比: