> ## Documentation Index
> Fetch the complete documentation index at: https://docs.t3gemstone.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Roadmap

> Planned Projects and Stages

<Tip>
  This section contains new projects planned with Gemstone and their completion stages.
  To contribute by taking part in the relevant projects, visit their Github pages or community forums.
</Tip>

<Card horizontal title="Apache Nuttx" icon="spinner" href="./roadmap#apache-nuttx">
  `In Progress` `45%`
</Card>

<Card horizontal title="Wayland Transition" icon="spinner" href="./roadmap#wayland-transition">
  `In Progress` `30%`
</Card>

<Card horizontal title="Buildroot" icon="spinner" href="./roadmap#buildroot">
  `In Progress` `10%`
</Card>

<Card horizontal title="ChibiOS + Ardupilot" icon="clock" href="./roadmap#chibios-+-ardupilot">
  `Not Started Yet` `0%`
</Card>

<Card horizontal title="PX4 Autopilot" icon="clock" href="./roadmap#px4-autopilot">
  `Not Started Yet` `0%`
</Card>

<Card horizontal title="Phoenix RTOS" icon="clock" href="./roadmap#phoenix-rtos">
  `Not Started Yet` `0%`
</Card>

<Card horizontal title="Linux Kernel Version 7" icon="clock" href="./roadmap#linux-kernel-version-7">
  `Not Started Yet` `0%`
</Card>

## Apache Nuttx

Pixhawk [Flight Controller](https://docs.px4.io/main/en/flight_controller/cubepilot_cube_orangeplus.html)
hardware mostly contains STM32 with Cortex-M architecture. The autopilot named PX4 runs on the real-time operating
system named Apache Nuttx and does not have support for Texas AM67a.

<Columns cols={2}>
  <Frame caption="Apache Nuttx RTOS">
    <a href="https://github.com/t3gemstone/NuttX" target="_blank">
      <img src="https://mintcdn.com/t3gemstone-754bcb96/S1XNwAfVXiylpyYD/images/apache-nuttx.png?fit=max&auto=format&n=S1XNwAfVXiylpyYD&q=85&s=f588cf381acf52ecbf8f8a164285ebeb" noZoom width="502" height="449" data-path="images/apache-nuttx.png" />
    </a>
  </Frame>

  <Frame caption="PX4 Autopilot">
    <a href="https://github.com/t3gemstone/PX4-Autopilot" target="_blank">
      <img src="https://mintcdn.com/t3gemstone-754bcb96/oFj6OOIrYSQVBj-3/images/px4-autopilot.png?fit=max&auto=format&n=oFj6OOIrYSQVBj-3&q=85&s=6152114c1ee9dd60531e6b859287cdb5" noZoom width="502" height="449" data-path="images/px4-autopilot.png" />
    </a>
  </Frame>
</Columns>

This project aims to run Apache Nuttx and PX4 on the Cortex-R5 cores found on T3-GEM-O1 development boards. The current
status and pending tasks are in the table below.

|                                                                                                              |                            |
| :----------------------------------------------------------------------------------------------------------- | -------------------------: |
| Running NuttX on R5 cores                                                                                    |                `Completed` |
| GPIO driver support                                                                                          |                `Completed` |
| Serial port driver support                                                                                   |                `Completed` |
| Access to NuttShell (nsh) console                                                                            |                `Completed` |
| Loading NuttX onto the R5 core via the remoteproc mechanism by U-Boot or Linux                               |                `Completed` |
| Communication between NuttX running on the R5 core and Linux running on the A53 core via Texas IPC mechanism | Volunteer Developer Needed |
| PWM driver support                                                                                           | Volunteer Developer Needed |
| SPI driver support                                                                                           | Volunteer Developer Needed |
| I2C driver support                                                                                           | Volunteer Developer Needed |
| Pinmux settings for all pins on the 40-pin HAT                                                               | Volunteer Developer Needed |
| Running Ardupilot and PX4 autopilots as apps on the Nuttx OS on Gemstone                                     | Volunteer Developer Needed |
| CAN Bus driver support                                                                                       | Volunteer Developer Needed |
| USB driver support                                                                                           | Volunteer Developer Needed |
| SD card and eMMC driver support                                                                              | Volunteer Developer Needed |

## ChibiOS + Ardupilot

The Ardupilot autopilot currently runs on Linux on the T3 Gemstone O1 development board, that is, on the
Cortex-A53 cores. However, for real-time and low-latency flight control, it is preferable to run the autopilot
on dedicated cores without the overhead of a general-purpose operating system.
[ChibiOS](https://www.chibios.org/), the primary real-time operating system supported by Ardupilot, is widely
used on flight controller boards.

This project aims to port the ChibiOS operating system to the Cortex-R5 cores on the AM67a SoC and to run
Ardupilot as an autopilot on top of ChibiOS on these cores. This way, while the Linux running on the Cortex-A53
cores handles general-purpose tasks, the real-time flight control loop can run uninterrupted on the Cortex-R5
cores.

<Columns cols={2}>
  <Frame caption="ChibiOS RTOS">
    <a href="https://www.chibios.org/" target="_blank">
      <img src="https://mintcdn.com/t3gemstone-754bcb96/2x5NJAwi9U-MsHK8/images/chibios.png?fit=max&auto=format&n=2x5NJAwi9U-MsHK8&q=85&s=9561245990a0395ef159d747477a32d3" noZoom width="800" height="445" data-path="images/chibios.png" />
    </a>
  </Frame>

  <Frame caption="Ardupilot">
    <a href="https://ardupilot.org/" target="_blank">
      <img src="https://mintcdn.com/t3gemstone-754bcb96/2x5NJAwi9U-MsHK8/images/ardupilot.png?fit=max&auto=format&n=2x5NJAwi9U-MsHK8&q=85&s=d1dc6b201766544a1f6541438510c29e" noZoom width="1920" height="1080" data-path="images/ardupilot.png" />
    </a>
  </Frame>
</Columns>

The planned tasks are listed in the table below.

|                                                                                                      |                            |
| :--------------------------------------------------------------------------------------------------- | -------------------------: |
| Porting the ChibiOS HAL for the AM67a Cortex-R5 cores                                                | Volunteer Developer Needed |
| Loading ChibiOS onto the R5 core via the remoteproc mechanism by U-Boot or Linux                     | Volunteer Developer Needed |
| Serial port (UART) driver support and console access                                                 | Volunteer Developer Needed |
| GPIO driver support                                                                                  | Volunteer Developer Needed |
| Building Ardupilot for the R5 cores using the AP\_HAL\_ChibiOS layer                                 | Volunteer Developer Needed |
| Running Ardupilot as an autopilot on top of ChibiOS                                                  | Volunteer Developer Needed |
| SPI and I2C driver support (for sensors such as IMU, barometer, etc.)                                | Volunteer Developer Needed |
| PWM driver support (for motor and servo outputs)                                                     | Volunteer Developer Needed |
| CAN Bus (DroneCAN) driver support                                                                    | Volunteer Developer Needed |
| Communication between ChibiOS running on the R5 core and Linux running on the A53 core via Texas IPC | Volunteer Developer Needed |
| Providing MAVLink telemetry and ground control station (GCS) connectivity                            | Volunteer Developer Needed |

## PX4 Autopilot

The goal is to run the PX4 autopilot on Gemstone Linux (without NuttX).

<Columns cols={1}>
  <Frame caption="PX4 Autopilot">
    <a href="https://github.com/t3gemstone/PX4-Autopilot" target="_blank">
      <img src="https://mintcdn.com/t3gemstone-754bcb96/oFj6OOIrYSQVBj-3/images/px4-autopilot-b.png?fit=max&auto=format&n=oFj6OOIrYSQVBj-3&q=85&s=ccc6484e93781dbd0a1ebdd73e49c046" noZoom width="785" height="410" data-path="images/px4-autopilot-b.png" />
    </a>
  </Frame>
</Columns>

## Buildroot

Support for Gemstone will be added to Buildroot, a Linux build system with a somewhat lighter structure compared
to the Yocto Project. The goal is for a person downloading buildroot to see `T3-GEM-O1` as a board in the
official buildroot system, and to be able to compile and load two image types named `Minimal` and `Kiosk` onto the
development board.

<Columns cols={1}>
  <Frame caption="Buildroot">
    <a href="https://buildroot.org/" target="_blank">
      <img src="https://mintcdn.com/t3gemstone-754bcb96/gPuwGDJx4nxSbbfy/images/buildroot.png?fit=max&auto=format&n=gPuwGDJx4nxSbbfy&q=85&s=7bbdd4709260146515ed942213a0fff9" noZoom width="800" height="400" data-path="images/buildroot.png" />
    </a>
  </Frame>
</Columns>

|                                                                                                                                   |                            |
| :-------------------------------------------------------------------------------------------------------------------------------- | -------------------------: |
| Adding T3-GEM-O1 configuration to Buildroot and creating a pull request to its [address](https://github.com/t3gemstone/buildroot) | Volunteer Developer Needed |
| Creating two image types named Minimal and Kiosk and similarly creating a merge request                                           | Volunteer Developer Needed |

## Phoenix RTOS

The goal is to run the open-source real-time operating system Phoenix, which has a microkernel architecture
on Gemstone.

<Frame caption="Phoenix RTOS">
  <a href="https://github.com/t3gemstone/phoenix-rtos-project" target="_blank">
    <img src="https://mintcdn.com/t3gemstone-754bcb96/oFj6OOIrYSQVBj-3/images/phoenix-rtos.png?fit=max&auto=format&n=oFj6OOIrYSQVBj-3&q=85&s=5cbe6a1392e83b0517d6eb2e3d92c565" noZoom width="821" height="429" data-path="images/phoenix-rtos.png" />
  </a>
</Frame>

## Wayland Transition

The GPU (IMG BXS4-64) driver provided by TI for the AM67A SoC cannot accelerate X11 desktop environments.
Windows are currently rendered without hardware acceleration using the CPU (llvmpipe). This causes the desktop environment to run sluggishly.
The same driver includes acceleration support for Wayland. The goal is to transition to a Wayland-supported
desktop environment that is stable, low on resource usage, feature-rich, and suitable for the majority of users.

<Columns cols={1}>
  <Frame caption="Wayland">
    <img src="https://mintcdn.com/t3gemstone-754bcb96/w9qomZMilbBbtu0I/images/wayland-logo.svg?fit=max&auto=format&n=w9qomZMilbBbtu0I&q=85&s=0c7fd9b03355c864665c66187e116360" noZoom width="266" height="266" data-path="images/wayland-logo.svg" />
  </Frame>
</Columns>

|                                                                                                                                                |                            |
| :--------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------: |
| Compiling the [Mesa library](https://gitlab.freedesktop.org/StaticRocket/mesa) with Ubuntu 22.04 build tools and packaging it as a DEB package |                `Completed` |
| Selecting a suitable Wayland desktop environment or window manager                                                                             | Volunteer Developer Needed |
| Finding programs such as settings, file manager, and network manager (if not bundled with the selected environment)                            | Volunteer Developer Needed |
| Creating a common theme for window borders, status bar, and similar elements for interface consistency                                         | Volunteer Developer Needed |

## Linux Kernel Version 7

The goal is to run Linux kernel version 7 on the T3-GEM-O1 development board, instead of the currently used 6.12 version.
This will allow taking advantage of new hardware drivers, improvements, and bug fixes.

<Columns cols={1}>
  <Frame caption="Linux Kernel Version 7">
    <a href="https://github.com/RobertCNelson/arm64-multiplatform/commits/v7.0.x-arm64-k3/" target="_blank">
      <img src="https://mintcdn.com/t3gemstone-754bcb96/ZQNNRZDYiWw0CH5C/images/linux-kernel-7.png?fit=max&auto=format&n=ZQNNRZDYiWw0CH5C&q=85&s=4b101c985323b9f64d3e8e1eacf61a78" noZoom width="1356" height="672" data-path="images/linux-kernel-7.png" />
    </a>
  </Frame>
</Columns>
