-
Notifications
You must be signed in to change notification settings - Fork 0
px4 notes
HackInvent edited this page Nov 13, 2016
·
13 revisions
- nuttx is integrated as a git submodule
- actually it use a very old version (NuttX-6.27 vs NuttX-7.18)
- the nuttx is compiled and exported using (make export) to NuttX/nuttx-export/libs/libnuttx.a
consist of 2 parts:
- DriverFramework the driver abstraction layer.
- uORB: the IPC communication layer, that handle communication between px4 components: it's an asynchrounous ipc. and it's implement the reactive manifesto. it implement (like Binder of android) a publish()/subcribe() API.
the source code is hosted in: modules folder like (modules/navigator)
the examples folder is very interesting.
the most used flight control software for px4 is QGroundControl
- Need to create a new nuttx-config in Firmware/nuttx-configs with the configuration of the new board
- The current revision of PX4 stack doesn't include a board with with a samv7 chip
- We copy an existing, let's take px4fmu-v4
- We call the new one: tinker-sam70, an existing board that uses an cortex-m7 (Atmel's SAME70)
- The first step will be to be able to compile the copied configuration with the new name, and the second step is to modify the configuration tinker-same70 with the new boards parameters
- no modification is required inside the folder nuttx-configs/tinker-same70/
- we will add the new copied board to the compilation configuration
- copy px4fmu-v4 into tinker-same70
- It contains bus and GPIO mappings and the board initialization code.
- cp nuttx_px4fmu-v4_default.cmake nuttx_tinker-same70_default.cmake
- cp px4fmu-v4.prototype tinker-same70.prototype
- you can modify the attributes, they will be used to identify the board in the nuttx OS
- add a compilation entry for tinker-same70
- now normally you can build your new clone board by hitting "make tinker-same70_default"
- before that you continue, you need to make sure that the PX4 stack you are using includes the same70 chips in NuttX/nuttx/arch/arm/src/
- now that we finished creating the tinker-same70 board, we configure it to the real board configuration
- add: elseif (${config_nuttx_hw} STREQUAL "m7") set(cpu_flags -mcpu=cortex-m7 -mthumb ) in function(px4_os_add_flags)
- replace m4 by m7 in px4_nuttx_configure
- TBD
- board.h, remove all the links to STM32
- board_config.h, remove all the links to STM32
- The start script is located in ROMFS/px4fmu_common