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) 2{ 3 rt_enter_critical(); 4 5 ulog_output(LO...
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) 2{ 3 rt_enter_critical(); 4 5 ulog_output(LO...
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_hw_interrupt_disable,关闭了全局中断。 __rt_assert_handler,应该是进行一些检查和断言吧。 rt_assert_set_hook,进行一些寄存器值的保存和加载,并且与栈操作相关。 entry,之后的内容一致。 测试是否进入了rtos.bin 找到第一个执行文件 (1)既然知道问题所在了,对启动流程有了一个初步认识之后,那么我们是不是可...
rt_assert_set_hook(assert_hook);thread_sample();while(1) {rt_thread_delay(50); }return0;...
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); if (!(timer->parent....
rt_interrupt_nest0x20000118Data1irq.o(.data) rt_assert_hook0x20000124Data4kservice.o(.data) rt_object_trytake_hook0x200001f8Data4object.o(.data) rt_object_take_hook0x200001fcData4object.o(.data) rt_object_put_hook0x20000200Data4object...
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_ASSERT,...
{ struct rt_device *device; RT_ASSERT(wtd != RT_NULL); device = &(wtd->parent); device->type = RT_Device_Class_Miscellaneous; device->rx_indicate = RT_NULL; device->tx_complete = RT_NULL; device->ops = &wdt_ops; device->user_data = data; /* register a character device */ ...
/* set priority mask */#ifRT_THREAD_PRIORITY_MAX <= 32RT_DEBUG_LOG(RT_DEBUG_SCHEDULER, ("insert thread[%.*s], the priority: %d\n", RT_NAME_MAX, thread->name, thread->current_priority)); voidrt_schedule_remove_thread(structrt_thread *thread){registerrt_base_ttemp;RT_ASSERT(thread...