打印

STM8程序超过了32K,怎么办,编译报错

[复制链接]
5645|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
有意思|  楼主 | 2010-2-24 20:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
STM8S207RB程序超过了32K,怎么办,编译报错
#error cpstm8 stm8_interrupt_vector.c:45(25) space attribute conflict

memory model选择的是long stack(+modsl)

r如果选择long stack(+modsl)
增加一句“i=0;”就报错:
#error clnk Debug\afn80.lkf:34 Debug\event.o: section boundary crossing (.text:0bd3) c_xymvx
#error clnk Debug\afn80.lkf:34 Debug\event.o: section boundary crossing (.text:0c2c) c_xymvx
#error clnk Debug\afn80.lkf:40 Debug\rtc.o: section boundary crossing (.text:009c) c_xymvx
#error clnk Debug\afn80.lkf:40 Debug\rtc.o: section boundary crossing (.text:023d) c_xymvx
The command: "clnk -l"D:\Program Files\COSMIC\CXSTM8_16K\Lib"  -o Debug\afn80.sm8 -mDebug\afn80.map Debug\afn80.lkf " has failed, the returned value is: 1
exit code=1.
afn80.elf - 6 error(s), 0 warning(s)

编译正确时的的map文件如下

                               --------
                               Segments
                               --------
start 00008080 end 00008d19 length  3225 segment .const
start 00008dac end 0001000b length 29279 segment .text
start 00004000 end 00004000 length     0 segment .eeprom
start 00000000 end 00000000 length     0 segment .bsct
start 00000000 end 0000000a length    10 segment .ubsct
start 0000000a end 0000000a length     0 segment .bit
start 0000000a end 0000000a length     0 segment .share
start 00000100 end 0000018b length   139 segment .data, initialized
start 00008d21 end 00008dac length   139 segment .data, from
start 0000018b end 00000b4c length  2497 segment .bss
start 00000000 end 00024530 length 148784 segment .debug
start 00008000 end 00008080 length   128 segment .const
start 00008d19 end 00008d21 length     8 segment .init
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

79

主题

331

帖子

0

粉丝