完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
您好,我是新的PIC32,现在我正在迁移一个程序在X86 Linux /C下写入PIC32/XC32/Orth/FielSto.大多数算法代码是可移植的,没有硬件相关的库,因此无需编译. OS相关代码(如p螺纹)使用WARPPER函数来解决.Orthal/FrReToice提供的解决方案。现在面临的问题是:一些代码调用标准C库(它们在X86Linux中使用GCC),例如,包含了UNISTD。h & gt;没有找到XC32报告文件。如果我设置了遗留C选项,可以找到UNITSTD。h & gt;但是其他标准库不在大多数更新的版本中(例如,缺少在时间上定义的。h,我不记得实际的错误)。如何(或什么是最好的解决方案)来解决这个问题?通过编写我自己的函数?从Gcc/GLYBC源复制丢失的文件?在XC32中缺少Internet相关功能(IP/TCP/UDP/Socket),如Int.H/NEtiON/I.H。我知道将MHC排除在它们的一套库中并不是MCHP的错误,但是解决这一问题的最佳做法是什么?Orthor或FrReTOS提供某种TCP/IP栈,但看起来它们不是POSIX(至少我不能简单地更新包含路径来解决这个问题)。如果我在这里设置了遗留C选项,声明冲突就会出现(比如UNITSTD、H和Belkay-Pay.h中的GethOSTNEX冲突定义)。[BangHeal]我是一个有经验的DSPIC33开发者,但不是Linux /PIC32,很抱歉我的糟糕介绍:
以上来自于百度翻译 以下为原文 Hi all, I'm new to PIC32 and now I'm migrating a program written under x86 Linux/C to PIC32/XC32/HARMony/FreeRTOS. Most of the algorithm code are portable, free from hardware related libraries and hence compile without error. OS related code (such as pthread) are resolved using warpper function and solution provided by Harmony/FreeRTOS. Problems now facing are: - some code are calling standard C library (they used gcc in x86Linux), such as #include - Internet related function (IP/TCP/UDP/socket), such as inet.h/netinet/in.h are missing in XC32. I know it is not MCHP's fault to remove them from their set of lib, but what is the best practice to resolve it? Harmony or FreeRTOS providing some kind of TCP/IP stack, but it looks like they are not POSIX (at least I can't simply updating the include path to resolve this). If I set the legacy C option here, declaration conflict comes out (such as conflict define of gethostname in both unistd.h and berkeley_api.h). [banghead] I'm an experienced dsPIC33 developer but not Linux/PIC32, sorry about my bad introductionsad: |
|
相关推荐
6个回答
|
|
“标准”是你参考的C标准吗?你肯定他们失踪了吗?或者它们是你桌面上的常用插件。比如说不够好。确切地说,你认为缺少什么。
以上来自于百度翻译 以下为原文 “Standard” which c standard are you referinf to? Are you positive they are missing. Or they are common add ins from you desk top compiler. For instance is not good enough. Exactly what do you think is missing. |
|
|
|
作为背景,Linux应用程序是使用GCC 4.63.开发的。XC32版本是2.05,和声2.05.01.目前丢失的文件是UNISTD.H。我知道这应该与一些普通的C接口范围之外的移植工作有关,但只是想知道为什么这个头在XC32遗留模式中存在,而不是在非遗留模式中。EXILIBS(sys/Socket,h,TCPI/TCPIP.H)不应该存在于XC32中。但是解决这些问题的通常方式(或最聪明的方法)是什么?通过手动重写函数?通过编写翘曲函数?或者在我可以使用的Hyror/Fielttos/IP栈中有一些类似的LIBS?我对和声和RTOS很陌生,不知道什么是通常的工作流程。有趣的是,当我用和声重新生成代码时,报告了H或其他基本的.H文件遗失。我必须重新启动MPLAB并再次生成代码以解决它。
以上来自于百度翻译 以下为原文 As a background, the linux app is developed using gcc 4.6.3. The XC32 version is 2.05, Harmony 2.05.01. At the moment the missing file is unistd.h. I know this should be related to some porting work that is out of the common C interface scope, but just wonder why this header exist in XC32 legacy mode but not in non-legacy mode. On the other hand, some higher level libs (sys/socket.h, tcpip/tcpip.h) are supposed not to be exist in XC32. But what is the usual way (or smartest way) to resolve them? By manually rewrite the function? By writing warpper function? Or even there was some similar libs in Harmony/FreeRTOS/IP stacks I can use? I'm so new to Harmony and RTOS and have no idea about what is the usual workflow. It is also funny that time.h or other basic .h files are reported to be missing after I re-generate the code using Harmony. I have to reboot the MPLAB and generate the code again to make it resolved. |
|
|
|
XC32是基于GCC的。如果和声不包括你需要的标题。Freertos是PIC32和XC32的端口。这是一个独立的问题。Linux是一个完整的操作系统。你不能指望像插座和时间这样的工作。您需要将RTC连接到完整功能的时间库。和谐将提供伯克利套接字,但不具备Linux的所有特性。如果你有一个完整的独立的Linux程序可能不只是下降。嵌入式C端口较小。
以上来自于百度翻译 以下为原文 Xc32 is based on GCC. If Harmony does not include the headers you need to. Freertos is a port for PIC32 and Xc32. It is a seperate issue. Linux is a full os. You can not expect things like sockets and time to just work. You need to connect your rtc to the time library for full functionality. Harmony will give you Berkeley sockets, but not with all the features of Linux. If you have a full stand alone Linux program may not just drop in. Embedded C ports are smaller. |
|
|
|
谢谢你的信息。看来我低估了移植的工作量。
以上来自于百度翻译 以下为原文 Thanks for your info. It seems that I've underestimated the workload on porting. |
|
|
|
有一个Linux端口在PIC32 MZ…
以上来自于百度翻译 以下为原文 There is kicking around somewhere a Linux port for the PIC32 MZ..DA. |
|
|
|
我在DDA的DePaBoD游戏,真的令人印象深刻。只是我们正在努力使用ARM+Linux的规格,这有更多的支持和产品可供选择。无论如何,我们将尝试PIC32 + FreRTOS,然后DA+Linux,最后ARM+Linux。
以上来自于百度翻译 以下为原文 I've played around the devbaord of DA, really impressive. Just we are struggling to use ARM+Linux for that spec, which have more support and product to choose from. Anyway we will try the PIC32+FreeRTOS then DA+Linux and finally ARM+Linux. |
|
|
|
只有小组成员才能发言,加入小组>>
5188 浏览 9 评论
2009 浏览 8 评论
1933 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3181 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2232 浏览 5 评论
743浏览 1评论
629浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
512浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
641浏览 0评论
538浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-29 11:10 , Processed in 1.506548 second(s), Total 88, Slave 72 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号