Midterm update

A brief update on the Raspberry Pi BSP development progress.

rtems raspberry pi

Midterm evaluation is here and that means an update post is due where I talk about the progress so far. I can gladly say that lots of things are cooking in the raspberrypi4b BSP for RTEMS. I would like to go in detail about the development process and the hurdles faced in another blog post. Hence, this would be a short update post.

GPIO support #

The BSP had no GPIO capability to start with. Since blinking an LED is a classic starter project in firmware development, I chose to start with adding support for GPIO. A new GPIO API is also in the talks at RTEMS, hence I only added support for the following basic functionality:

  • gpio_set_pin: To set a pin to logic high.
  • gpio_clear_pin: To set a pin to logic low.
  • gpio_set_function: To specify the pin function.
  • gpio_set_pull: To set the pull mode for a pin.

I’ll keep adding more functionality based on the BSP requirements. Once the new GPIO API is fleshed out, support for it will be added to this BSP.

UART support #

On the UART side of things, the BSP only supported using UART0 as the console initially. Since the RPi has a total of six UART ports, this had to be addressed. Hence, I wrote drivers for the ARM PL011 and Mini UART peripherals on the RPi. This makes it possible to use all the UARTs, UART0 - UART5, on the board. The new drivers also support modifying the baudrate of the UART transfers, which was not possible before.

Currently, both of these drivers are polling-based. Making it interrupt-based is the next thing on the checklist.

Conclusion #

Presently, these drivers only exist on my fork of RTEMS in the raspberrypi4b BSP. I’ll prepare the patches for the changes to be merged upstream. In parallel, I’ll start work on writing drivers for the Mailbox API to allow working with framebuffers.



Nothing yet.

Leave a reply