第一个正式版本刚发出去做板,现在有空可以来好好看看STM32F405这边到底做了哪些事情,今天先看到整体程序的架构,crazyflie用的是FreeRTOS,程序中大部分会用到创建任务和队列传递数据的过程,网上有中文版的FreeRTOS资料,看一遍基本明白创建任务及其队列实现的机制,今天我们先看下main这边主要做了什么事情,习惯用SourceInsight浏览代码。
首先从main函数开始:
int main()
{
//Initialize the platform.
platformInit();
//Launch the system task that will initialize and start everything
systemLaunch();
//Start the FreeRTOS scheduler
vTaskStartScheduler();
//TODO: Move to platform launch failed
ledInit();
ledSet(0, 1);
ledSet(1, 1);
//Should never reach this point!
while(1);
return 0;
}
1&#