问题:main/tshell stack overflow 对于main thread问题出现在rt_hw_stack_init由rt_thread_create和_thread_init调用。 看一下错误判定: 推测sp越界。看一下main thread创建时的参数列表:RT_MAIN_THREAD_STACK_…
main thread<1-4086>// <i>Default: 512/*设置main线程的大小*/#defineRT_MAIN_THREAD_STACK_SIZE256// </h>// <h>Debug Configuration// <c1>enable kernel debug configuration// <i>Default: enable kernel debug configuration//#define RT_DEBUG// </c>// <o>enable components initialization debug...
在这里 $Sub$$main 函数调用了 rtthread_startup() 函数,其中 rtthread_startup() 函数的代码如下所示: intrtthread_startup(void){rt_hw_interrupt_disable();/* 板级初始化: 需在该函数内部进行系统堆的初始化 */rt_hw_board_init();/* 打印 RT-Thread 版本信息 */rt_show_version();/* 定时器...
/* 定义该宏开启设置应用入口为 main 函数 */ #defineRT_USING_USER_MAIN /* 定义 main 线程的栈大小 */ #defineRT_MAIN_THREAD_STACK_SIZE 2048 /** * FinSH */ /* 定义该宏可开启系统 FinSH 调试工具的使用,未定义则关闭 */ //#define RT_USING_FINSH /* 开启系统 FinSH 时:将该线程名称定义为...
***/#include<rth_modbus_usart.h>#include<rtthread.h>/*TR-Thread库*/#include"usart.h"#include"stdio.h"#include"string.h"#include"main.h"//访问全局变量#defineMODBUS_USART_HANDLE huart4#defineMODBUS_DMA_USART_RX_HANDLE hdma_usart4_rx#defineMODBUS_DMA_USART_TX_HANDLE hdma_usart4_tx/...
#define RT_USING_USER_MAIN#define RT_MAIN_THREAD_STACK_SIZE 256 内核调试功能配置 定义 RT_DEB...
USER_MAIN/* 定义 main 线程的栈大小 */#define RT_MAIN_THREAD_STACK_SIZE 2048/* 定义 main ...
rtconfig.h头文件的内容修改的不多,具体是:注释掉头文件RTE_Components.h、修改了 RT_THREAD_PRIORITY_MAX、RT_TICK_PER_SECOND和RT_MAIN_THREAD_STACK_SIZE这三个宏的大小,具体见 代码清单:移植RTT-2 的高亮部分。 代码清单:移植RTT-2 rtconfig.h文件修改 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15...
FILE***/ 5.新建touchgfx的应用例程文件 拷贝main.c的部分外设初始化代码到sample_touchgfx.c示例代码如下: 代码语言:javascript 代码运行次数:0 运行 AI代码解释 #include <rtthread.h> #include <rtdevice.h> #include <board.h> #include"app_touchgfx.h" CRC_HandleTypeDefhcrc; DMA2D_HandleTypeDef...
RT_MAIN_THREAD_STACK_SIZE 256 // 调试配置 // #define RT_DEBUG #define RT_DEBUG_INIT 0 // #define RT_USING_OVERFLOW_CHECK // Hook配置 // #define RT_USING_HOOK // #define RT_USING_IDLE_HOOK // 软件定时器配置 #define RT_USING_TIMER_SOFT 0 #if RT_USING_TIMER_SOFT == 0 #undef...