完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛扫一扫,分享给好友
|
对于RAM,它是通过在某个地址启动UDATA部分,然后使用RES保留位置来完成的。我理解这些变量将是只读的,不关心这一点。我只希望能够在闪存中看到我保存的配置文件中变量的名称,以显示在Valalbe窗口中,所以我不需要用程序内存视图来追踪它。
以上来自于百度翻译 以下为原文 For RAM, it,'s done by starting udata section at some address and then using res to reserve locations. I want to do the same within the FLASH. I understad that such variables would be read-only and don't care about that. I just want to be able to see the name of the variable in my saved profile in the flash to show up in varalbes window so I don't have tho chase it out with Program Memory view... |
|
相关推荐
14个回答
|
|
|
RAM和Flash是PIC芯片中的不同内存总线。关于HTTPS://E.WiKiTo.Ac/WiKi/HavaDr.StudioStudio的读取将永远不会出现在变量窗口中,因为它不能以相同的方式访问。
以上来自于百度翻译 以下为原文 Won't happen. RAM and FLASH are different memory busses in a PIC chip. Read about https://en.wikipedia.org/wiki/Harvard_architecture So FLASH will never show up in the variables Window, as it cannot be accessed the same way. |
|
|
|
|
|
你可以通过FSR0/1访问它,这很好。因为我通过一个被命名的偏移量做了很多索引的寻址(像MOVIW的某个VaR [fSR0]),它可以很好地将它看作一个VAR,无论是在Flash还是RAM中,所以我不必通过各种内存窗口来播放什么。
以上来自于百度翻译 以下为原文 You can access it through FSR0/1 just fine. Since I do much of indexed addressing through an named offset ( like moviw SOME_VAR[FSR0] ), it would be nice to be able to see it as a var, be it in FLASH or RAM, so I dont have to play what's what in through various memory windows... |
|
|
|
|
|
我似乎记得在MPLAB8的监视窗口中看到一个变量名旁边的“P”,例如在C.中的const变量,因此,理论上,它也可以用于汇编;也就是说,如果工具用指令来支持它。;)
以上来自于百度翻译 以下为原文 I seem to remember seeing "P" next to a variable name in the Watch window of MPLAB8, such as for a const variable in C. So, theoretically, it can work for assembly too; that is, if the tools support it with a directive. ;) |
|
|
|
|
|
如果它是一个“增强”的16位部分(尽管你只访问每14个比特的下8个),则可以在标准的中值部分上工作。你从来没有提到你使用的是什么“PIC16F”部分,这是他们提供的机制,允许你访问单独的总线。但这并不意味着它们的变量监视窗口会支持相同的寻址。:)
以上来自于百度翻译 以下为原文 You can if it's an "enhanced" 16 bit part (although you're only accessing the lower 8 of each 14 bits). Doesn't work on standard midrange parts. You never mentioned which "PIC16F" parts you're using. That is the mechanism they supply to allow you to access the separate bus. Doesn't mean their variable watch window will support the same addressing though. Suggest it to Microchip. :) |
|
|
|
|
|
如果他们给我们提供了一个HW机制来减轻恐怖建筑的影响,他们应该在IDE方面做些事情,使我们能够正确地使用它。即使没有它,也应该有一种方法来标记闪存位置作为VAR,让用户担心如何访问它。考虑到我以前所有建议的命运,在这个问题上保持沉默可能会得到更好的结果:O)
以上来自于百度翻译 以下为原文 Well if they supplied us with a HW mechanism to ease working with horrible architecture, they should have done something on IDE side to enable us to use it properly. And even without it, there should have been a way to mark a FLASH location as a var and let user worry how to access it. Given the fate of all of my previous suggestions, staying mum on this one might end up with better result :o) |
|
|
|
|
|
我对你为什么要这么做有点困惑。这似乎是一件非常奇怪的事情。我看到了一些可能性:你在闪存中放置了一些常量,并且由于我不完全清楚的原因,你不知道它是什么……你正在给闪存写一些值,想在调试器中看到它。刷新一个“镜像”变量,它在启动时被读取(因此在RAM中镜像)?在第二种情况下,RAM中没有一个已经具有这个值的值吗?我唯一能想象的是,如果Flash数据是某种内存数组,那么它可能就不适合在可用RAM中。在这种情况下,您可能需要在策略点添加一些调试代码,以便将Flash中的值复制到RAM中,这样您就可以监视它。当然,您可以随时卸载程序内存窗口,并将其放置在显示内存的位置……但也许我完全不理解什么。你需要。
以上来自于百度翻译 以下为原文 I'm a bit confused as to why you'd want to do this. It seems to be a pretty odd thing to need. There are a few possibilities I see:
And of course you could always just undock the program memory window and leave it with the location of your memory showing... But perhaps I don't understand fully what you need. |
|
|
|
|
|
我需要一些工具来显示当前FSR0/1所指向的东西,我需要“Flash”中的“常数”变量在窗口“变量”中显示。因此,当我在Flash中的某个表中有7字节结构的共有序列时,我需要一种快速告诉我HITTI的方法。现在,我有一个标签,我用FSR0和一组定义的偏移钉钉住。在RAM,我可以通过宣布这个地方为UDATA来帮助自己,然后把这些斑点保留在一堆标签下面。这样,至少我可以得到一堆标签,我可以列出,我可以收集。Idf0显示出与给定变量相同的内容。对于存储在Flash中的结构,似乎没有这样的机制。是的,我可以打开程序窗口,但是手动搜索每个窗口都是不可用的。
以上来自于百度翻译 以下为原文 I'd need some tool that would show me what is being pointed to by FSR0/1 currently and I'd need the way for "constant" variables in FLASH to be shown in window "variables". So when I have cosnequtive series of 7 byte structures in a table somewhere in FLASH, I'd need a way to quickly tell I am hitting them at the right spot. As it is now, I have a label that I nail with FSR0 and a bunch of #defined offsets. In RAM, i can help myself by declaring the place as an udata and then REServing the spots under the bunch of labels. That way, at least I get a bunch of labels that I can list and I can glean that the INDF0 is showing the same content as a given variable. For structures, stored in FLASH, there seem to be no such mechanism. Yes, I can open the program window, but manually searching through it for every single accesss is unuseable. |
|
|
|
|
|
Microchip的C编译器似乎能够提供关于数据结构的调试信息,但是,我不知道微芯片汇编器的任何汇编语言语法,允许开发人员做同样的事情。这就是你正在寻找的吗?
以上来自于百度翻译 以下为原文 The Microchip 'C' compilers seem able to provide debug information about data structures but, I am not aware of any assembly language syntax for the Microchip assembler that allows the developer to do the same thing. Is this what you are looking for? |
|
|
|
|
|
在MPLAB8中,您可以通过右键单击监视窗口,并选择Add,将程序闪存地址添加到监视窗口。添加“监视窗口”,检查程序内存并输入起始地址和结束地址,然后单击“添加地址”。
以上来自于百度翻译 以下为原文 In MPLAB8, you can add program flash memory addresses to the Watch window by right-clicking in the Watch window and select Add. Add Watch window appears, check Program memory and enter the Start and End addresses, and click Add Address. |
|
|
|
|
|
部分。另一部分是Flash中数据结构的相同信息。
以上来自于百度翻译 以下为原文 Partly. Other part is the same info for data structures in flash. |
|
|
|
|
|
MPLABX提供了全球变量和SFRS。没有“程序存储器”的选择。
以上来自于百度翻译 以下为原文 MPLABX offers just global variables and SFRs. There is no "Program memory" choice. |
|
|
|
|
|
对于MPLABX,右键单击表或变量窗口并选择新表。出现一个新的监视窗口,以十六进制格式(例如0x1234)输入程序快闪存储器的地址,然后单击OK。&编辑;& Gt;如果地址值在数据存储器的范围内,这将不起作用。(必须有一种方式来指示它是程序内存地址。!
以上来自于百度翻译 以下为原文 For MPLABX, right-click in the Watches or Variables window and select New Watch. A New Watch window appears, enter the address of the program flash memory in hex format (e.g. 0x1234) and click OK. |
|
|
|
|
|
通常,调试器不能在调试会话期间访问闪存。对于一些新的、高端的设备,这类规则也有例外,与高端调试器(如真正的ICE)一起使用。(这就是为什么人们问你正在使用的巫术设备。)通常你必须停止(停止,不停止)调试会话,并执行设备的手动读取来检查程序存储器。你总是可以提起程序存储器窗口(Windows & GT;PIC存储器视图-GT;程序存储器)。但这只会告诉你什么是程序化的闪光工具。换句话说,如果你的程序正通过车载外设主动地写入Flash,那么程序内存窗口就不会向你展示这些新的运行时值。如果您的程序正在写入Flash,您将不得不停止调试会话,并且手动执行Flash存储器读取以更新MPLAB X中的程序存储器窗口。更重要的是时间安排。
以上来自于百度翻译 以下为原文 In general the debugger cannot access flash memory during a debug session. There are exceptions to this rule for some newer, higher end, devices, used with higher end debuggers (like Real ICE). (This is why folks asked you witch device you were using.) Normally you will have to stop (stop, not halt) the debug session and perform a manual read of the device to examine program memory. You can always bring up the Program Memory window (Windows-> PIC Memory Views -> Program Memory). But this will only show you what was programmed into flash by the tool. In other words, if your program is actively writing to flash via the on-board peripherals, then the Program Memory window won't show you these new run-time values. If your program is writing to flash, you'll have to stop the debug session, and manually perform a flash memory read to update the Program Memory window in MPLAB X. It's not so much the Harvard architecture that matters as the fact that flash and RAM are accessed in completely different manners (and, more importantly, timings). |
|
|
|
|
|
原始的海报没有详细说明为什么调试器需要显示在汇编语言程序的代码空间中声明的数据对象。OP已经表示要检查代码是否访问了正确的地址。在PIC16系列的部件中,有两种或三种不同的方法来从代码空间中检索常数数据。首先,RESLW 0XX方法,第二次使用EEADRH:EEADRL从代码空间读取指令字,第三在增强PIC16上,使用FSRX寄存器读取指令字的低8位,使用地址范围0x8000到0xFFFF,映射到从0x000到0x7FFF的代码空间地址。EMS感兴趣的是如何在PIC16汇编语言源代码文件中声明结构化数据。我不知道MasPMWWEN语法需要什么来定义等价的“C”结构。你知道这种语法在汇编程序中是否可用?
以上来自于百度翻译 以下为原文 The Original Poster has not described in detail why there is a need for the debugger to show data objects declared in code space of an assembly language program. The OP has said it is to check that the code is accessing the correct address. Within the PIC16 family of parts there are two or three different methods to retrieve constant data from code space. First, the RETLW 0xx method, second using EEADRH:EEADRL to read instruction words from code space, third, on enhanced PIC16, using the FSRx register to read the low 8-bits of an instruction word using the address range 0x8000 to 0xFFFF that maps to code space address from 0x0000 to 0x7FFF. The OP seems interested in how to declare structured data in a PIC16 assembly language source code file. I do not know what the MPASMWIN syntax is required to define the equivalent of a 'C' structure. Do you know if this kind of syntax is available in the assembler? |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473 浏览 0 评论
5793 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1122浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1095浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
873浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 00:05 , Processed in 0.876411 second(s), Total 100, Slave 83 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
3788