这原是回复二楼的,可是一点回复就要登录,登录完点回复又要登录,死循环了。。。
只好回复自己了。
把官方库文件的flash.c指定0x4000的地址,就好了。参考的是下面这个帖子:
https://www.amobbs.com/forum.php?mod=viewthread&tid=5479814
具体做法:用记事本打开hc32l19x.icf,后面加一句:place at address mem:0x00004000 { section .text object flash.o };
(上传图片一直错误,直接贴.icf的最后几行吧,红色是加上去的)。
initialize by copy { readwrite };
do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place at address mem:0x00004000 { section .text object flash.o };
place in ROM_region { readonly };
place in RAM_region { readwrite, block CSTACK, block HEAP };
|