只要一用那个函数就报错
./lnk_msp430g2553.cmd", line 56: error #10099-D: program will not fit into
available memory. run placement with alignment fails for section ".bss"
size 0x302 . Available memory ranges:
RAM size: 0x200 unused: 0x40 max hole: 0x40
error #10010: errors encountered during linking; "TItest.out" not built
SECTIONS
{
.bss : {} > RAM /* GLOBAL & STATIC VARS */
.sysmem : {} > RAM /* DYNAMIC MEMORY ALLOCATION AREA */
.stack : {} > RAM (HIGH) /* SOFTWARE SYSTEM STACK */
回复 楼主 baokeyu 的帖子
你加一个头文件:
#include试一下。。。。
刚在LaunchPad for MSP430G2553芯片上验证了一下sqrt(), 可以正常编译运行,没有出现楼主的报错啊
#include
#include
volatile unsigned int i,j;
i = 4;
j = sqrt(i);
楼主参考一下:
https://www.deyisupport.com/question_answer/f/55/t/10640.aspx