[求助] 修改工程的链接文件地址的问题

wbqq2008   2011-11-24 15:45 楼主

向各位大牛请教下:

                             修改工程下链接文件的FLASH地址为非零,在IAR的DEBUG下,用同一个程序仿真测试不正常。

                     步骤如下:

                             修改工程下链接文件的地址从0x2000开始,用的单片机是LUM1138(64KB),程序大小小于40KB

                             我的链接文件如小

                             define memory mem with size = 4G;

                             define region FLASH = mem:[from 0x00002000 to 0x0003ffff];

                             define region SRAM = mem:[from 0x20000000 to 0x2000ffff];

                             define block HEAP with alignment = 8, size = 0x00000000 { };

                             initialize by copy { readwrite };

                             do not initialize { section .noinit };

                             place at start of FLASH { readonly section .intvec };

                             place in FLASH { readonly };

                              place in SRAM { readwrite, block HEAP };

[ 本帖最后由 wbqq2008 于 2011-11-24 15:56 编辑 ]

回复评论 (1)

为啥要把地址设到0x2000?M3只能执行从0开始的程序,除非已经下载了bootloader。
点赞  2011-11-29 01:35
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复