CMSIS-RTOS2 栈溢出请教
使用RTX V5.5.1时,系统全速运行一段时间,偶发命令解析线程栈溢出。显示的调试信息为Stack Used:Unknow。请教下各位前辈如何定位问题?出现这类问题是因为指针访问错误吗?
资源使用情况如图片所示。
楼主,你的这个信息怎么出来的?我的只有event recorder有数据,event statistics没有线程的统计数据。请问如何解决的? 要不是楼上群友回复,都没有注意到这里还有还一个问题没有回复。
出现这个问题的话,一般升级MDK到最新版可以解决。
如果解决不了,基本就是显示异常了。 kinpar 发表于 2020-7-15 23:29
楼主,你的这个信息怎么出来的?我的只有event recorder有数据,event statistics没有线程的统计数据。请问 ...
我最新的MDK 5.31 怎么没你这个界面,只有watch1 watch2 很奇怪。 By default, the Event Recorder uses the DWT Cycle Counter as a time stamp source. This is not available on Cortex-M0/M0+/M23. Change the configuration to use an alternative timer instead.
For Keil RTX5 (version 5.4.0 and above), no call to EventRecorderInitialize is required. Instead enable Event Recorder Configuration - Global Initialization in the RTX_Config.h file. Refer to the CMSIS-RTOS2 - RTX v5 Implementation for more information. 好像和keil的target1的配置有关 *** Target 'Target 1' uses RTOS support that is part of a Legacy Pack.
毛病应该出在这里,不过不知道怎么设置了 工程重新建立了一遍,现在可以显示 watch->RTX RTOS的内容了,但是Event Statics还是空的,啥都没有。 另外还有一个问题 Warning: Event Recorder not located in uninitialized memory! kinpar 发表于 2020-7-16 11:35
工程重新建立了一遍,现在可以显示 watch->RTX RTOS的内容了,但是Event Statics还是空的,啥都没有。
你这个:watch->RTX RTOS成功了没 成功了,原因找到了,我开始是自己建立的空工程,没有通过keil wizard建立,所以不行。重新通过keil wizard来建立就好了。现在的问题是Event Statics还是空的
我需要统计每个线程占用cpu使用率的信息,方便分配调整各个线程的优先级和资源 Event Recorder是正常工作的 RTX5的调试组件无法正常展示各个任务执行时间解决办法整理
http://www.armbbs.cn/forum.php?mod=viewthread&tid=96643&fromuid=58
(出处: 硬汉嵌入式论坛)
Using Event Recorder
The following steps enable the MDK debugger views for static information and dynamic events.
For User Code:
Add the Event Recorder to the project.
Locate the Event Recorder data to uninitialized memory to avoid overwriting the entries on program reset.
Set the correct initial time stamp.
Create a heartbeat to avoid timer overflow problems.
Add Event Annotations in the C source to be able to stream dynamic event information.
Create an SCVD file to Format Event Information that matches with application code.
For MDK Middleware, Keil RTX5, and FreeRTOS:
The software packs for MDK Middleware, CMSIS, CMSIS-FreeRTOS already contain the relevant *.SCVD files and the related event annotations in the C source code.
Add Event Recorder to the project.
Select a Debug variant for the middleware component to enable event information (for RTX5 select Source variant).
http://www.keil.com/pack/doc/compiler/EventRecorder/html/er_use.html
你这个帖子我看了,你指所有都勾选还是? kinpar 发表于 2020-7-16 12:09
你这个帖子我看了,你指所有都勾选还是?
都勾上,
就帮你这么多吧,结帖。 都勾上,没有作用,我反复测试了。刚刚上传截图了。 kinpar 发表于 2020-7-16 12:21
都勾上,没有作用,我反复测试了。刚刚上传截图了。
自己慢慢搞下,实在搞不定就算了,就帮你这么多吧,正式结帖:handshake 这个是Event Recorder 也是正常的。当然里面有个线程错误,回头再检查了 奇怪,莫名其妙的好了!!!正常了!!!!都不知道为啥?我现在关注的是,如何定位上图中的红色的错误信息,找出错误,解决问题!谢谢坛主的鼎力支持! Warning: Event Recorder not located in uninitialized memory!
这个告警我也消不掉。
下面的网页是说,event recorder要放到一个没有初始化的memory里面,我按下面网页步骤弄了,结果进了fault中断。
然后我还是保留有一个空间是uninitialzed, 但是EventRecorder.c不用这个ram空间,可以打印了。没法子,深究不了。
https://www.keil.com/pack/doc/compiler/EventRecorder/html/er_use.html#place_uninit_memory
不过正好可以试下硬汉说的看到底是哪个导致出现fault。
snakeemail 发表于 2021-4-16 16:48
Warning: Event Recorder not located in uninitialized memory!
这个告警我也消不掉。
我也遇到问题了,不知道你那解决了吗? 解决“Warning: Event Recorder not located in uninitialized memory!”问题的方法请参照下方的链接:
https://mp.weixin.qq.com/s/mfF8BmLTSkE0UGkQbopmIg
今晚打老虎 发表于 2023-4-11 14:38
解决“Warning: Event Recorder not located in uninitialized memory!”问题的方法请参照下方的链接:
ht ...
这个狂暴模式里面都已经解决。
STM32H7视频教程第11期:STM32H7的GPIO实战,深化非阻塞编程思想,移植驱动到全新器件上,开启Event Recorder狂暴模式
https://www.armbbs.cn/forum.php?mod=viewthread&tid=111702&fromuid=58
(出处: 硬汉嵌入式论坛)
eric2013 发表于 2023-4-11 15:51
这个狂暴模式里面都已经解决。
STM32H7视频教程第11期:STM32H7的GPIO实战,深化非阻塞编程思想,移植 ...
好的,大佬。今晚我先看看视频。
页:
[1]