Developing NuttX RTOS on FreeBSD
Welcome to the NuttX RTOS development on FreeBSD WIKI page! You will find resources, information, hints and references that should be useful to everyone that develops NuttX RTOS on FreeBSD, mostly current work in progress porting effort so things work out of the box for you
TODO
RTOS Core
tools / initial configuration
[TODO] GNU Make vs BSD Make. For now gmake needs to be used. Find a way to use make both on BSD and Linux.
[TODO] GNU AWK vs BSD AWK. Recently the awk was added to the NuttX build process. Find a way to use awk both on BSD and Linux.
- [DONE] Port initial configuration scripts so they work on FreeBSD / *BSD platforms:
[DONE] Patch upstream so it works out of the box on BSD: https://github.com/apache/incubator-nuttx/pull/4673.
Espressif SDK
- [TODO] See if native FreeBSD build can be done for Espressif SDK.
[DONE] Update esptool port utility so it flashes modern RISC-V ESP32-C3 MCU:
Port update 2.5.1 -> 3.1 provided: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259235.
RISC-V Toolchain
- [ONGO] Auto-detect best available toolchain for RISC-V MCU:
[DONE] OK: Verify build and run using riscv32-esp-elf toolchain.
[ONGO] ERR: Verify build and run using riscv32-unknown-elf (FreeBSD ports). Does not build due -lm error at link stage.
[ONGO] ERR: Verify build and run using riscv64-none-elf (FreeBSD ports). Does not build due -lm error at link stage.
genromfs
[DONE] Port critical NuttX dependency genromfs that allows creating NuttX simulator and run just like any other program on the developer machine:
Port created and provided: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259242.
- Port is now in the packages.
kconfig-frontends
[DONE] Port critical NuttX development dependency kconfig-frontends that allows menuconfig like kernel configuration:
- This part comes from Linux kernel.
- Upstream seems unmaintained and there are two known forks: Debian (based on 4.11) and Espressif (based on 4.6 version).
- Upstream location, maintenance, and ownership needs to be sorted out.
- Working on local release package provided and referenced by NuttX project.
Port created and provided: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259256.
- Port is now in the packages.
Applications and Extras
MicroPython on NuttX
[ONGO] Port and run MicroPython interpreter on NuttX:
There was MicroPython before in NuttX but it was unstable so it was removed.
[ONGO] Modern stable and portable MicroPython on NuttX:
[ONGO] Current work-in-progress is here https://github.com/apache/incubator-nuttx-apps/pull/840.
- [TODO] Run and verify on RISC-V based ESP32-C3.
References
Official NuttX RTOS GitHub repository (please note that project is being currently transferred to Apache organization model thus "incubating" status).
Official NuttX Applications repository (please note that project is being currently transferred to Apache organization model thus "incubating" status).