Search found 110 matches

by v923z
Wed Sep 25, 2019 4:12 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4696

ulab, or what you will - numpy on bare metal

Hi all, As advertised in the first post of https://forum.micropython.org/viewtopic.php?f=3&t=6874, and also under https://micropython-usermod.readthedocs.io/en/latest/usermods_14.html, I am releasing a C module with a numpy-like interface. For a whooping 12 kB of extra flash space, you are going to ...
by v923z
Mon Sep 09, 2019 1:46 pm
Forum: Development of MicroPython
Topic: compiling C modules into loadable shared objects
Replies: 33
Views: 2539

Re: compiling C modules into loadable shared objects

Yes that's also possible, but then the calling code has to know exactly what the function is going to do and create a buffer of the correct size. Certainly doable, but more error prone and increases coupling of the code. Beyond what @jimmo has already pointed out in his last post, the situation is ...
by v923z
Mon Sep 09, 2019 9:48 am
Forum: Development of MicroPython
Topic: compiling C modules into loadable shared objects
Replies: 33
Views: 2539

Re: compiling C modules into loadable shared objects

From my understanding the C function that performs the fft doesn't need access to any of the MP modules (not sure how RAM allocation for the C functions works). Ok I get what you're saying. Such fft example indeed doesn't need much 'internal' things, but just returning a new buffer does mean having...
by v923z
Sun Sep 08, 2019 11:35 am
Forum: Development of MicroPython
Topic: C module programming reference
Replies: 19
Views: 1762

Re: C module programming reference

Hi Jim, I'd love to see this get merged into the main MicroPython documentation, especially the internals part, but I think everything is of interest. Would you be interested in doing this? How can I help? I think, merging into the main micropython documentation would mean at least two things: 1. th...
by v923z
Fri Sep 06, 2019 5:20 pm
Forum: Development of MicroPython
Topic: compiling C modules into loadable shared objects
Replies: 33
Views: 2539

Re: compiling C modules into loadable shared objects

I am wondering if it is possible to build into the .mpy file something that identifies whether it has port/arch pacific code. Then if an mpy file is called from an in correct port it can through an error. I believe that's possible - and I agree it should be done - but it shouldn't get to that point...
by v923z
Thu Sep 05, 2019 7:07 pm
Forum: Development of MicroPython
Topic: C module programming reference
Replies: 19
Views: 1762

Re: C module programming reference

Hi all,

I hope this is not getting overwhelming, but I have added a short section on how to work with string, and bumped the documentation version to 1.3. https://micropython-usermod.readthedocs ... index.html

Cheers,
Zoltán
by v923z
Thu Sep 05, 2019 5:30 pm
Forum: Development of MicroPython
Topic: compiling C modules into loadable shared objects
Replies: 33
Views: 2539

Re: compiling C modules into loadable shared objects

mattyt wrote:
Wed Sep 04, 2019 11:32 pm
Damien's talk on Native Modules in MicroPython (part 2) is now online. The video quality isn't great - the screen in particular is difficult to read - but hopefully it's good enough to be useful.
Thanks for your efforts!

Zoltán
by v923z
Wed Sep 04, 2019 6:43 pm
Forum: Development of MicroPython
Topic: compiling C modules into loadable shared objects
Replies: 33
Views: 2539

Re: compiling C modules into loadable shared objects

First of all, thanks to everyone, who has chipped in. Really enlightening discussion and comments. A couple of concrete issues: Yes - this feature is being actively worked on. Damien actually gave a demo of this last week at the Melbourne MicroPython Meetup (an updated version of the video linked ea...
by v923z
Wed Sep 04, 2019 6:29 pm
Forum: Development of MicroPython
Topic: C module programming reference
Replies: 19
Views: 1762

Re: C module programming reference

@pythoncode Peter, I have modified the source of the documentation as you suggested. I hope it is more readable now. I agree, the jupyter stuff was misleading. perhaps the Jupyter/IPython/Sphinx content warrants a separate doc, with some advocacy explaining exactly what they offer the MicroPython de...
by v923z
Tue Sep 03, 2019 5:50 pm
Forum: Development of MicroPython
Topic: C module programming reference
Replies: 19
Views: 1762

Re: C module programming reference

Greetings Peter, @v923z That's a great piece of work, an excellent explanation with really good code examples. :D Just one comment. The Jupyter/IPython/Sphinx content at the start is quite daunting. The information on generating the documentation, while useful, isn't needed for those reading the doc...