在chconf.h中设置CH_CFG_NO_IDLE_THREAD为FALSE后,可以关闭ChibiOS的Idle线程功能。
此时main函数将会变成Idle线程,而ChibiOS的调度器要求就绪表中必须至少要有一个任务存在,因此main函数(也就是现在的Idle线程)不能主动放弃资源,也就是不能调用类似于系统延时、资源等待等可能发生主动任务切换并将自身从就绪表中删除的函数。
所以官方的说法写了:“The application @p main() function becomes the idle thread and must implement an infinite lopp.”