My Week in Code #6

Hello everyone. Another light week here. Let’s go over everything.

MicroPython

Initial BeagleConnect Freedom Support

While we have had MicroPython firmware for BeagleConnect Freedom in the past, the work was out of tree. This made maintenance and collaboration hard to do. There were a few reasons for having the support out of tree:

  1. Zephyr support for BeagleConnect Freedom was primarily out of tree, with just basic support in mainline.
  2. MicroPython only supported Zephyr v3.1.0

Due to my work, BeagleConnect Freedom supports almost everything in mainline Zephyr. Additionally, due to the fantastic work by Maureen Helm MicroPython now supports Zephyr v3.7.0. So, it seemed like a good time to have support for BeagleConnect Freedom in mainline MicroPython. Here is the link to the merged PR. It does not contain more advanced features like ADC and PWM right now, but those are also on the way.

PWM support for Zephyr Port

While working on adding PWM support for BeagleConnect Freedom in MicroPython, I discovered that the Zephyr port of MicroPython did not support PWM. So, I ended up working on adding PWM support. Here is the PR.

MicroBlocks v2.0

MicroBlocks is a blocks programming language for physical computing inspired by Scratch. BeagleConnect Freedom has had good support for MicroBlocks, as outlined in a prior post.

Recently, MicroBlocks v2.0 was released in pilot and thankfully, BeagleConnect Freedom works with the newest firmware perfectly, without any real change in the Zephyr port.

Arduino Module for Zephyr

Due to the recent cleanup of the defaults in the device tree of BeagleConnect Freedom, ADC and PWM are supported without any overlays. So just a simple cleanup of Arduino module overlay. Here is the PR.

BeagleBoard Rust Imager

The v0.0.1 release of the BeagleBoard Rust imager took place last week. It has the following features:

  1. Platforms:
    1. Linux
      1. GUI Appimage
      2. CLI binary
    2. Windows
      1. GUI Portable exe
      2. CLI binary
    3. macOS
      1. CLI binary
  2. Boards
    1. Generic Linux (BeaglePlay, Beagle AI64, BeagleY-AI,  BeagleV-Fire, BeagleBone Black, etc)
    2. BeagleConnect Freedom
    3. BeagleConnect Freedom MSP430

It is basically at feature parity with the original BeagleBoard Imager based on Raspberry Pi and supports additional boards like BeagleConnect Freedom. Here is the release page.

Rust std for UEFI

The Rust std for UEFI endeavor has picked up steam again, with some of the old PRs getting merged. I have the following support in the pipeline:

  1. File I/O
  2. TCP
  3. UDP

Let’s hope that I can get enough free time to upstream everything by the end of this year. However, I will not make any promises since I can only work on this in a limited capacity.

Environment Variables

Environment variables support for UEFI was merged this week. It uses UEFI Shell protocol behind the scenes since environment variables are not applicable in most other situations. . Here is the merged PR.

There is also a plan to introduce support for full UEFI variables under std::os::uefi, but that’s probably far in the future. The current goal is first to reach a point where running Rust std tests is possible.

File I/O

With most of the pieces in place, I will start working on File I/O support again. Here is the draft PR, but I have a much more advanced version locally.

Ending Thoughts

That is all for the week. Hopefully, this series helps keep people updated about my work and attracts potential contributors.

Consider supporting me if you like my work.

Helpful links