完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,
不幸的是,当一个函数被声明为reeantrant(与cyreentrant)是不可能看局部变量时调试。有什么魔术能让你更深入地了解这一点吗? 问候,鲍伯 以上来自于百度翻译 以下为原文 Hi, unfortunately when a function is declared as reeantrant (with CYREENTRANT) it is not possible to watch local variables when debugging. Is there a magic trick to get some more insight into that? Regards, Bob |
|
相关推荐
8个回答
|
|
嗨,鲍伯,
我们将调查这个问题。 当这个问题出现时,你正在使用PSoC 3还是PSoC 5? 如果PSoC 5,您使用KEIL UVIEW还是创建者集成调试器? 这将是一个很好的信息。 罗伯特 以上来自于百度翻译 以下为原文 Hi Bob, we are going to investigate this issue. Were you working with a PSoC 3 or a PSoC 5 when this problem showed up? If PSoC 5, did you use the Keil uVision or the Creator integrated debugger? This would be good information to have. Robert |
|
|
|
我使用了一个PSOC3部分,一个KIT01和KEIL编译器。在接下来的几天里,我不能切换到PSoC5部分进行测试。
问候,鲍伯 以上来自于百度翻译 以下为原文 I used a PSoC3 part wit a Kit001and the Keil-compiler. I cannot switch to a PSoC5 part to test in the next few days. Regards, Bob |
|
|
|
我必须相信这是一个PSoC 3的问题- 8051栈体系结构需要重新进入选项。让我们知道,如果你看到同样的事情在PSoC 5 -我以前错了!!!!
你有哪些编译器优化?我使用2级的大小,它工作正常。 是否使用本地窗口或将本地添加到监视窗口?你有没有像“LOC”这个名字在当前上下文中不存在的信息? -马克 以上来自于百度翻译 以下为原文 I have to believe this is a PSoC 3 issue - the 8051 stack architecture creates the need for the REENTRANT option. Do let us know if you see the same thing on PSoC 5 - I have been wrong before!!! What compiler optimizations do you have? I am using level 2 for size and it works OK. Are you using the Locals window or adding your local to the Watch window? Do you get a message like "The name 'loc' does not exist in the current context"? - Mark |
|
|
|
使用Keil 9、03优化级别0(0)(调试期间)
我使用了本地窗口,当我没有看到任何VARS时,我试图添加一个表,但是我点击的名字不允许我记住一个WHECT-VAL.NoRebug消息。假设您在使用可重入代码时,8051的体系结构是正确的,但是我确实需要它来进行RTOS。PSoC 3。本周没有时间用PSoC 5测试它,抱歉。 问候,鲍伯 以上来自于百度翻译 以下为原文 Using Keil 9,03 Optimization Level 0 (zero) (during Debug) I used the locals window and when I didn't see any vars, I tried to add a watch, but the name I clicked right on didn't allow for a watch-var. No error-messages as far as I remember. Presumably you are right with the architecture of the 8051 when using reentrant code, but I do need it for a RTOS for PSoC 3. No time this week to test it with a PSoC 5, sorry. Regards, Bob |
|
|
|
我并不是要暗示在8051上写可重入代码有什么不对。关于你是PSoC 3还是5,有一点困惑。我只是说我以为你在PSoC 3上。
这背后的问题是8051个小的堆栈大小,如果你以这样的方式传递参数(也就是正常的C方式),那么它很快就会耗尽空间。为了避免堆栈溢出,KEIL编译器假定函数不重命名,并为它们分配静态地址。这是罚款和花花公子,非常聪明,大部分时间,但如果你的函数从ISR调用,因为当你在那个函数的时候ISR发生火灾时,变量会被破坏。 一种解决方案是改变处理所有函数的方式,但这是一个大的RAM开销。CyrEnter关键字打开那些只使用它的函数的重新排序。无论如何,你可能知道所有这些,只是想弄清楚调试器的功能是什么。! 它是什么样的变量?一个简单的int或结构?你声明它不稳定吗?你能观察或看到当地人的其他变量吗?我试过了,没有问题,我只是在寻找线索。 -马克 以上来自于百度翻译 以下为原文 I didn't mean to imply there was anything wrong with writing reentrant code on an 8051. There was just a little confusion as to whether you were on a PSoC 3 or a 5. I was just saying that I thought you were on a PSoC 3. The issue behind this is the small stack size on the 8051 which runs out of space quickly if you pass parameters that way (i.e. the normal C way). To avoid stack overflow the Keil compiler assumes functions are not reantrant and allocates static addresses for them. This is fine and dandy, and quite clever, most of the time but fails badly if your function gets called from ISRs because the variables get corrupted when the ISR fires while you were in that function. One solution is to change the way all functions are handled but that is a big RAM cost. The CYREENTRANT keyword turns on reentrancy for those functions that use it only. Anyway, you probably know all that and just want to figure out what the debugger is up to... ! What kind of variable is it? A simple int or a struct or whatever? Have you declared it volatile? Can you watch, or see in locals, other variables? I tried this out and had no problems - I am just looking for clues as to what is going on. - Mark |
|
|
|
这是埃弗里有趣的一点:你说在PoSo3设备的设计师2中显示本地的VARS在可重入的功能中,而不是为我工作。我必须发布一个演示项目。等一下,等一下,我马上就回来。
鲍勃 以上来自于百度翻译 以下为原文 That is a VERY interesting one: you say showing local vars in reentrant functions under Designer 2.0 for PSoC3 devices work for you - and not for me. I'll have to post a demo - project. Hold on, stay tuned, I'll be back right after the break Bob |
|
|
|
这里是:在“函数()”中设置断点并查看本地人。
你和我看到的一样:坚果 鲍勃 设计01.CyWrk.SaveV01.Zip 198.4 K 以上来自于百度翻译 以下为原文 Here we are: set a breakpoint in "Function()" and look at the locals. Hop you see the same as I do: nuts Bob
|
|
|
|
我认为我们有缺陷。我尝试了几种不同的方法来调试调试器来显示本地人,但使用CyrccCnter似乎阻止了他们的出现。我可以看到函数参数,但不能看到局部变量。你发送了一个很简单的例子,我的第一个想法是变量被优化了…但即使当地人是绝对需要的,这种情况也会发生。
我已经创建了一个内部案例来解决这个问题。如果您需要/想要得到通知,当它被固定时,请打开一个技术支持案例,并将您的联系人联系到“CDT 118339”。 --马克。 以上来自于百度翻译 以下为原文 I think we have a defect. I tried a few different ways of tricking the debugger into showing me the locals but the use of CYREENTRANT seems to prevent them from showing up. I can see function arguments, but not locals. You sent a really simple example and my first thought was that the variables were getting optimized out... but it happens even when the locals are absolutely needed. I have created an internal case to get this addressed. If you need/want to get notification when it is fixed please open a tech support case and refer your contact to "CDT 118339". -- Mark. |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2105 浏览 1 评论
1851 浏览 1 评论
3669 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1786 浏览 6 评论
1536 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
568浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
422浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
437浏览 2评论
383浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
915浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 04:22 , Processed in 1.195673 second(s), Total 90, Slave 74 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号