HN user

gadgetoid

525 karma
Posts8
Comments113
View on HN

A pin planner- without the code gen of STM32Cube- would be doable as a website.

I made a basic one for the RP2350- https://rp2350b.pinout.xyz/

Though STM32Cube has a very different approach, handles lots of mutually exclusive features and peripherals and a bunch of extra stuff for controlling code gen IIRC.

I've thought about this on and off for years, trying to find a way to boil the stuff I've learned making Pinouts into some kind of tool.

There are a surprising number of pitfalls, since there's always some complexity most top-level diagrams don't reveal, but I feel is necessary to capture/avoid duplication of work- specifically, I mean documenting the pinout of the chip (RP2350, ATMEGA32U4, STM32H750, RP2 etc) and then translating that to a board layout.

I think the closest I've come is a prototype Pinout rewrite which started with chip [1] and board [2] JSON files.

Then, as you explore, there's the whole problem of presenting this information. I chose to capture information such as header type, orientation and pin-count but sometimes a header is too small (or there are too many headers) to document in-band so the kinda skeuomorphic presentation of the Pico pinouts doesn't work.

Perhaps that's where something like the minimap [3] from my "advanced" RP2350A pinout comes in.

Having a small representation of the board with the pin headers separate could work. It's been a while, IIRC a Fritzing [4] part involved creating a vector graphic of a part and naming the individual pin objects such that they could be mapped to a table of signals. I think SVG is compatible with this approach but... yeah, requiring people to create detailed board artwork (as good as it looks) is a stretch. The same could work for a good photo and just a table of offsets, as you suggest.

TLDR: This is a great idea and something I've wanted to do for ages. But I don't think I've got enough breadth of experience to do it alone.

1. https://github.com/pinout-xyz/pinout-2024/blob/main/chips/bc... 2. https://github.com/pinout-xyz/pinout-2024/blob/main/boards/r... 3. https://rp2350a.pinout.xyz

Once I get the hand of the ESP’s idiosyncratic signal names (I don’t have much experience with them) I should be able to crank them out. But help would be appreciated, thanks - even a canonical list of the pins and functions would be super useful. I get the sense I’m missing something referencing only their pinout diagram.

Agreed. Click-to-select-related-pins is something I've been experimenting with on a cut-down Raspberry Pi Pinout [1]

And code gen is something I'm looking at with the RP2350A pinout [2] where the JSON export would allow someone to plug it into any tool they like. (KiCAD symbol gen, C/MicroPython init code, etc)

It's difficult to strike a balance between features/minimalism but I'm increasingly drawn to the idea of a full (STM32Cube-like if you're familiar with it) configurator for Pico/RP2 based boards.

1. https://pi.pinout.xyz 2. https://rp2350a.pinout.xyz

In theory you wouldn’t even need to load firmware- you could just manipulate the relevant registers directly over SWD for the silliest IO expander.

In our case it was the only choice. I’d say we’d use UART now but the RP2350 can pretty much do it all in one chip.

Well this rang the ol’ memory bells and brought me to Daniel’s Nim drivers for our Pico based products (1). He’s probably the guy to talk to.

Not needing a Python wrapper would definitely help slim down FrameOS into something you could stuff into a fast-loading initrd I guess?

I did something similar with Keybow, static binaries and a custom build system (2) to make a sort-of Pi (Zero) based appliance.

1. https://github.com/daniel-j/nim-pimoroni-pico/tree/master

2. https://github.com/ali1234/rpi-ramdisk

This sounds like it could port well to an RP2040-based display. Though I am forever battling against its very constrained RAM for network stuff (not helped by MicroPython needing a chunk for buffers, an GC bitmap for mark/sweep and some other network mystery meat). That said our (Pimoroni) larger Pico W-based Inky has an 8Mbit PSRAM to act as a back buffer for the display. It’s “slow” but when updates take 30s+ anyway that’s kind of redundant. Very little of that 8Mbit is actually used, so with a little tinkering it might be able to cache multiple images for sequential display without having to faff about with SD cards.

Currently I transmute some images (XKCD and NASA APOD) via a scheduled GitHub action into something fit for the various display sizes. An even more extreme approach would be to convert into the packed (4bpp for 7-colour E-ink) framebuffer format server-side. Less network efficient, but more predictable memory usage.

We’ve had JPEG support for a while, but I brought up a PNG decoder (Larry Bank’s PNGdec) recently(ish) and it’s a much better fit than JPEG for palette-based images. It uses a 32K sliding window, however, which can get spicy if you’re not careful.

Our crude (actually Pillow’s IIRC) dither has a certain nostalgic appeal to it, but can definitely be bested by other algorithms. I’m still not totally convinced we have a great perceptual match for the colours either. The approach to get them - take a photo of the screen, use a colour dropper and a bit of eye balling - was crude.

(Hi, I wrote most of the Inky driver and your project is the kind of awesome I wish the Pico/RP2040-based Inky Frame devices could pull off.)

I started putting together a Lua-based toy microcomputer [1] using PicoVision and a USB mini B to A adapter to connect a mouse/keyboard. It’s a hacky mess, but it serves as a proof of concept.

There’s also a herculean work in progress to bring PicoVision support to the 32blit embedded game SDK [2]

(disclaimer: I also worked on PicoVision)

1. https://github.com/gadgetoid/picovision-micro-computer/tree/... 2. https://github.com/32blit/32blit-sdk/pull/829

Really interested in putting together some kind of USB host to HID over GATT profile or Bluetooth HID to i2c/UART bridge.

We’re (Pimoroni) closing on shipping a dual RP2040 HDMI board (PicoVision) that’s great for bedroom coder style games, but lack of full fat Bluetooth support or USB HID host in MicroPython - and the relative pain of making and supporting a build that includes these features - make adding controllers… tricky.

Now I wish I’d kept the Dreamcast controller I modded with a custom cable to poke Maple bus. Hindsight!

Obligatory shameless plug of https://pinout.xyz where I’ve been maintaining an interactive Raspberry Pi SBC pinout for some years, and the newer https://pico.pinout.xyz where I’ve tried to do the same for the Raspberry Pi Pico board. The latter also became a command-line pinout via the Python package “picopins”

I feel- and of course I’m biased- that if anything is worth bringing to the table for device pinouts it’s interactivity and accessibility. The latter, in particular, is lost in static images. I really leaned into this with the Pico Pinout, including everything from visual accessibility accommodations (avoiding low contrast text background colours), to markup for screen readers to the ability to turn off labels and reduce noise. I’m still unsure if I actually achieved my goal, but it’s been fun.

I’d be remiss not to mention that we (Pimoroni) sit right at the hacker end of the E-ink scale with stuff like Badger2040W [1] and Inky Frame [2], both of which pair (small and less small) E-Ink panels with the RP2040 microcontroller so you can BYO software.

The biggest roadblock to these being super compelling is update rate. The black/white screen on Badger can be driven pretty hard, but overdriving it (a friend built a continuous E-ink zoetrope [3]) has consequences.

Inky Frame’s 7 colour display is awesome for dithered artwork (missing cyan and magenta notwithstanding) but very, very slow to refresh- ~30s after the panels were updated to incorporate an unskippable “clean” phase.

Faster, cheaper and bigger all seem mutually exclusive right now, but I share the authors passion for the format.

1. https://shop.pimoroni.com/products/badger-2040-w?variant=405...

2. https://shop.pimoroni.com/products/inky-frame-7-3?variant=40...

3. https://www.tomshardware.com/news/raspberry-pi-digital-zoetr...

I’m still trying to get a Rock 5B to boot from NVMe. By all appearances they included a USB Type-C port that doesn’t work, so the system never pulls sufficient power not to boot loop. Apparently even after a firmware update.

To be totally fair to the up-and-coming boards, the Pi was pretty poorly supported on day 1 and the community did (and still does) a lot of heavy lifting. I’m still waiting for a contender, but I don’t have the time or energy to devote to another SBC.

Despite being a super prolific maintainer of Pi-stuff and related projects I haven’t had a single SBC manufacturer reach out to me and say “hey what do you need to support this?” They just don’t seem to care beyond shoving product out the door and hoping for the best.

It’s been possible to use Bluetooth for a while, but a bug prevented Bluetooth and Wifi from running stably at the same time.

I threw together a Bluetooth speaker firmware - for some of our (Pimoroni) boards - with FFT visualisation quite some months ago - https://github.com/Gadgetoid/galactic-bluetooth-audio

Album art display is also possible but small matrix displays don’t lend themselves well to it - https://github.com/Gadgetoid/galactic-bluetooth-audio/pull/1...