External C module in Pumbaa

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
JosefPeter
Posts: 1
Joined: Mon Nov 23, 2020 7:15 pm

External C module in Pumbaa

Post by JosefPeter » Mon Nov 23, 2020 7:30 pm

Hi everybody,

I use Pumbaa in Platformio and it is great thing. But I failed to include a external C module.

In my project I need to generate sine waves with up to 30 kHz on the Dac and measure the amplitude and phase with the Adc.
That´s only possible in an external C module what I want to call in MicroPython.

Has anybody experience with including external C code in Pumbaa?
And does anybody of you know how to generate the file "qstrdefs.generated.h" &"qstrdefs.preprocessed.h" ?

Thank you for helping me!!!!
Josef

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: External C module in Pumbaa

Post by jimmo » Mon Nov 23, 2020 11:39 pm

JosefPeter wrote:
Mon Nov 23, 2020 7:30 pm
Has anybody experience with including external C code in Pumbaa?
I don't know much about Pumbaa. Can you described more about how you added your C module.

In upstream MicroPython, the process is described here https://docs.micropython.org/en/latest/ ... dules.html although I suspect in order to work inside PlatformIO that Pumbaa is probably using its own build system (or a heavily modified version of MicroPython's build system).

The other thing is that (unless I'm looking in the wrong place) Pumbaa seems to have not been updated for a long time and in particular is based on a four-year old version of MicroPython.
JosefPeter wrote:
Mon Nov 23, 2020 7:30 pm
And does anybody of you know how to generate the file "qstrdefs.generated.h" &"qstrdefs.preprocessed.h" ?
This is described in http://docs.micropython.org/en/latest/develop/qstr.html

It's...not straightforward, but hopefully those docs give you a starting point where to look in the MicroPython makefiles to see how this is done.

Post Reply