Crazy Idea of the day: Proffie Master Board

The idea is to take a linux-capable board, something like a Raspberry Pi Zero 2 W, or a milk-V duo, and then host a website on it which takes care of all programming, compiling, updating, uploading fonts, etc. All board management can then be done from a browser.

At first, this would be a separate and optional board, which wouldn’t even have to fit inside the saber. Next step would be to make the master board smaller so that it can easily fit in most sabers, and the final step would be to do everything on one board.

2 Likes

Here’s a linux-capable board small enough to fit in some sabers at least:

https://www.friendlyelec.com/index.php?route=product/product&path=69&product_id=244

1 Like

This seems like a wider relative of the remote access Proffie upload facility we were talking about the other day. Although since I know nothing about Linux, I don’t think I quite get the concept…

If the Linux board doesn’t have to fit inside the hilt, is the idea that you connect the Linux board to a computer, mess about with settings on it via your browser, then connect the Linux board to the hilt pcb (Proffieboard or whatever) and transfer the setup from the Linux board to the saber?

Or have I got the wrong end of the stick?

You’re close. The idea is that you power up the master board and connect it to the hilt. The connection between the master board and your computer/tablet/phone would be through wifi.

2 Likes

Oh wow! :open_mouth: Yeh, that sounds pretty darn cool! :+1: :clap: :smiley:

The idea is that this would be a stepping stone, and eventually all of this cool stuff would be inside the hilt. This would let us start working on the software for a do-everything-over-the-network saber before the hardware is actually ready. :slight_smile:

3 Likes

Wireless mods is definitely the dream! :pray: If this “crazy idea” gets rolling, I will definitely be watching closely! :+1: :slight_smile:

Once the Internet has light sabers on it, I will be living in the future.
Browser configuration is the norm for networked home appliances these days, so the idea is not crazy at all.

I’m more familiar with desktop processor specifications, so my understanding could be off–but the Allwinner H3 looks like a major step up from the STM32. Faster clock, more cores, more memory, and a GPU–are we getting within range of an OLED blade? I’ve seen “soft-flexible” OLED screens, and LG has an actual Cylinder OLED.

Currently available OLEDs wouldn’t be bright enough IMHO, but the idea is definitely interesting.

Ironically, where many linux-capable chips falls down is in GPIO capabilities. Linux-capable chips often cannot:

  1. tolerate 5v
  2. do analogRead
  3. drive neopixels without tying up a core
  4. talk directly to neopixels without a voltage converter
  5. drive enough PWM channels

This is why I suspect that in the future, lightsabers will probably have a linux-capable chip for doing all the computing, and an STM32 (or something similar) for talking to neopixels, and driving PWM channels.

3 Likes

Given that an ESP32-S3 should be able to run Adafruit’s CircuitPython HTTP server, I wouldn’t be so sure that the hardware hasn’t already caught up. Yes, the BLE-certified modules that include an antenna are a little wide at 18mm. The ESP32-S3-MINI modules save you a tiny bit (15mm), but there should be a way to get the raw IC for only 7mm x 7mm, if I’m reading Mouser correctly. Worst case scenario, castellated pins should help a bit. Not sure how you integrate the raw IC onto a board, that’d require more RF chops than I have.

Not to harp on this too much, but… how about just running an HTTP(S) server period with an actual programming language (C).

Circuit python is far from efficient and Python as a language is the opposite of ideal.

The point stands that the espressif chips have enough cpu and hardware chops to run a server, it’s more about the ram and flash to be able to do something useful (I.e. self-compile) alongside that.

P. S. Espressif’s own ESP-IDF libraries have robust support for various networking protocols, all written in C, no need for 3rd party libraries or python.

Flaming aside…

According to this adafruit product and Wikipedia’s version of the Win95 system requirements, the ESP32-S3 has the raw compute and RAM to run Windows 95. Doesn’t have the storage, but the Arduino IDE takes 3x the amount of storage Win95 required for the entire system. I personally wouldn’t be surprised if there was a compiler that fit in the 8MB, the source code is only ~3MB on my machine, and the factors pile up from there.

Not feasible to fit a compiler on an ESP32-S3 today, but even if you could, you might get better performance by running the compiler in the browser. And yes, I’m fully aware of the major hurdles with that path. This is a “crazy idea” thread, is it not?

lol, these sorts of comparisons always crack me up. How things have become so big.

That’s the whole arduino IDE though… and virtually all of that is unneeded. The entire GUI would be bloat for our application… so my first thought was “well how big is arduino-cli?” The program that actually backs the Arduino IDE 2.0 and does the stuff. It’s probably more than we need anyways (especially if ESP32 becomes our target) since the compilers are in the proffieboard-arduino plugin after all, but alas:

The linux x86 build of the arduino-cli is 28.8 MB… so that’s a bit big.

The build system for the ESP32 is ~700MB. There might be things that could be stripped though.

The contents of the proffieboard-arduino plugin totals ~70MB, but there’s definitely stuff in there that could be stripped.

All that’s not even that big of a deal though, because we could use an external flash medium… we use SD cards already, and that’d be adequate for something like this. SBCs like the RPi have used SD cards to boot for a while, reading from them for running applications then, while slow, is proven to be viable.

Additionally, ESP32S3 supports up to 1GB of additional RAM and/or FLASH (1GB total between both), so should it be needed, plenty of RAM and extra stuff could be thrown onto it to cope.

The issue then would be… well, ESP32 doesn’t run Linux. By default, the ESP-IDF has it running FreeRTOS, and that’s where we really hit a wall. FreeRTOS has begun work making a POSIX compatible “emulation” layer if you will, but it doesn’t seem super promising, at least for this use-case.

Beyond that, building a FreeRTOS app, on my machine, spins up all 16 cores for a good half a minute or so… I’m not going to do a proper benchmark or anything here, but suffice to say building modern programs like that requires a fair amount of CPU and RAM, which I think the ESP32S3 would be hard-pressed to do, even if all the software constraints were moot.

I think it’s an interesting idea, don’t get me wrong, but it does seem that, for now:

EDIT: And btw, sorry for getting more heated than I should’ve in my last post, I’ve feelings on that sort of stuff in general. Was not directed at you.

IMHO, the biggest hurdle for using ESP32 as a “proffie master” is the lack of an MMU.
With no MMU you can’t have virtual memory. You can’t have protected address spaces, and you can’t run linux. It’s entirely possible to make it work without all of that, but it’s painful. Every tool has to be ported and supported. WIth a chip that can run linux, all the existing tools will just work, the only question is how fast they will be and how cleverly we can integrate the tools with each other.

The ESP32 is still a pretty cool processor though. It’s a good candidate for a proffieboard processor, but not for running linux. I’ve heard rumours that future ESP32 processors might have MMUs though, which might change things…

Originally I was thinking about ESP32 for Proffie itself. Just cram the webserver directly into the lightsaber. But then the idea of a lightsaber running a compiler came up, and I had to see just how (im)plausible it would be. I’m more optimistic than @ryryog25 , but I readily admit a custom C compiler just for proffie (or even porting the standard compiler to ESP32!) isn’t a good way to use our time. If someone wanted to get into compiler shenanigans, it’d probably be more time efficient to make Arduino compile in a browser, as odd & scary as it sounds. Even better, figure out how to massage ProffieOS into being self-modifying (ie, a block of the program that’s a pile of config), but even that is a huge undertaking.

On a platform with sufficient cpu and memory, compilcation might not be required. Styles could be read and executed kind of how the style editor does it.

1 Like