Skip to content

rp2/boards: Add WEACTSTUDIO boards with BOARD_VARIANT to select the flash size #8505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 26, 2022

Conversation

mattytrentini
Copy link
Contributor

This is adding a board definition for the Wavgat Pico Board RP2040. This is for the 16MB version; once this PR is in good shape I'll create the 2/4/8 MB versions too.

Note that lib/mbedtls has been added as a submodule; this has nothing to do with this board - it appears to be necessary for the rp2 port?

Also of note: I'm not aware of any VID/PID for the Wavgat boards so I left these defines out. It seems to work but I'm not sure that's the right thing to do...?

Finally, it was somewhat unexpected that pico-sdk typically has definitions for each supported board. This is the first MicroPython example of a board that is defined outside of the pico-sdk repository (by specifying PICO_BOARD_HEADER_DIRS and creating wavgat_16mb.h locally).

@mcauser
Copy link
Contributor

mcauser commented Apr 8, 2022

I thought Wavgat was more of a reseller than a board fab.
Here's the same board from RQG: https://www.aliexpress.com/item/1005003944981647.html

The form factor reminds me of a WeAct back-pill board, eg: https://www.aliexpress.com/item/1005003658370449.html

Found it on TaoBao: https://item.taobao.com/item.htm?id=671510282412 and https://item.taobao.com/item.htm?id=665800371434
Which links to: https://gitee.com/WeAct-TC/rp2040
Which labels the board: WeAct-RP2040-V1.0
https://github.com/WeActTC/WeActStudio.RP2040CoreBoard

It's a WeAct board. Why don't they put labels on them!

@mcauser
Copy link
Contributor

mcauser commented Apr 8, 2022

... they do

O1CN01g9fYqx1R49RBIrN9e_!!781802057

Looks like this Wavgat board is a clone. In their back side of the board image you can see where they blacked out the WeAct logo:

Screen Shot 2022-04-08 at 5 24 20 pm

@mattytrentini
Copy link
Contributor Author

It's a WeAct board.

So should I rename the board to WeAct? WeActStudio? Any suggestions?
I think the definition would remain intact (except the links to Wavgat should be removed).

@mattytrentini
Copy link
Contributor Author

OK, renamed to WeAct Studio RP2040. Thanks @mcauser!

@mattytrentini mattytrentini changed the title rp2/boards: Add WAVGAT_16MB board. rp2/boards: Add WEACTSTUDIO_16MB board. Apr 17, 2022
@andypiper
Copy link
Contributor

FWIW, I'm currently seeing a build error with this PR:

[  9%] Generating frozen_content.c
MPY uasyncio/core.py
MPY uasyncio/event.py
MPY uasyncio/funcs.py
MPY uasyncio/lock.py
MPY board.py
error freezing mpy ['/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/_boot_fat.mpy', '/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/rp2.mpy', '/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/_boot.mpy', '/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/onewire.mpy', '/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/ds18x20.mpy', '/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/dht.mpy', '/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/uasyncio/__init__.mpy', '/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/uasyncio/core.mpy', '/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/uasyncio/event.mpy', '/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/uasyncio/funcs.mpy', '/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/uasyncio/lock.mpy', '/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/uasyncio/stream.mpy', '/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/neopixel.mpy', '/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/board.mpy']:
/Users/andypiper/Development/third-party/mpy-build/micropython/ports/rp2/boards/build_WEACTSTUDIO_16MB/frozen_mpy/rp2.mpy: corrupt .mpy file

make[2]: *** [frozen_content.c] Error 1
make[1]: *** [CMakeFiles/firmware.dir/all] Error 2
make: *** [all] Error 2

Note that I'm a n00b at building my own firmwares so this could be user error, but I've successfully built a base rp2040, and also a PIMORONI_TINY2040 image.

@mattytrentini
Copy link
Contributor Author

Rebased and tidied up.

It would be good to support the different storage options; should this be done with an optional build parameter? Is there any precedent for this? It doesn't seem to make sense to have completely separate board definitions when the only thing that changes is the flash size...

@mattytrentini mattytrentini changed the title rp2/boards: Add WEACTSTUDIO_16MB board. Draft: rp2/boards: Add WEACTSTUDIO_16MB board. Sep 11, 2022
@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2022

Codecov Report

Merging #8505 (8f16067) into master (0b26efe) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #8505      +/-   ##
==========================================
+ Coverage   98.37%   98.38%   +0.01%     
==========================================
  Files         156      156              
  Lines       20443    20477      +34     
==========================================
+ Hits        20110    20147      +37     
+ Misses        333      330       -3     
Impacted Files Coverage Δ
py/obj.h 100.00% <0.00%> (ø)
extmod/modure.c 100.00% <0.00%> (ø)
py/objpolyiter.c 100.00% <0.00%> (ø)
extmod/vfs_lfsx.c 100.00% <0.00%> (ø)
ports/unix/mpconfigport.h 100.00% <0.00%> (ø)
extmod/vfs_fat.c 96.27% <0.00%> (+0.12%) ⬆️
extmod/vfs_posix.c 93.49% <0.00%> (+2.24%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mattytrentini mattytrentini changed the title Draft: rp2/boards: Add WEACTSTUDIO_16MB board. rp2/boards: Add WEACTSTUDIO boards with BOARD_VARIANT to select the flash size Sep 11, 2022
Following stm32.  This allows a single board definition to define variants
of its configuration.
This supports 2, 4, 8 and 16MB flash variants.
@dpgeorge dpgeorge force-pushed the add-wavgat-rp2-board branch from 8f16067 to bdbc444 Compare September 26, 2022 02:45
@dpgeorge
Copy link
Member

I reorganised the commits into two separate ones and force pushed to this PR's branch. The code is unchanged.

@dpgeorge dpgeorge merged commit bdbc444 into micropython:master Sep 26, 2022
@mattytrentini mattytrentini deleted the add-wavgat-rp2-board branch October 10, 2022 00:25
RetiredWizard pushed a commit to RetiredWizard/micropython that referenced this pull request Nov 16, 2023
…nterrupt

Fixed the RP2040 interrupt problem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants