RT-Thread 的断言支持断言回调(hook),我们定义一个类似如下的断言 hook 函数,然后通过rt_assert_set_hook(rtt_user_assert_hook); 函数将其设置到系统中即可。 staticvoidrtt_user_assert_hook(constchar*ex,constchar*func,rt_size_t
RT-Thread 的断言支持断言回调(hook),我们定义一个类似如下的断言 hook 函数,然后通过rt_assert_set_hook(rtt_user_assert_hook);函数将其设置到系统中即可。 1staticvoidrtt_user_assert_hook(constchar* ex,constchar* func,rt_size_tline) 2{ 3rt_enter_critical(); 4 5ulog_output(LOG_LVL_ASSERT,"r...
RT-Thread 的断言支持断言回调(hook),我们定义一个类似如下的断言 hook 函数,然后通过 rt_assert_set_hook(rtt_user_assert_hook); 函数将其设置到系统中即可。 static void rtt_user_assert_hook(const char* ex, const char* func, rt_size_t line) { rt_enter_critical(); ulog_output(LOG_LVL_ASSER...
rt_assert_hook0x20000124Data4kservice.o(.data) rt_object_trytake_hook0x200001f8Data4object.o(.data) rt_object_take_hook0x200001fcData4object.o(.data) rt_object_put_hook0x20000200Data4object.o(.data) rt_current_thread0x20000208Data4scheduler.o(.data) rt_current_priority0x2000020cData1sch...
配置PM 组件:勾选 BSP 里面的Hareware Drivers Config ---> On-chip Peripheral Drivers ---> Enable Power Management,使能了这个选项后,会自动选择 PM 组件和 PM 组件需要的 IDLE HOOK 功能: 配置组件配置内核选项:使用PM组件需要更大的 IDLE 线程的栈,这里使用了 1024 字节。例程里还使用 Software timer,所...
* @param hook the hook function */ void rt_assert_set_hook(void (*hook)(const char *ex, ...
RT-Thread 的断言支持断言回调(hook),我们定义一个类似如下的断言 hook 函数,然后通过 rt_assert_set_hook(rtt_user_assert_hook); 函数将其设置到系统中即可。 1static void rtt_user_assert_hook(const char* ex, const char* func, rt_size_t line) ...
void cpu_usage_get(rt_uint8_t *major, rt_uint8_t *minor){ RT_ASSERT(major != RT_NULL); RT_ASSERT(minor != RT_NULL); *major = cpu_usage_major; *minor = cpu_usage_minor;} void cpu_usage_init(void){ /* set idle thread hook */ rt_thread_idle_sethook(cpu_usage_idle_hook)...
增加rt_assert_hook,在触发断言时可以执行这个钩子函数; 修正应用模块分散加载情况下的问题; 工具 scons中定义Group时加入了本Group内的编译参数定义; 修正了如果Group中即包含代码,也包含二进制库时,生成的Keil MDK工程文件有两个重名Group的问题; 版本: RT-Threadv2.0.1及v2.1.0 alpha ...
2.调用rt_object_put_hook钩子函数 3.将rt_timer移出列表。 rt_err_t rt_timer_stop(rt_timer_t timer) { register rt_base_t level; /* timer check */ RT_ASSERT(timer != RT_NULL); RT_ASSERT(rt_object_get_type(&timer->parent) == RT_Object_Class_Timer); ...