Software Architecture
- NuttX RTOS: this the lower level
- NuttX Framework
- APM Environment and Libraries
- APM Firmware: this is the higher level
1. NuttX RTOS
This is the lower level of the firmware and all source code is contained into VRNuttX/NuttX directory.
At this level it’s possible to find all tools needed to manage the Real Time Operative System and the CPU (pinout, timers, SPI and I2C busses, UARTs, DMA…).
In order to use this RTOS on its own CPU is important to create the configuration desired and to build the library (archive) to use with other software levels. You can find the configuration of all VR Brain boards in the directory “VRNuttX/nuttx-configs” and into directory “VRNuttX/makefiles” there are all makefiles to do that (board_nameofboard.mk).
To build all the archives is necessary to execute the target
archives
This target search into “VRNuttX/makefiles” directory all .mk files that start with board_ and build the relative archive putting it into “VRNuttX/Archives” folder. This is a very long task and it depends on the numbers of the boards defined. If you need to modify and build a single board you can execute the target
archives BOARDS=name of board
In our repository we have already shared, into “VRNuttX/makefiles” directory, the default archives of all our boards. Then, if you don’t need to change them, you don’t need to build always also the archives.
2. NuttX Framework
In this level there are all the drivers for the sensors, PWM IN and PWM OUT, SBUS, PPMSUM, GPIO IN and OUT, on board and external leds and buzzer. All source code is into “VRNuttX/src” directory.
Into “VRNuttX/ROMFS” there is the default ROM for our board: here you can find the startup script. For the default version the startup script don’t start anything: with this firmware you can have the shell of NuttX on a USART serial port (normally the first serial port for the telemetry). With this shell you can start the module you want and test them.
In order to build these default firmwares you can use the target
all
This target use all config_nameofboard_default.mk defined into “VRNuttX/makefiles” to build the firmware and a .bin, .hex and .vrx file are created into “VRNuttX/Images” directory.If you need to modify and build a single board you can execute the target
name of board_default
A folder “VRNuttX/Build” is created during compilation. To clean all compilations you have to use the target
clean
3. APM Environment and Libraries
Leave a Reply