pimoroni / badger2040

Examples and firmware for Badger 2040 and Badger 2040 W
MIT License
150 stars 50 forks source link

Need method to compile micropython locally #12

Open cpottle9 opened 1 year ago

cpottle9 commented 1 year ago

I need a way to compile my own micropython interpreter for badger2040W locally (raspberry PI 4). Specifically, there is a pull request in the main micropython repo I need that has not been merged. It is https://github.com/micropython/micropython/pull/10803.

I was able to figure out how to do this about 3 weeks ago when the micropython interpreter was built out of pimoroni-pico. I am also building micropython for inkyframe 4.0 out of pimoroni-pico.

Ideally, Pimoroni needs to put your code in the main Micropython Project repo. This process of needing code from 3 different repo that lineup is problematic.

I know you will give up some control over when your changes get merged. But life will be simpler for anyone make changes to micropython for your platforms.

Note: I had discussions on Pimoroni forums about there here https://forums.pimoroni.com/t/compile-micropython-from-source-for-badger-2040w-and-inky-frame-4-0/21683

Gadgetoid commented 1 year ago

Ideally, Pimoroni needs to put your code in the main Micropython Project repo. This process of needing code from 3 different repo that lineup is problematic.

This wont happen. We're not writing general use features for MicroPython, but building very product-specific firmware on top of MicroPython.

The GitHub Actions workflow more or less documents the process of building MicroPython + our modules locally - https://github.com/pimoroni/badger2040/blob/main/.github/workflows/micropython.yml

If you don't want or need a local copy to gain the feature you link, then you can clone this repository and tweak the workflow to target the relevant MicroPython branch or add a step to apply the patch you need and GitHub will crank out builds for you.

cpottle9 commented 1 year ago

I've written bash scripts to clone the necessary repo's and set them up so I run make in ports/rp2 to build micropython for badger2040w or inky_frame. That is 3 repos for badger2040w and 2 repos for inky_frame

I would be willing to create pull request to submit these scripts. If you agree, let me know where you think the scripts should go.