完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我使用的是MLAYV2017Y03Y06中的图形库,XC16V1.21。我已经定义了GFXOFixFixFixPrimeSpuleSuelEngl和GFxObjultFunthPaskdIn启用,以便字体被打包以使用程序存储器的所有24位。如果字符位图驻留在地址0x02的内存中,则一些像素数据被读取损坏。在gfxtTeTracRunDead()中,“pPARAM-& gt;pCHIMAGE”用于从闪存读取字符位图。当使用“pPARAM-& gt;pCHIMAGE”时,从地址0x1FFFF读取的数据似乎已损坏。0x1FFFF之前和之后的数据看起来很好。它被读取为“TEMP= *(pPARAM-&G.PCHIMAGE)++”;“GFxPrimtual.C中的逻辑行”。它是这个内存的“PCCHIMAGE”指针,它似乎被误读。程序存储器本身似乎有正确的(位图)数据,而我有VIRF。IED既有“程序存储器”窗口,也在做BuffTynTBRRD读数。相关代码片段定义……gfx.CONTFION fOntPrOpjSpuleEx使能定义GFX配置文件fOntPACKEDIN使能定义GFX配置文件IMAGEIX PACKEDIN使能IFDEF GFX配置文件fOntPrimeSpuleSee使能IFNDEF文件PIC32 MXXFIIgfFuntPaskdIn使γ定义了gfxf-fOntSythyApPrimeSuxy[Suffy]空间,定义了gfxf-fOnthSuffy.PoxUpPixByth-yEngf.Eclif定义GfxfFunth-FieldSconf[Endof]空间,定义了GFxfFunth-Stand const。
以上来自于百度翻译 以下为原文 I am using the graphics library within MLA_v2017_03_06, with XC16 v1.21. I have defined both GFX_CONFIG_FONT_PROG_SPACE_ENABLE and GFX_CONFIG_FONT_PACKED_ENABLE, so that the fonts are packed to use all 24bits of program memory. If a character bitmap resides in memory across address 0x20000, some of the pixel data is read in corrupt. Within GFX_TextCharRender(), "pParam->pChImage" is used to read character bitmap from flash memory. When using "pParam->pChImage", it appears that the data read from address 0x1FFFF is corrupt. The data before and after 0x1FFFF seems fine. It is read in corrupt for the 'temp = *(pParam->pChImage)++;' line of logic within gfx_primative.c. It is the 'pChImage' pointer to this memory that seems to misread. The program memory itself appears to have the correct (bitmap) data, and I have verified with both the 'program memory' window, and also when doing builtin_tblrd reads. relative code snippets... #define GFX_CONFIG_FONT_PROG_SPACE_ENABLE #define GFX_CONFIG_FONT_PACKED_ENABLE #define GFX_CONFIG_IMAGE_PACKED_ENABLE #ifdef GFX_CONFIG_FONT_PROG_SPACE_ENABLE #ifndef __PIC32MX__ #ifndef GFX_CONFIG_FONT_PACKED_ENABLE #define GFX_FONT_SPACE __prog__ #else #define GFX_FONT_SPACE __pack_upper_byte #endif #else #define GFX_FONT_SPACE const #endif #else #define GFX_FONT_SPACE const #endif GFX_FONT_SPACE uint8_t *pChImage; // pointer to the bitmap of the character |
|
相关推荐
3个回答
|
|
此外,我有问题排查,因为(根据Microchip DOCS),你不能把一个指针投到24位Flash数据,并且监视窗口不能正确地监视一个(μ-PyxPuxPixByl Char *)指针。我的问题是,在排除这个代码时,这个位置的数据会改变。由于添加了移除的故障排除代码,生成了租金。由于需要对打包的数据进行管理,而不知道如何确保在0x1FFFF x2000上放置所需的结构。是否有一种方法来声明一个位于0x1FFF0的固定程序存储器地址的μ-包-UpPull字节char数组,以及大到足以通过地址0x2001?属性数据(64)[{0]、1,2、3、4、5、13、14、15、16、17、18、19、20、21、22、23、24、25、28、29、30、31、32、33、34、35、36、37、38、39、40、41、42、43、44、45、48、49、50、51、52、53、54、55、56、57、58、59、60、61我尝试了下面的方法,但是不能使它建立起来。62.63};
以上来自于百度翻译 以下为原文 Also, I am having issues troubleshooting, since (according to microchip docs) you cannot cast a pointer to 24bit flash data, and the watch window cannot properly monitor a (__pack_upper_byte char *) pointer. My problem is that in troubleshooting this code, the data at this location changes for different builds, due to the addremoved troubleshooting code. Due to the requirement of the __pack_upper_byte pointer to manage accessing the packed data, and not knowing how to ensure the required struct is placed across 0x1FFFF x20000. Is there a way to declare a __pack_upper_byte char array, that is located at a fixed program memory address of 0x1FFF0, and is large enough to go through to address 0x20010? I tried the following, but could not get it to build. GFX_FONT_SPACE char __attribute__(address(0x1FFF0))) dataDebug[64] = { 0,1,2,3,4,5,6,7,8,9, 10,11,12,13,14,15,16,17,18,19, 20,21,22,23,24,25,26,27,28,29, 30,31,32,33,34,35,36,37,38,39, 40,41,42,43,44,45,46,47,48,49, 50,51,52,53,54,55,56,57,58,59, 60,61,62,63 }; |
|
|
|
您的代码在后面的括号中有错误的编号,我不能帮助您其余的。
以上来自于百度翻译 以下为原文 Your code here has the wrong number of opening brackets after __attribute__. I can't help you with the rest. |
|
|
|
谢谢,我同意开括号。这是一个在论坛上的打印错误,它是在实际的源代码中设置的。
以上来自于百度翻译 以下为原文 Thanks, I agree with the opening brackets. it was a typo here on forum, and it is setup as follows in the actual source. GFX_FONT_SPACE char __attribute__((address(0x1FFF0))) dataDebug[64] |
|
|
|
只有小组成员才能发言,加入小组>>
5203 浏览 9 评论
2016 浏览 8 评论
1942 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3188 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2243 浏览 5 评论
754浏览 1评论
641浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
549浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
653浏览 0评论
553浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-5 07:25 , Processed in 1.017906 second(s), Total 52, Slave 46 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号