搜索
bottom↓
回复: 12

IAR运行ucos堆栈警告单程序正常运行求解!!

[复制链接]

出0入0汤圆

发表于 2009-7-12 10:36:24 | 显示全部楼层 |阅读模式
Sat Jul 12 10:23:19 2008: The stack pointer for stack 'CStack' (currently DATA:0x0004B7) is outside the stack range (DATA:0x000100 to DATA:0x000160)
Sat Jul 12 10:23:19 2008: The stack pointer for stack 'RStack' (currently DATA:0x000484) is outside the stack range (DATA:0x000160 to DATA:0x0001D8)
这是我在JTAG仿真后IAR出现的警告!
单程序时正常运行!观察窗口看堆栈也没什么问题!
我想是不是运行UCOS时的堆栈和ATMEAG128的实际堆栈放的位置是不一样造成啊?

阿莫论坛20周年了!感谢大家的支持与爱护!!

曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……

出0入0汤圆

发表于 2009-7-12 15:24:20 | 显示全部楼层
应该是设置出的问题吧

出0入0汤圆

 楼主| 发表于 2009-7-12 15:44:52 | 显示全部楼层
不应该吧
程序运行5个小时了还正常

出0入0汤圆

 楼主| 发表于 2009-7-12 16:36:32 | 显示全部楼层
运行到
OSStartHighRdy()后进入
OSStartHighRdy: CALL    OSTaskSwHook                ; Invoke user defined context switch hook
                LDS     R16,OSRunning               ; Indicate that we are multitasking
                INC     R16                         ;
                STS     OSRunning,R16               ;

                LDS     R30,OSTCBHighRdy            ; Let Z point to TCB of highest priority task
                LDS     R31,OSTCBHighRdy+1          ; ready to run
                LD      R28,Z+                      ; Load Y (R29:R28) pointer
                LD      R29,Z+                      ;

                LD      R28,Z+                      ; Load Y (R29:R28) pointer
                LD      R29,Z+  这两句执行完毕后出现以上的提示

出0入0汤圆

 楼主| 发表于 2009-7-12 17:28:27 | 显示全部楼层
这是我的程序就是2个LED灯交替闪烁ourdev_460579.rar(文件大小:208K) (原文件名:ATMEL128.rar)

出0入0汤圆

 楼主| 发表于 2009-7-12 21:43:44 | 显示全部楼层
外国网上找的估计是这个问题的答案
问题
Stack pointer for CSTACK outside the stack range
Application:



embOS v 3.60a1

IAR EW 5.11.0.50622

ARM 966E-S

Start_STR912.eww

I get this message during debugg in Debug Log window and application behave very strange (e.g. OS_Error with big error numbers). I tryed to change size of CSTACK but this difference(CSTACK poniter >> CSTACK stack range in memory ) ist too big and it doesn't help. What I have to do ? Where is error made ?
回答
you can ignore this error message. Please deactivate the IAR stack check plugin, Menu -> Project -> Options -> Debugger -> Plugins - Stack.

The IAR stack check plugin works not correctly with embOS, the stack check plugin only checks the CSTACK und IRQSTACK but embOS tasks running
on their own stack.

The CStack size will not cause your problem, please ensure whether your task stacks are big enough. You can also try to step with single steps after
OS_Error() to see where the issue occurred.

出0入0汤圆

发表于 2009-7-12 22:44:10 | 显示全部楼层
应该没错,os中每个任务都有自己独立的堆栈,不用编译器保存
是不是应该对每个任务用__task声明一下?

出0入0汤圆

发表于 2009-7-12 23:47:57 | 显示全部楼层
Debugger/plugins/stack 钩去掉。
ucos的钩勾上。


(原文件名:Image0330.JPG)

出0入0汤圆

 楼主| 发表于 2009-7-13 08:07:55 | 显示全部楼层
每个任务用__task声明一下
能具体点吗?
不知道在那里加????

出0入0汤圆

发表于 2014-5-10 10:50:06 | 显示全部楼层
zshgxl 发表于 2009-7-12 16:36
运行到
OSStartHighRdy()后进入
OSStartHighRdy: CALL    OSTaskSwHook                ; Invoke user defi ...

我在运行STM32+UCOS2.91+IAR6.5的时候,也是在OSStartHighRdy()里出现类似的警告。不知道什么情况。

出0入0汤圆

发表于 2014-5-10 10:52:55 | 显示全部楼层
void_c 发表于 2009-7-12 23:47
Debugger/plugins/stack 钩去掉。
ucos的钩勾上。

怎么IAR6.5
Debugger/plugins/stack 没有呢,

出0入0汤圆

发表于 2015-3-16 11:25:50 | 显示全部楼层
cdh 发表于 2014-5-10 10:52
怎么IAR6.5
Debugger/plugins/stack 没有呢,

我也是,不知道为什么
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片。注意:要连续压缩2次才能满足要求!!】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-8-26 02:14

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表