microbit-foundation / micropython-microbit-v2

Temporary home for MicroPython for micro:bit v2 as we stablise it before pushing upstream
MIT License
41 stars 22 forks source link

neopixel/ws2812 timings #161

Closed microbit-carlos closed 8 months ago

microbit-carlos commented 8 months ago

There is a wide range of ws2812 LEDs with slightly different timings and the CODAL version in the MicroPython v.2.1.1 release doesn't work with all of them:

This has been fixed in CODAL's PR https://github.com/lancaster-university/codal-nrf52/pull/47, but to do a low-risk v2.1.2 release we can apply the patch directly to v2.1.1 as done in: https://github.com/microbit-foundation/micropython-microbit-v2/compare/v2.1.1...0697c6d5b035e9369d3f2142b1d7a4cbe2301b11

microbit-carlos commented 8 months ago

Okay, so I could not successfully trigger a new docker build of the MicroPython builds we have in https://github.com/microbit-foundation/micropython-build-env, because some pinned dependencies don't seem to be available in the ubuntu package repositories. I'll need to look into that issue and fix it in a future date, but in the meantime I've created a v2.1.2 build by using the docker image created as part of the v2.1.1 build.

I was hoping to be able to checkout the v2.1.x-branch, and re-build with only those changes, but for some reason that didn't triggering re-compilation for the codal-nrf52 files and ended up with a build with the only change being the version string.

Nevertheless, doing a clean build worked correctly, and there wasn't significant changes in the build output (sometimes, even with small changes, the compiler applies optimisation levels differently and/or moves things around, when so a binary/hex comparison is not easy).

The final hex output only contains 4 changes, so that made it really easy to verify everything else should be exactly the same. Which is important as I was hoping to be able to avoid having to run a lot of manual tests.

The v2.1.2 hex file can be downloaded from the GitHub release https://github.com/microbit-foundation/micropython-microbit-v2/releases/tag/v2.1.2 and will be added to the Python Editor soon.

The changes in the hex file are:

microbit-carlos commented 8 months ago

@dpgeorge @jimmo v2.1.2 of MicroPython for micro:bit V2 has been deployed to https://python.microbit.org

jimmo commented 8 months ago

Thanks @microbit-carlos!! :)