How to create a dynamic module in C++ for ESP32 using ESP-IDF #12565
Unanswered
moefear85
asked this question in
Core Development
Replies: 1 comment
-
@moefear85 This isn't supported because the functions you want aren't actually linked into the MicroPython firmware (and the loader has no way to map them). In theory, the native .mpy file could actually include the relevant code itself (e.g. from the IDF), but in general this won't work because it will itself need to link against the stuff that is already in the firmware. See #5711 for more history and context on this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
There are alot of tutorials on how to create a static and dynamic library (.mpy file). But none of the examples ever reference any components of the sdk of the MCU being targeted (for the case of dynamic libraries). So I'm trying to include esp_wifi.h from the esp-idf sdk. But it seems esp-idf is pure cmake, while dynamic modules are pure make. I have a Makefile that looks like this:
But if I add
#include "esp_wifi.h"
at the top of factorial.c, I get an error about includes not found. Is it even possible to achieve what I want, or do I have to compile it into the firmware? I tried addingCFLAGS+= -I...
but that just eventually opens up a can of worms.Beta Was this translation helpful? Give feedback.
All reactions