type
status
slug
date
summary
tags
category
password
icon
🫥
前言:PX4环境配置,编译,学习

关于实时操作系统的部分

NuttX是什么

NuttX是一个成熟的实时操作系统,于07年由Gregory Nutt先生正式开源,2016年被三星选为TizenRT操作系统的内核,2019年在小米的推动下正式进入Apache基金会,经过开源社区多年的不懈努力,NuttX功能丰富,性能稳定,商业化成熟度高,Fitbit最近两代的手环产品和索尼多款消费级产品都是基于NuttX开发的。 NuttX可运行于各种处理器架构和硬件平台上,包括ARM、MIPS、AVR等其重点遵从特定的标准并且尽量 可伸缩良好且可适应从8位到32位单片机环境,在stm32上也能跑。Nuttx主要遵循的标准是 Posix和ANSI标准。
和Linux操作系统比较:
  1. 大小和效率:Nuttx是一个非常轻量级的操作系统,具有小巧的内核和较低的内存占用。相比之下,Linux系统通常较大且较复杂,需要更多的资源。
  1. 实时性:Nuttx是一个实时操作系统,可以提供精确的时间管理和响应。这对于需要严格时间控制的嵌入式应用非常重要。Linux系统虽然可以提供实时性,但通常需要额外的配置和补丁。
  1. 可移植性:Nuttx被设计为高度可移植的,可以在多种硬件平台上运行。它支持许多不同的处理器架构和设备。Linux系统也具有很高的可移植性,但在某些嵌入式设备上可能需要更多的定制和适配工作。
最新的官网资料👇
POSIX是什么:
Portable Operating System Interface(POSIX IPA/ˈpɒz.ɪks/[1]) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system and user-level application programming interfaces(APIs), along with command line shells and utility interfaces, for software compatibility (portability) with variants of Unix and other operating systems. POSIX is also a trademark of the IEEE. POSIX is intended to be used by both application and system developers.
这个只是给了一个历史性的定义,还可以再多了解一些:👇
所以可以回过来看NuttX的介绍:
  • Small Footprint
  • Rich Feature OS Set: The goal is to provide implementations of most standard POSIX OS interfaces to support a rich, multi-threaded development environment for deeply embedded processors.
    • NON-GOALS: It is not a goal to provide the level of OS features like those provided by Linux. In order to work with smaller MCUs, small footprint must be more important than an extensive feature set. But standard compliance is more important than small footprint. Surely a smaller RTOS could be produced by ignoring standards. Think of NuttX is a tiny Linux work-alike with a much reduced feature set.
  • Highly Scalable
  • Standards Compliance NuttX strives to achieve a high degree of standards compliance. The primary governing standards are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOS’s are adopted for functionality not available under these standards or for functionality that is not appropriate for the deeply-embedded RTOS (such as fork()).
  • Real-Time Fully pre-emptible; fixed priority, round-robin, and “sporadic” scheduling.
  • Totally Open Non-restrictive Apache license.
  • GNU Toolchains Compatible GNU toolchains based on buildroot available for download to provide a complete development environment for many architectures.

BOOTLoader

下图是加上px4固件的示意图
notion image
上面这个链接是stm32 的bootloader内容
 

使用docker编译固件

出现mkdir No space left on device:
需要扩展我vmware上虚拟机的磁盘大小:
因为之前没有搞lvm,所以这里就用这个方法👆
下面是官网的docker部署教程
下载QGC:
notion image
完成了,在docker里面进行固件编译,并且使用模拟器,在外部使用QGC进行控制飞机起飞。
后续就是研究docker以及代码了。
想想怎么debug调试,运行固件代码看。

shell部分命令

这部分是先在这里把涉及到的命令了解了,后续如果内容变庞大了会考虑单独开一个文章来写。
notion image
 
Makefile高级部分(积累)rcoreLab-ch1
Loading...
liamY
liamY
Chasing Possible
Announcement
🎉Liam’s blog🎉
-- 全新上线 ---
👏欢迎comment👏
⚠️由于浏览器缓存的原因,有些内容是更新了的但是需要手动刷新3次左右,页面才会显示更新内容