Skip to content

Commit

Permalink
MicroPython: Switch module to builtin.
Browse files Browse the repository at this point in the history
HACK: Use a tweaked MicroPython source to include all module functions as builtins.

Eliminate the requirement for "from picosystem import *".

MUCH faster access to methods which are now allocated on the QSTR module pool.

* Remove all functions from the "picosystem" module.
* Remove "STATIC" from all function definitions- allow them to be access by MPY build.
* Update CI to target experimental/picosystem branch of MicroPython
  • Loading branch information
Gadgetoid committed Oct 20, 2021
1 parent cbd2fad commit c97d2ab
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 270 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/micropython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: pimoroni/micropython
ref: board/rp2/pimoroni_picosystem #${{env.MICROPYTHON_VERSION}}
ref: experimental/picosystem #${{env.MICROPYTHON_VERSION}}
submodules: false # MicroPython submodules are hideously broken
path: micropython

Expand Down Expand Up @@ -74,16 +74,18 @@ jobs:
working-directory: micropython/ports/rp2
run: make USER_C_MODULES=../../../picosystem-${GITHUB_SHA}/micropython/modules/micropython.cmake BOARD=${BOARD_TYPE} -j2

- name: Rename .uf2 for artifact
- name: Rename .uf2 for artifact & release
shell: bash
working-directory: micropython/ports/rp2/build-${{env.BOARD_TYPE}}
run: cp firmware.uf2 ${{github.event.repository.name}}-${{github.event.release.tag_name}}-micropython-${{env.MICROPYTHON_VERSION}}.uf2
run: |
cp firmware.uf2 ${{github.event.repository.name}}-${{github.sha}}-micropython-${{env.MICROPYTHON_VERSION}}.uf2
cp firmware.uf2 ${{github.event.repository.name}}-${{github.event.release.tag_name}}-micropython-${{env.MICROPYTHON_VERSION}}.uf2
- name: Store .uf2 as artifact
uses: actions/upload-artifact@v2
with:
name: ${{github.event.repository.name}}-${{ github.sha }}-micropython-${{env.MICROPYTHON_VERSION}}.uf2
path: micropython/ports/rp2/build-${{env.BOARD_TYPE}}/${{github.event.repository.name}}-${{github.event.release.tag_name}}-micropython-${{env.MICROPYTHON_VERSION}}.uf2
name: ${{github.event.repository.name}}-${{github.sha}}-micropython-${{env.MICROPYTHON_VERSION}}.uf2
path: micropython/ports/rp2/build-${{env.BOARD_TYPE}}/${{github.event.repository.name}}-${{github.sha}}-micropython-${{env.MICROPYTHON_VERSION}}.uf2

- name: Upload .uf2
if: github.event_name == 'release'
Expand Down
Loading

0 comments on commit c97d2ab

Please sign in to comment.