NokiMo
Pybricks
Pybricks

patreon


Week 1&2: Booting with light speed

If you've used the EV3 before, you might remember it as sluggish and very slow to boot, especially when compared to newer systems like SPIKE. But is that true?

In this first progress update of the year I'd like to share the story of solving the EV3 boot problem.

Before you read on, I encourage you to watch the video above in full without scrolling ahead. If it feels painful, take a deep breath and grab a coffee. Otherwise, just imagine having to wait for this at your FLL competition table.

Now you are probably wondering ...

... how did it get so fast?!

The original EV3 firmware boots a miniature version of Linux, much like a Raspberry Pi. Booting it is similar to turning your phone fully off and on again. This makes it very slow for casual robot builders. It isn't useful for advanced users either, since this particular Linux version is stripped of almost all useful functionality to fit on the limited EV3 flash memory.

Advanced EV3 coders use ev3dev-Linux instead, created by LEGO alumnus Ralph Hempel and Pybricks co-creator David Lechner. Leveraging the micro SD card slot, the EV3 could run Debian Linux with a multitude of high level languages, including Pybricks 2.0.

So if the original firmware is too slow for robot builders and too limited for advanced users, why not get rid of Linux and build a "bare-metal" firmware? That's exactly what I've been trying to solve for many years now. With significant technical progress being made recently, I finally felt comfortable to announce the project publicly late last year.

Down to the metal

There is a really interesting precedent for bare-metal EV3 firmware called EV3RT from the Graduate School of Information Science at the Nagoya University in Japan. Initially I tried to build and run Pybricks on top of EV3RT. This worked, but I eventually realized this could not be made compatible with other Pybricks platforms like SPIKE due to the way its multi-tasked drivers and deeply nested build mechanisms work.

This meant I had to start from scratch (no pun intended), but with the knowledge that it would be possible in theory (which is a really powerful thought). Inspired by other community initiatives, I ultimately arrived at a small amount of C and assembler code that could be linked up to boot MicroPython from the microSD Card, and spit out "Hello World" with a bare UART port.

Euraka! Or so I thought --- it all only just started. Stay tuned for the next update!

Special thanks to our MINDSTORMS Legends

The Saving LEGO MINDSTORMS initiative is made possible by all of you, so thank you! Special thanks to the Hacker Initiative and all supporters of the MINDSTORMS Legends tier.


Related Creators