完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
我使用PSOC5 CY8CITK-050 DEV板与PSoCoC造作3.3,不能使用浮点数字。
我做了一个小项目来演示这个问题。我看到了这个设备。h不能找到,并且应该理解它应该自动生成。 我错过了什么? 提前感谢! SimuldCD-FLAAT.BANDEL01.ZIP 1.8兆字节 以上来自于百度翻译 以下为原文 I'm using a PSOC5 CY8CKIT-050 dev board with PSOC creator 3.3 and cannot work with floating point numbers. I made a small project to demonstrate the issue. I see that device.h cannot be found and I understand it should be generated automatically. What am I missing? Thanks in advance!
|
|
相关推荐
10个回答
|
|
|
|
|
|
还将堆设置为CydWr文件中的0x0200。
以上来自于百度翻译 以下为原文 Also set the heap to 0x0200 in the .cydwr file. |
|
|
|
谢谢Bobgar,但是那个例子不起作用。我得到两个错误和一个警告:
生成错误:未定义的引用“ftoA”,未定义的引用“LCDApPRSKY”(我认为应该是LCDA PrimtScript()) 警告:赋值使指针没有整数 打印一个浮子到LCD只是我更大问题的一个简单例子,我不能使用浮标。是否有编译器开关或其他缺少的东西?我的例子,编译和运行,但双浮不显示。在我真正的项目我使用atof()将字符串转换为浮点数,但结果都是0。我只是试着印刷浮发现它不工作,并出现浮不支持。 我认为答案是沿着迪马斯响应这线条:http://www.cypress.com/forum/known-problems-and-solutions/how-can-i-use-function-sprintf-psoc-designerbut我没能想出来。我的目录不包含local.mk所以我创建和addedcodecompressor:= $(codecompressor)- lfpm8c,但它仍然不工作。 以上来自于百度翻译 以下为原文 Thanks bobgoar, but that example doesn't work. I get two errors and one warning: Build errors: undefined reference to 'ftoa', undefined reference to 'LCD_PrString' (should be LCD_PrintString(), I think) Warning: assignment makes pointer from integer without a cast Printing a float to the LCD was just a simple example of my larger problem that I can't use floats. Is there a compiler switch or something else I'm missing? My example compiles and runs, but the float and double are not displayed. In my real project I use atof() to convert a string to float, but the result is always 0. I tried just printing a float and found that it didn't work, and it appears the float is not supported. I think the answer is along the lines of dimas response here: http://www.cypress.com/forum/known-problems-and-solutions/how-can-i-use-function-sprintf-psoc-designer but I haven't been able to figure it out yet. My directory did not contain a local.mk so I created on and added CODECOMPRESSOR:=$(CODECOMPRESSOR) -lfpm8c, but it still doesn't work. |
|
|
|
|
|
|
|
谢谢鲍勃,我疯狂的改变了,仍然没有任何东西…
以上来自于百度翻译 以下为原文 Thanks bobgoar, I mad those changes and still nothing... |
|
|
|
我将尝试你的程序在PSoC 5LP,因为我没有你的设备,这是100针版本。我来看看我得到了什么。
以上来自于百度翻译 以下为原文 I am going to try your program on a PSOC 5lp as I don't have your device which is the 100 pin version. I will see what I get. |
|
|
|
这是你的程序,它运行良好。只需将设备更改为项目中的设备,然后将设备更改为设备选择器。原来你需要0x800堆,因为0x200不够大。享受你的计划。
SimultCDFLUB.BangLe01.Cyrkk.CaseVo01.Zip 664 K 以上来自于百度翻译 以下为原文 Here is your program and it is working fine. Just change the device back to your device in project and then device selector. Turns out that you need 0x800 heap as 0x200 is not big enough. enjoy your program. |
|
|
|
我也改变了LCD端口同意我的设置。你使用了P2(6:0),我用了P2(7:1),这就是我的电路板是如何布线的。
以上来自于百度翻译 以下为原文 I also changed the lcd port to agree with my setup. You used P2(6:0) and I used P2(7:1) as that is how my board is wired . |
|
|
|
|
|
|
|
谢谢您!现在开始工作了。谢谢你抽出时间来帮助我,树立榜样!
以上来自于百度翻译 以下为原文 Thank you! It is working now. Thanks for taking the time to help me and build the example! |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2106 浏览 1 评论
1853 浏览 1 评论
3671 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1788 浏览 6 评论
1536 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
572浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
424浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
438浏览 2评论
386浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
916浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-25 05:31 , Processed in 1.126241 second(s), Total 96, Slave 80 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号