Where can we find information about the inline assembler for Pico?

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
cebersp
Posts: 30
Joined: Mon Feb 08, 2021 12:07 pm

Re: Where can we find information about the inline assembler for Pico?

Post by cebersp » Wed Mar 03, 2021 2:24 pm

Yes, I learned rp2040 is ARMv6. These things are new for me and the distribution of information is confusing for me.

Thanks you very much that you have made available such wealth of good information in you github, Peter. Great!!!
(I have studied your fft and filter code, at the moment I use Goertzel, which is fast enough in microPython for only a few frequencies.)

User avatar
rdagger
Posts: 143
Joined: Tue Feb 28, 2017 6:16 pm
Contact:

Re: Where can we find information about the inline assembler for Pico?

Post by rdagger » Wed Mar 03, 2021 9:21 pm

I'm getting the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SyntaxError: invalid micropython decorator
I'm using MicroPython v1.14-83-g680ce4532 on 2021-03-03; Espruino Pico with STM32F401CD

My code:

Code: Select all

@micropython.asm_thumb
def inv_int(r0):
    neg(r0,r0)
Sorry I thought this post was for the Espruino Pico (instead of the Pi Pico).
Please disregard. Assembler was removed in commit f1d260d.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Where can we find information about the inline assembler for Pico?

Post by dhylands » Wed Mar 03, 2021 10:04 pm

The Espruino Pico has quite a bit less flash (only 384K) so in order to get things to fit, I imagine a bunch of features were turned off, and the inline assembler is probably one of those things:
https://github.com/micropython/micropyt ... rd.h#L4-L5

Post Reply