Skip to content

Jsonify Boards and Chips for easier importing#1040

Merged
makermelissa merged 18 commits intoadafruit:mainfrom
makermelissa:jsonify
Mar 12, 2026
Merged

Jsonify Boards and Chips for easier importing#1040
makermelissa merged 18 commits intoadafruit:mainfrom
makermelissa:jsonify

Conversation

@makermelissa
Copy link
Collaborator

This resolves #447.

The boards I would like to make sure this passes on include:

  • Raspberry Pi 5
  • Raspberry Pi 4
  • Some other Linux board like an Orange Pi
  • A board running MicroPython like the Pi RP2040
  • A board detected as RP2040_U2IF

I think that should cover enough different types to show it works. This is because not all boards have importlib such as the MicroPython boards, which will likely need to retain the if/else structure.

@makermelissa
Copy link
Collaborator Author

makermelissa commented Feb 19, 2026

It looks like RP2040_U2IF runs on the computer itself, so importlib should be available. For micropython, it looks like __import__() may work.

@makermelissa
Copy link
Collaborator Author

I was able to write some import and path functions that work with both linux and MicroPython.

@makermelissa
Copy link
Collaborator Author

It's currently failing because it's dependent on adafruit/Adafruit_Python_PlatformDetect#408

@makermelissa
Copy link
Collaborator Author

makermelissa commented Mar 2, 2026

Almost done working on this and testing. Turns out there is a bunch of tech debt I need to clean up (this was done in #1042), but Blinka should work much better when finished.

@makermelissa
Copy link
Collaborator Author

makermelissa commented Mar 6, 2026

I think at this point it's mostly just testing left. I was able to run it successfully on MicroPython and the Binho Nova (similar to the RP2040_U2IF). The rest of the boards should just work as it's really Python vs MicroPython.

@makermelissa makermelissa marked this pull request as ready for review March 9, 2026 00:52
@makermelissa
Copy link
Collaborator Author

makermelissa commented Mar 9, 2026

This has been successfully tested on the following boards:

  • Raspberry Pi 4
  • Raspberry Pi 5
  • ODROID C2
  • Raspberry Pi Pico 2 W running MicroPython
  • Feather RP2040 with RP2040_U2IF Firmware
  • Binho Nova

Once merged, this should be a major release update.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question. Looks like a good clean up!

@makermelissa
Copy link
Collaborator Author

I refactored the microcontroller import code. I left the board import code the same as it is a slightly simpler format. I retested on MicroPython and a Pi 5. Everything else should work just fine if those 2 are passing.

@makermelissa makermelissa requested a review from tannewt March 11, 2026 20:50
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better. Thanks!

@makermelissa makermelissa merged commit 63fb7ed into adafruit:main Mar 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify board and processor importing

2 participants