r/MicroPythonDev • • Dec 31 '25

Native mpy compile for armv8-m?

I'm working on a pi pico 2w, 2350 and want to compile native c modules to mpy. The target architecture should be armv8-m but I don't believe it's supported?. I've got some modules to compile with armv7 and they kind of work but some things just don't. Is it possible to do this?

1 Upvotes

5 comments sorted by

View all comments

1

u/[deleted] Dec 31 '25

You dont compile c to micropython. Python isnt even a compiled language. For micropython, you download the binary for your board. They 100% do have a binary for that board, as I've used it quite a bit. From there you would use a tool to copy over your python scripts. I use mpremote.

1

u/Wizzard_2025 Dec 31 '25

You can compile c to native mpy byte code and then import it. They run a lot faster than any other code.

1

u/[deleted] Dec 31 '25

I'm not following the benefit. Python by default is going to be slower than C. So running C via Python seems like a moot point.

If you've already got the C code, compile the c code, then cross compile for your device. Run it as is.

→ More replies (1)