分享到plurk 分享到twitter 分享到facebook

版本 a7590e8e2af19f7ccb024bd9f614c2cc740f2c25

nuttx

組員

  • 翁振育
  • 黃亮穎
  • 蘇偉嘉
  • 李英碩

Nuttx 參考應用

  • PX4 autopilot<http://pixhawk.org/dev/nuttx/start>_

NuttX 架構

* 可混用task跟thread。 * 支援FPU。 * 可混用FIFO跟RR。

與平台相關

Run FreeRTOS on STM32F4-Discovery

Task state

.. code-block:: c

enum tstate_e { TSTATE_TASK_INVALID = 0, /* INVALID - The TCB is uninitialized / TSTATE_TASK_PENDING, / READY_TO_RUN - Pending preemption unlock / TSTATE_TASK_READYTORUN, / READY-TO-RUN - But not running / TSTATE_TASK_RUNNING, / READY_TO_RUN - And running / TSTATE_TASK_INACTIVE, / BLOCKED - Initialized but not yet activated / TSTATE_WAIT_SEM, / BLOCKED - Waiting for a semaphore / #ifndef CONFIG_DISABLE_SIGNALS TSTATE_WAIT_SIG, / BLOCKED - Waiting for a signal / #endif #ifndef CONFIG_DISABLE_MQUEUE TSTATE_WAIT_MQNOTEMPTY, / BLOCKED - Waiting for a MQ to become not empty. / TSTATE_WAIT_MQNOTFULL, / BLOCKED - Waiting for a MQ to become not full. / #endif #ifdef CONFIG_PAGING TSTATE_WAIT_PAGEFILL, / BLOCKED - Waiting for page fill / #endif NUM_TASK_STATES / Must be last */ };

Task list

TCB

Communication

Scheduling

Interrupt handler

測試環境架設

硬體驅動原理

  • UART<embedded/USART>_
  • FPU (Floating Point Unit)

效能表現

參考資料

  • https://github.com/deadbeefcafe/nuttx-stm32f4disc-bb
  • http://bibliodigital.itcr.ac.cr/xmlui/bitstream/handle/2238/3051/FinalReport.pdf