MPY-cross Pi Pico Build V.18 conflict between ARCH values?
Posted: Tue Feb 22, 2022 3:30 pm
(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.
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.