-
DSP28335中,math.h调用取整函数trunc编译报错, sos
[align=left][font=Arial, Helvetica, sans-serif][size=12px]在DSP28335中,用的是CCS6.2,在main.c中首先包含了math.h,如下:[/size][/font][/align][align=left][font=Arial, Helvetica, sans-serif][size=12px][img=0,240]https://e2echina.ti.com/resized-image/__size/640x480/__key/communityserver-components-multipleuploadfilemanager/ce4c46aa_2D00_a133_2D00_464f_2D00_9d6b_2D00_3630b2ccaa04-154057-complete/pastedimage1726107940466v1.png[/img],[/size][/font][/align][align=left][font=Arial, Helvetica, sans-serif][size=12px]然后在main.c中,调用sin,cos,atan,mod等函数都可以正常编译并使用,但是当调用trunc取整函数的时候编译报错,取整类函数ceil也不能使用,报错,如下:[/size][/font][/align][align=left][font=Arial, Helvetica, sans-serif][size=12px][img=0,240]https://e2echina.ti.com/resized-image/__size/640x480/__key/communityserver-components-multipleuploadfilemanager/ce4c46aa_2D00_a133_2D00_464f_2D00_9d6b_2D00_3630b2ccaa04-154057-complete/pastedimage1726108090161v2.png[/img],[/size][/font][/align][align=left][font=Arial, Helvetica, sans-serif][size=12px][img=0,240]https://e2echina.ti.com/resized-image/__size/640x480/__key/communityserver-components-multipleuploadfilemanager/ce4c46aa_2D00_a133_2D00_464f_2D00_9d6b_2D00_3630b2ccaa04-154057-complete/pastedimage1726108126944v3.png[/img],[/size][/font][/align][align=left][font=Arial, Helvetica, sans-serif][size=12px]然后我的具体调用如下,并更换了多种形式,仍然报错,只要把trunc函数换了就不报错了,[/size][/font][/align][align=left][font=Arial, Helvetica, sans-serif][size=12px][img=0,240]https://e2echina.ti.com/resized-image/__size/640x480/__key/communityserver-components-multipleuploadfilemanager/ce4c46aa_2D00_a133_2D00_464f_2D00_9d6b_2D00_3630b2ccaa04-154057-complete/pastedimage1726108235827v4.png[/img][/size][/font][/align][align=left][font=Arial, Helvetica, sans-serif][size=12px]我检查了math.h中是否包含了trunc,确认包含了,[/size][/font][/align][align=left][font=Arial, Helvetica, sans-serif][size=12px][img=0,240]https://e2echina.ti.com/resized-image/__size/640x480/__key/communityserver-components-multipleuploadfilemanager/ce4c46aa_2D00_a133_2D00_464f_2D00_9d6b_2D00_3630b2ccaa04-154057-complete/pastedimage1726108337401v5.png[/img],[/size][/font][/align][align=left][font=Arial, Helvetica, sans-serif][size=12px]然后math.h调用以及文件所在是安装ccs时候默认的,如下:[/size][/font][/align][align=left][font=Arial, Helvetica, sans-serif][size=12px][img=0,240]https://e2echina.ti.com/resized-image/__size/640x480/__key/communityserver-components-multipleuploadfilemanager/ce4c46aa_2D00_a133_2D00_464f_2D00_9d6b_2D00_3630b2ccaa04-154057-complete/pastedimage1726108452046v8.png[/img],[/size][/font][/align][align=left][font=Arial, Helvetica, sans-serif][size=12px]里面包含了math.h,然后我在lib中配置如下:[/size][/font][/align][align=left][font=Arial, Helvetica, sans-serif][size=12px][img=0,240]https://e2echina.ti.com/resized-image/__size/640x480/__key/communityserver-components-multipleuploadfilemanager/ce4c46aa_2D00_a133_2D00_464f_2D00_9d6b_2D00_3630b2ccaa04-154057-complete/pastedimage1726108520352v9.png[/img]。[/size][/font][/align][align=left][font=Arial, Helvetica, sans-serif][size=12px]请教大佬和专业工程师,我这报错,不能编译是什么原因?[/size][/font][/align]
1841浏览量 0回复量 关注量 -
PIC 单片机Linux下C编译环境求助:Linux版本的C编译器下载哪个
目前项目需要在linux下把C编译成hex(适配PIC内核),只需要编译环境,目前自己尝试了下载Linux版本MPLAB IDE加 XC8 C编译器,发现是需要额外安装JRE,使用MPLAB IDE环境才能编译成hex,能否不用IDE环境将C编译成hex,有大佬了解过这块吗
913浏览量 1回复量 关注量