完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
亲爱的成员,我不能建立我的PIC32项目,因为很多链接错误,比如“不能分配区段…”。我在MPLAB X IDE中创建了一个新项目,并选择了我的设备PIC32 MX230F064 B和编译器XC32 V1.40。然后,我复制并添加了一个更老的PIC24项目的源文件(.c和h)。在源代码中进行了几个修改(PIC24-&GP32)之后,我能够编译这个项目,但是构建最终失败了,如下所示的错误。由于内存管理应该自动设置,我不知道问题在哪里,或者我应该在哪里配置内存范围。请你帮帮我好吗?请参阅附件中的完整输出:
以上来自于百度翻译 以下为原文 Dear members, I cannot build my PIC32 project because of a lot of linker errors like "Could not allocate section...". I created a new project in the MPLAB X IDE and selected my device PIC32MX230F064B and the compiler xc32 V1.40. Then I copied and added the source files (.c and .h) of an older PIC24 project. After several adaptions (PIC24 -> PIC32) at the sources, I was able to compile the project but the build finally failes with the errors shown below. As the memory management should have been set automatically, I don't know where's the problem or where I should additionally configure memory ranges. Could you please help me? See complete output in the attached file: Attachment(s) output.txt (10.10 KB) - downloaded 115 times |
|
相关推荐
8个回答
|
|
您可能只是快用完了Flash。MIPS32代码比大多数8位或16位内核使用更多的空间。作为急救,使优化(甚至O1可以帮助很多)。如果您购买了编译器许可证,您还可以启用MIPS16e指令集,它更紧凑,但会牺牲一些性能。如果这没有帮助,你将不得不切换到一个更大的设备。
以上来自于百度翻译 以下为原文 You may simply be running out of flash. MIPS32 code uses more space than most 8- or 16-bit cores. As a first aid, enable optimizations (even -O1 can help a lot). If you have bought a compiler license, you can also enable the MIPS16e instruction set, which is more compact at the expense of some performance. If that doesn't help, you'll have to switch to a bigger device. |
|
|
|
谢谢你的快速回复!不幸的是,优化-我试过'所有-没有帮助或改变任何东西。我甚至试图减少密集数组大小在我的代码全部为1。没有效果。还有其他建议吗?
以上来自于百度翻译 以下为原文 Thanks for your quick reply! Unfortunately the optimization - I tried 'em all - didn't help or change anything. I even tried to reduce intense array sizes in my code all to 1. No effect. Any other suggestions? |
|
|
|
问题是Flash,不是RAM。试着更改项目中的设备,看看它是否改变了什么。
以上来自于百度翻译 以下为原文 The problem is flash, not RAM. Try changing the device in the project and see if that changes anything. |
|
|
|
由于您的内存(闪存)需求不清楚(以及您是否可以移除其他限制),所以很难推荐。正如andersm建议的,您必须首先在项目中更改设备,并查看问题是否(以及何时)得到解决。因此,您可以逐步接近所需的闪存量。(例如PIC32 MX150 F128B,PIC32 MX130F256B……)您的DS600 01168J FRM文档包含一个很好的表2列出可能的类型。因此,如果你有一个PIC32 MX230F064 B,检查28针和更多闪存的类型。
以上来自于百度翻译 以下为原文 Since your memory (flash) requirements are not clear (and whether you could remove the limitation otherwise), it is not easy to recommend. As andersm suggested you must first change the device in your project and see whether (and when) the problem is resolved. You thus can approach the required amount of flash memory step by step. (e.g. PIC32MX150F128B, PIC32MX130F256B ... ) Your DS60001168J FRM document contains a nice Table 2 listing possible types. So if you have a PIC32MX230F064B, check for the types with 28 pins and more flash memory. |
|
|
|
老芯片与这个芯片相比有多少?请注意,PIC24上的“int”是2字节。它在PIC32上是4。如果在代码中使用int,那么这些项将是大小的两倍。
以上来自于百度翻译 以下为原文 How much ram did the old chip have compared to this one? Note that "int" on a pic24 is 2 bytes. It is 4 on a pic32. If you used int in the code then those items will be double the size. |
|
|
|
你对“兼容”的定义是什么?正如前面提到的,它是一个完全不同的核心和编译器,“int”变量的大小加倍只是您必须考虑如何处理的一个差异。
以上来自于百度翻译 以下为原文 What's your definition of "compatible"? As just mentioned, it's a totally different core and compiler. "int" variables doubling in size is just one difference you have to consider how to handle. |
|
|
|
PIC32 MX230F256B是该系列中最大的,所以从那里开始。你还想修复这个警告:
以上来自于百度翻译 以下为原文 The PIC32MX230F256B is the largest of that series, so start there. You'll also want to fix this warning: uart.c:53:1: warning: 'auto_psv' attribute directive ignored [-Wattributes] void __attribute__((interrupt, auto_psv)) _U1RXInterrupt(void) { |
|
|
|
亲爱的安德烈姆,罗迪姆斯,NKurzman和QHB,你绝对正确!有了配置好的设备PIC32MX230F256B,我就可以构建我的项目了。现在,内存仪表板显示:Data 16384(0x4000)bytesData Used:42,9%Data Used:7032(0x1B78)Free:9352(0x488)Program 263312(0x40490)bytesProgram Used:51,6%Program Used:135848(0x212A8)Free:127464(0x1F1E8)RDER和使用这个可爱的设备现在为我的项目:-非常感谢你的帮助!
以上来自于百度翻译 以下为原文 Dear andersm, rodims, NKurzman and qhb, you were absolutely right! With the configurated device PIC32MX230F256B I could build my project. Now the dashboard for memory says: Data 16384 (0x4000) bytes Data Used: 42,9% Data Used: 7032 (0x1B78) Free: 9352 (0x2488) Program 263312 (0x40490) bytes Program Used: 51,6% Program Used: 135848 (0x212A8) Free: 127464 (0x1F1E8) I will order and use this lovely device now for my project :-) Thank you very much for your help! |
|
|
|
只有小组成员才能发言,加入小组>>
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)不匹配。是什么原因
642浏览 0评论
538浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-29 15:26 , Processed in 1.443607 second(s), Total 94, Slave 75 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号