-
Notifications
You must be signed in to change notification settings - Fork 1.3k
MicroPython external C modules #1752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Nothing was removed. Could you point to the MicroPython PR you have in mind? You're talking about a runtime import of a native module, not a module precompiled into the firmware, right? We haven't merged from upstream in several months. |
OK, thought you were talking about micropython#1627 or similar. That PR is after our last merge from micropython. I see this is a build-convenience mechanism: you still need to know how to implement native modules. Our build structure is slightly different these days, so there would need to be some changes on the original MicroPython PR. If you'd like to work on a PR, that would be fine, maybe with a sample module as well. Do you have an existing specialized module you're trying to compile in? |
PR is #1754, for test you can see USER_C_MODULES |
unzip into root folder of circuitpython: MBP-di-Damiano:~/projects/circuitpython$ make -j12 BOARD=pca10059 SD=s140 USER_C_MODULES=$(pwd)/cmodules -C ports/nrf/
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
Including User C Module from /Users/damianomazzella/projects/circuitpython/cmodules/example usage: Adafruit CircuitPython 4.0.0-beta.6-43-gb9e37818e-dirty on 2019-04-05; PCA10059 nRF52840 Dongle with nRF52840
>>>
>>>
>>> import example
>>> example.
__class__ __name__ add_ints
>>> example.add_ints(1, 2)
3
>>> |
thanks for merge #1754 |
why build MicroPython external C modules capability was removed?
interest in a PR for it?
The text was updated successfully, but these errors were encountered: