我所使用单片机是MSP430FR2433,编译器是:v20.2.2.LTS,不使用sprintf的话一切正常,编译后RAM使用187(4%),FRAM使用3890(25%),把一条sprintf注释一去掉,编译就会报错:
"../lnk_msp430fr2433.cmd", line 132: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment fails for section "ALL_FRAM" size 0x4055. Available memory ranges:
>> Compilation failure
makefile:147: recipe for target 'MSP430FR2433_NRF24L01_TMP102_V1.3.out' failed
FRAM size: 0x3b80 unused: 0x3b80 max hole: 0x3b80
这个有使用那么大空间吗?是不是哪搞错了?
Susan Yang:
关于 sprintf 使用注意事项,请参考
processors.wiki.ti.com/…/Printf_support_in_compiler
processors.wiki.ti.com/…/Printf_support_for_MSP430_CCSTUDIO_compiler