Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

与软件包 rt_kprintf_threadsafe 同时使用时,测试时死机 #13

Closed
dongly opened this issue Aug 23, 2022 · 5 comments
Closed

与软件包 rt_kprintf_threadsafe 同时使用时,测试时死机 #13

dongly opened this issue Aug 23, 2022 · 5 comments

Comments

@dongly
Copy link

dongly commented Aug 23, 2022

  • 与软件包 rt_kprintf_threadsafe 同时使用时,测试时死机
  • 重现步骤:
    • 版本 rt-thread v4.1.1
    • 启用rt_kprintf_threadsafe , CmBacktrace lastest
    • 测试BSP stm32l475-atk-pandora
    • 编译器 GCC v10.2.1
    • 终端运行命令:
msh >cmb_test DIVBYZERO

怀疑与 RT-Thread/rt-thread#6327 是同一个问题

@dongly
Copy link
Author

dongly commented Aug 23, 2022

与这个 #12 也相关?

@wdfk-prog
Copy link
Contributor

  • 我也遇到了这个情况
  • 我分析了一下,是这样的.
  • cmb软件包中使用rt_enter_critical函数来告诉调度器
  • 但是rt_kprintf_threadsafe 并没有判断这个结果.而是判断了另外两个函数
  • cmb中可以使用rt_interrupt_enter()函数.因为已经进入了错误中断了,等于是进中断函数

image

@dongly
Copy link
Author

dongly commented Dec 23, 2022

若可以,发个pr

@wdfk-prog
Copy link
Contributor

wdfk-prog commented Dec 26, 2022

若可以,发个pr

我在F4的板子上也复现了这个问题,更新了代码解决掉了.
我提了个pr > #14

@dongly
Copy link
Author

dongly commented Dec 29, 2022

谢谢

@dongly dongly closed this as completed Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants