Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
RT-Thread
栈溢出_StackOverflow
10
rt-thread堆栈溢出的问题
发布于 2022-07-24 23:27:18 浏览:1279
订阅该版
定义了5个定时器中断,因为中断周期是500us没有使用rt-thread的硬件定时器驱动框架 ```c void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { if( htim == &htim1){ MA_Prog(); // SA_Check(); } else if( htim == &htim2){ // MB_Prog(); // SB_Check(); } else if( htim == &htim3){ // MC_Prog(); // SC_Check(); } else if( htim == &htim4){ // MD_Prog(); // SD_Check(); } else if( htim == &htim5){ // ME_Prog(); // SE_Check(); } } ``` 定时器的中断回调函数调用外部中断处理函数产生PWM ```c void MA_Prog(void) { static uint8_t i=0,j=0; MA_STEP_LEVEL = !MA_STEP_LEVEL; i++; } ``` 产生堆栈溢出错误 ```c .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching startup_stm32f103xb.o(STACK). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching startup_stm32f103xb.o(HEAP). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching idle.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching drv_spi.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching motor_tim.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching cm_backtrace.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching drv_usart.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching scheduler.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching drv_tmc2660.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching drv_gpio.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching object.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching ulog.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching shell.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching kservice.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching libspace.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching drv_wdt.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching pin.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching motor.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching mem.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching mem.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching console_be.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching scheduler.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching syswatch.o(.bss). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching shell.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching timer.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching drv_usart.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching cm_backtrace.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching drv_spi.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching cpuport.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching ulog.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching kservice.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching thread.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching signal_led.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching irq.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching stm32f1xx_hal.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching main.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching drv_wdt.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching clock.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching tmc2660_sample.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching serial.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6406E: No space in execution regions with .ANY selector matching system_stm32f1xx.o(.data). .\build\keil\Obj\rt-thread.axf: Error: L6407E: Sections of aggregate size 0x13ec bytes could not fit into .ANY selector(s). ``` 只要将MA_Prog的i++注释掉就没有了,是什么原因产生堆栈溢出错误 还有一个,另外定义一个另外测试函数中断回调调用也没这个问题 ```c void time_test(void) { static uint8_t i=0; i++; } ``` 就是说只要在中断回调里调用MA_Prog名称函数并且只要一点简单的运算就会报堆栈错误
查看更多
nongxiaoming
2022-07-25
rt-thread大师兄
这个是你sram不够用了啊,不是堆栈溢出
4
个回答
默认排序
按发布时间排序
红枫
认证专家
2022-07-25
这家伙很懒,什么也没写!
把中断函数中的变量定义放到函数外面试试
出出啊
2022-07-25
恃人不如自恃,人之为己者不如己之自为也
你这是编译错误啊,内存不足以支撑 rtt 系统了。放弃系统吧。 或者稍微减少线程栈大小一点点验证一下。
Yanye0xFF
2022-07-25
https
中断函数用的系统初始化前的c栈空间,把它改大点试试。 ![2022-07-25_141831.png](https://oss-club.rt-thread.org/uploads/20220725/7bf9b3d0d1fd761a8a91c975454e0bca.png "2022-07-25_141831.png")
撰写答案
登录
注册新账号
关注者
0
被浏览
1.3k
关于作者
kun222
rtt
提问
13
回答
3
被采纳
0
关注TA
发私信
相关问题
1
RT-THREAD在STM32H747平台上移植lwip
2
正点原子miniSTM32开发板读写sdcard
3
反馈rtt串口驱动对低功耗串口lpuart1不兼容的问题
4
Keil MDK 移植 RT-Thread Nano
5
RT1061/1052 带 RTT + LWIP和LPSPI,有什么坑要注意吗?
6
RT thread HID 如何收发数据
7
求一份基于RTT系统封装好的STM32F1系列的FLASH操作程序
8
RT-Thread修改项目名称之后不能下载
9
rt-studio编译c++
10
有木有移植rt-thread(nano)到riscv 32位MCU上
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
使用百度AI助手辅助编写一个rt-thread下的ONVIF设备发现功能的功能代码
2
RT-Thread 发布 EtherKit开源以太网硬件!
3
rt-thread使用cherryusb实现虚拟串口
4
《C++20 图形界面程序:速度与渲染效率的双重优化秘籍》
5
《原子操作:程序世界里的“最小魔法单位”解析》
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
I2C_IIC
WIZnet_W5500
ota在线升级
UART
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
Debug
编译报错
msh
SFUD
keil_MDK
rt_mq_消息队列_msg_queue
at_device
ulog
C++_cpp
本月问答贡献
踩姑娘的小蘑菇
7
个答案
3
次被采纳
张世争
8
个答案
2
次被采纳
rv666
5
个答案
2
次被采纳
用户名由3_15位
11
个答案
1
次被采纳
KunYi
6
个答案
1
次被采纳
本月文章贡献
程序员阿伟
6
篇文章
2
次点赞
hhart
3
篇文章
4
次点赞
大龄码农
1
篇文章
2
次点赞
ThinkCode
1
篇文章
1
次点赞
Betrayer
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部