(I had posted on GitHub issues - I'm a newbie in the context of proper protocols for posting - please correct me if I've overstepped!)
I'm looking at code execution vs development overhead for an upcoming class - was comparing .mpy options on Pico using factorial under /natmod/features0/ in V1.18.
Followed the mods required to create .mpy module from c source - worked well with edits to identify archv6. Compared to python script running factorial. Then looked at mpy-cross applied to python script - was able to produce a "stock" python based .mpy file to deploy.
Tried to look at using @micropython.native decorator to compare speed difference: in the .py script was easily done, and noticeable improvement. But was unable to create a functioning .mpy using either the decorator in the script running through mpy-cross, or by using the emit=native directive to mpy-cross. If I selected "arch= armv6" - the repl would indicate incompatible version. Running the sys info utility returns
"mpy version: 5
mpy flags: -march=armv7m"
For a stock Pico loaded with V1.18 dfu from micropython site. If I produce the .mpy file with the mpy-cross options set to armv7m, the execution hangs and requires a hard reset.
Am I doing something wrong, or is the Pico somehow mis-representing itself as an M4 instead of M0 architecture?
DougW.
MPY-cross Pi Pico Build V.18 conflict between ARCH values?
-
- Posts: 6
- Joined: Mon Feb 21, 2022 4:57 pm
- Location: Saskatchewan, Canada
Re: MPY-cross Pi Pico Build V.18 conflict between ARCH values?
You might want to look at https://github.com/micropython/micropyt ... -894002358
But to summarize, mpy-cross does not support armv6m architecture. Jim did a branch for prelimenary support of this (also linked above) that I tested. It worked, however there it was not merged upstream. You might chime in this issue to give it a bit higher prio
But to summarize, mpy-cross does not support armv6m architecture. Jim did a branch for prelimenary support of this (also linked above) that I tested. It worked, however there it was not merged upstream. You might chime in this issue to give it a bit higher prio
-
- Posts: 6
- Joined: Mon Feb 21, 2022 4:57 pm
- Location: Saskatchewan, Canada
Re: MPY-cross Pi Pico Build V.18 conflict between ARCH values?
Thanks! I will look into. Sorry for the newbie question - but how do I support consideration of the "fix" for this - do I reply to the post in the link on Git Hub?
Thanks again!
Doug W
Thanks again!
Doug W
Re: MPY-cross Pi Pico Build V.18 conflict between ARCH values?
yes, update the github issue would be the way to go.
Re: MPY-cross Pi Pico Build V.18 conflict between ARCH values?
Yep that's right -- https://github.com/micropython/micropython/issues/7616 was fixed (which addresses this issue).