完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
可能与HTTP://www. MyCHIP.COM/FUMUS/M1025615ASPX在从V1.26到1.33更新XC16编译器之后,我再次被一个新的EDS寻址错误咬了:在EDS内存页中存在的数组元素的加法(GT;0)在运行时动态索引时计算不正确。有趣的是,错误计算EDS的另一个bug在静态地索引时似乎已经被固定在V1.33中,这导致这个小的测试程序在V1.26和V1.33中失败,原因是不同的:在我把这个文件编EDS地址问题译成编译器bug之前,有人能复制这个行为吗?或者我的EDS数组声明有什么问题?最佳regardsStephan Messlinger
以上来自于百度翻译 以下为原文 May be related to http://www.microchip.com/forums/m1025615.aspx After updating our XC16 compiler from v1.26 to 1.33, I have once again got bitten by a new EDS addressing bug: Adresses of array elements residing in EDS memory pages >0 are calculated incorrectly when indexed dynamically at runtime. Funnily, another bug that miscalculated EDS addresses when indexed statically seems to have been fixed in v1.33, which leads to this small test program to fail in both v1.26 and v1.33 for different reasons: // Compile with -mlarge-data -menable-large-arrays -O0 #include #include #include __eds__ int16_t data[ 40000UL ] __attribute__ ((eds)) = {0}; int16_t test_eds(void) { size_t i = 19000UL; data = 1; // v1.26: ok, v1.33: writes to page 0 return data[1900UL]; // v1.33: ok, v1.26: reads from page 0 } int main(void) { int16_t expected = test_eds(); assert(expected); return 0; } Could anyone please reproduce this behavior, before I file this as a compiler bug? Or is there something wrong with my EDS array declaration? Best regards Stephan Messlinger |
|
相关推荐
1个回答
|
|
我想我也有同样的问题。它是编译器相关的,从1.32到1.33的步骤和索引到一个大数组中。在1.32 b和更早的时候使用真正的ICE Work调试这个代码(在PIC24FJ256GB210上),但是在1.33中失败:*定义Fuffsiz 0x10000μEDSS*无符号char循环缓冲器[Buffsiz ] yAtditTeX((空间(EDS)))In main(空){循环缓冲器[5 ]=0x11;/Works索引5更新循环缓冲器[0x800 5]=0x22;/Works索引0x800 5已更新未签名int INUI= 0x800 5;循环缓冲器[UI ]=0x33;//不工作,索引5更新,不是0x800 5。我将马上打开一张票。直到进一步,我将坚持1.32
以上来自于百度翻译 以下为原文 I think I have the same problem. It is compiler related, the step from 1.32b to 1.33 and has to do with indexing into a large array. Debugging this code (on a PIC24FJ256GB210) using Real-ice works in 1.32b and earlier, but fails in 1.33: #define BUFFSIZ 0x10000 __eds__ unsigned char CircularBuffer[BUFFSIZ] __attribute__((space(eds))); int main(void) { CircularBuffer[5] = 0x11; //Works index 5 is updated CircularBuffer[0x8005] = 0x22; //Works index 0x8005 is updated unsigned int ui = 0x8005; CircularBuffer[ui] = 0x33; //Does not work, index 5 is updated, NOT 0x8005. I am going to open a ticket shortly. Until further, I am going to stick with 1.32b |
|
|
|
只有小组成员才能发言,加入小组>>
5243 浏览 9 评论
2035 浏览 8 评论
1955 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3208 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2258 浏览 5 评论
779浏览 1评论
672浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
598浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
680浏览 0评论
579浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-24 20:15 , Processed in 1.550467 second(s), Total 78, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号