Skip to content

Add DualMCU RP2040 board support#19218

Open
Cesarbautista10 wants to merge 2 commits into
micropython:masterfrom
Cesarbautista10:feature/dualmcu-rp2040
Open

Add DualMCU RP2040 board support#19218
Cesarbautista10 wants to merge 2 commits into
micropython:masterfrom
Cesarbautista10:feature/dualmcu-rp2040

Conversation

@Cesarbautista10
Copy link
Copy Markdown

Summary

Add MicroPython board support for the UNIT Electronics DualMCU RP2040 + ESP32 development board.

This adds a dedicated RP2040 board definition with default pins for:

  • LED on GPIO25
  • UART REPL on GPIO0 / GPIO1
  • I2C0 on GPIO12 / GPIO13
  • SPI0 on GPIO18 / GPIO19 / GPIO20 / GPIO21

It also adds board metadata and enables the board in the RP2 CI build.

Testing

Built locally on the RP2 port:

  • make -C mpy-cross
  • make -C ports/rp2 BOARD=DUALMCU_RP2040 submodules
  • make -C ports/rp2 BOARD=DUALMCU_RP2040

Verified build outputs:

  • ports/rp2/build-DUALMCU_RP2040/firmware.elf
  • ports/rp2/build-DUALMCU_RP2040/firmware.uf2

Also tested the onboard LED on physical hardware from the MicroPython REPL on the DualMCU RP2040.

Trade-offs and Alternatives

This adds a small amount of board-specific configuration and one extra RP2 CI build. The trade-off is worthwhile because it provides a dedicated firmware build for the board and helps catch regressions automatically.

An alternative would be to reuse a generic RP2040 board definition, but that would not reflect the board's default pinout or metadata.

Generative AI

I used generative AI tools when creating this PR, but a human has checked the code and is responsible for the code and the description above.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.47%. Comparing base (7d77d3e) to head (d5ad660).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19218   +/-   ##
=======================================
  Coverage   98.47%   98.47%           
=======================================
  Files         176      176           
  Lines       22845    22845           
=======================================
  Hits        22497    22497           
  Misses        348      348           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Code size report:

Reference:  tests/run-tests.py: Skip string_escape.py as an mpy if no unicode. [200db69]
Comparison: tools/ci: Remove CI build entry for DUALMCU_RP2040 board. [merge of e3a4cc3]
  mpy-cross:    +0 +0.000% 
   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
      esp32:    +0 +0.000% ESP32_GENERIC
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

@Cesarbautista10 Cesarbautista10 force-pushed the feature/dualmcu-rp2040 branch from dbb0090 to a923c74 Compare May 13, 2026 23:06
Add support for the UNIT Electronics DualMCU RP2040 + ESP32 board.

Configure default UART, I2C, and SPI pins from the board pinout.
Add board metadata and include this board in rp2 CI builds.

Signed-off-by: GitHub Actions <cesar.bautista@uelectronis.com>
@Cesarbautista10 Cesarbautista10 force-pushed the feature/dualmcu-rp2040 branch from a923c74 to d5ad660 Compare May 13, 2026 23:08
Comment thread tools/ci.sh Outdated
make ${MAKEOPTS} -C mpy-cross
make ${MAKEOPTS} -C ports/rp2 submodules
make ${MAKEOPTS} -C ports/rp2
make ${MAKEOPTS} -C ports/rp2 BOARD=DUALMCU_RP2040
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not all boards need to be built in CI as this would take too much time.

As this board definition does not add code, but only configuration, I don't think this is needed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the review.
That makes sense. I’ve removed the additional CI build entry for the board.

@Josverl Josverl added the board-definition New or updated board definition files. Combine with a port- label. label May 14, 2026
@Cesarbautista10 Cesarbautista10 force-pushed the feature/dualmcu-rp2040 branch 3 times, most recently from 2e6355d to f2d0729 Compare May 14, 2026 14:33
Remove the extra CI build line for the DUALMCU_RP2040 board, as
requested in review.

Signed-off-by: GitHub Actions <cesar.bautista@uelectronis.com>
@Cesarbautista10 Cesarbautista10 force-pushed the feature/dualmcu-rp2040 branch from f2d0729 to e3a4cc3 Compare May 14, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

board-definition New or updated board definition files. Combine with a port- label.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants