Skip to content

Crash when using @micropython.native decorator #7966

Open
@rdlaner

Description

@rdlaner

CircuitPython version

Adafruit CircuitPython 8.1.0-beta.2-2-g057c152d6-dirty on 2023-05-10; BPI-Leaf-S3 with ESP32S3

Code/REPL

>>> @micropython.native
... def test_fxn():
...     print("This is a test fxn")
...
...
...
>>> test_fxn()

Behavior

Device crashes immediately after above code w/o any output. Upon reconnection I see the following message:

Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Fault detected by hardware.
Please file an issue with your program at https://github.com/adafruit/circuitpython/issues.
Press reset to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.

Description

I've tried using the @micropython.native decorator in a variety of different ways from frozen code to using the repl. Each time, it crashes my device. In the mpconfigboard.mk file I have added the following definition which I thought should have allowed for this decorator to work:

CIRCUITPY_ENABLE_MPY_NATIVE = 1

Does CircuitPython not support the native and viper emitters for the esp32-s3?

Additional information

I'm also building the latest 8.1.0 beta, but I haven't yet tried an older version since I need espnow for my project.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions