Search found 12 matches

by Keja
Sat May 01, 2021 2:13 pm
Forum: Development of MicroPython
Topic: c++ for module development
Replies: 5
Views: 5393

Re: c++ for module development

hello,
I'm trying to do something similar also on ESP32 with a mix of cpp cc files.
The link to step4 is dead, could you detail a bit ?
Thank you
by Keja
Sun Apr 25, 2021 3:56 pm
Forum: MicroPython pyboard
Topic: Deploy external SDK on Pyboard
Replies: 0
Views: 2898

Deploy external SDK on Pyboard

Hello, Is it possible to deploy an external SDK with both C and C++ files? I have deployed custom C modules with a couple of C files on either a port or via .mpy files but this seems a much harder task to do and I'm not even sure it's possible . The makefile (I removed the flags and all the files na...
by Keja
Sat Apr 24, 2021 8:14 am
Forum: General Discussion and Questions
Topic: Help interfacing with C function and input parameters format
Replies: 13
Views: 6938

Re: Help interfacing with C function and input parameters format

just for information PR#7154 adds mp_obj_get_array to the dynamic runtime and it now also compiles fine with it.
thanks again for helping
by Keja
Fri Apr 23, 2021 7:24 pm
Forum: General Discussion and Questions
Topic: Help interfacing with C function and input parameters format
Replies: 13
Views: 6938

Re: Help interfacing with C function and input parameters format

I ended up compiling a C module instead and it works :)
thank you , your help is much appreciated
by Keja
Fri Apr 23, 2021 4:09 pm
Forum: General Discussion and Questions
Topic: Help interfacing with C function and input parameters format
Replies: 13
Views: 6938

Re: Help interfacing with C function and input parameters format

thanks, it helps a lot. With your suggestion when I compile I now get : GEN build/modrun.config.h CC modrun.c LINK build/modrun.o LinkError: build/modrun.o: undefined symbol: mp_obj_get_array make: *** [build/modrun.native.mpy] Error 1 my makefile : MPY_DIR = ../../.. # Name of module MOD = modrun #...
by Keja
Fri Apr 23, 2021 11:29 am
Forum: General Discussion and Questions
Topic: Help interfacing with C function and input parameters format
Replies: 13
Views: 6938

Re: Help interfacing with C function and input parameters format

hello, I have tried your second recommendation but I get the following error at compilation : modrun.c:37:37: error: request for member 'items' in something not a structure or union 37 | cfeatures[i]=mp_obj_get_int(features->items[i]); my C code looks like this : STATIC mp_obj_t get_list(mp_obj_t py...
by Keja
Thu Apr 22, 2021 4:18 pm
Forum: General Discussion and Questions
Topic: Help interfacing with C function and input parameters format
Replies: 13
Views: 6938

Re: Help interfacing with C function and input parameters format

thank you , what you wrote makes sense and will try it right away. Regarding your first question I was referring to dhylands answer on this topic : "If you're going to pass each of arg1, arg2, arg3 as array objects, then your function declaration should look like: STATIC mp_obj_t mymod_foo(const mp_...
by Keja
Wed Apr 21, 2021 7:12 pm
Forum: General Discussion and Questions
Topic: Help interfacing with C function and input parameters format
Replies: 13
Views: 6938

Re: Help interfacing with C function and input parameters format

Hello, I have a similar use case where I want to pass a list of floats to a C functions. I have a few questions : 1. In the function declaration below : STATIC mp_obj_t mymod_foo(const mp_obj_t arg1, const mp_obj_t arg2, const mp_obj_t arg3); why we need to use const mp_obj_t arg1 and not mp_obj_t a...
by Keja
Mon Jan 25, 2021 7:16 pm
Forum: MicroPython pyboard
Topic: Multiple Pyboard update on MAC
Replies: 7
Views: 3232

Re: Multiple Pyboard update on MAC

Is it possible to use the tools you mentioned in parrallel of picocom (this is what I use for the REPL) ? I need access the REPL on both pyboards to make my tests. I also have some WiPys and LoPys boards for which I use Pymakr Atom plugin and it's quite handy to update new code and have access at th...
by Keja
Sat Jan 23, 2021 5:35 pm
Forum: MicroPython pyboard
Topic: Multiple Pyboard update on MAC
Replies: 7
Views: 3232

Re: Multiple Pyboard update on MAC

thank you , that did the trick :)