Skip to content
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

Support for MicroPython 1.21 #25

Open
robofwy opened this issue Nov 9, 2023 · 5 comments
Open

Support for MicroPython 1.21 #25

robofwy opened this issue Nov 9, 2023 · 5 comments

Comments

@robofwy
Copy link

robofwy commented Nov 9, 2023

Is it possible to build MicroPython v1.21 with support for CANPico for the Pico W?

I would like to build a project that uses both BLE and CAN. v1.21 is required for BLE support on the Pico W but the latest firmware appears to be built on v1.19.

Otherwise, I will have to use the C API I guess.

Any help would be appreciated.

@kentindell
Copy link
Owner

I have an internal 1.20 build already, so I'll look at bumping it to 1.21. If there aren't huge changes then I'll make a beta build for testing and drop it here.

@robofwy
Copy link
Author

robofwy commented Nov 9, 2023

Thanks for that.

I have managed to build v1.21.0 (without patching it) on a 32-bit Debian host for the RPI_PICO_W board and everything seems to work except Bluetooth/BLE which causes it to lock up. The resultant firmware uf2 file is a different size to the one available from https://micropython.org/download/RPI_PICO_W so I am not sure what is wrong there. picotool shows the same output for both.

If I build the latest v1.22 master/preview, everything (including BLE) seems to work.

@robofwy
Copy link
Author

robofwy commented Nov 10, 2023

I found out that this is a known issue with BLE on the Pico W with v1.21.0. If built with Arm GCC v12.3 or newer, it works ok. The version that Debian installs is v12.2.1 which does not work.

Using a 64-bit Debian host and downloading the Arm GNU Toolchain from https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads (x86_64 arm-none-eabi) and building with that fixes the problem but a better fix is to either increase the stack size in boards/RPI_PICO_W/mpconfigboard.cmake (e.g. to 5120) or to apply the patch https://github.com/micropython/micropython/pull/12647/files.

@Miki-AG
Copy link

Miki-AG commented Apr 1, 2024

Hi @kentindell is the 1.20 build available somewhere?

@kentindell
Copy link
Owner

Now updated for v1.22.2. It's in CANPico/firmware. Please try it out and see if you can build it - I might have forgotten a file (getting this to drop over the top of the upstream requires some delicate surgery).

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

No branches or pull requests

3 participants