Replies: 2 comments 3 replies
-
The Moddable SDK sources are built and placed in an archive. Then the IDF project is build and linked with that archive. You can add include paths to @meganetaaan has been looking at a related issue about how to use manifest to include additional IDF components. |
Beta Was this translation helpful? Give feedback.
-
Also I came up with a different strategy: I can add the function that doing real work and need referencing external IDF components into esp32 main.c file. And call that function from usb_modem.c file, like this: void execute_xs_usb_modem_run(void);
void __xs_usb_modem_run(xsMachine *the) {
printf("------------xs_usb_modem_run-------------\n");
execute_xs_usb_modem_run();
} and main.c #include "usbh_modem_board.h"
static void on_modem_event(
void *arg
, esp_event_base_t event_base
, int32_t event_id
, void *event_data) {
}
void execute_xs_usb_modem_run(void) {
/* Initialize modem board. Dial-up internet */
static modem_config_t _modem_config = MODEM_DEFAULT_CONFIG();
modem_board_init(&_modem_config);
} Since Still not pretty... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to add usb modem from here:
https://github.com/espressif/esp-iot-solution/tree/master/examples/usb/host/usb_cdc_4g_module/
Since this ESP-idf "component" depends on multiple other components, the porting is not trival.
Here is what I did:
moddable/build/devices/esp32/xsProj-esp32s3/main
moddable/tools/mcconfig/make.esp32.mk
file, to make it copy idf_component.yml file to the target project build folderAnd I then I was trying to create a module
drivers/usb_modem/
to call the function from JS code. I created a C fileusb_modem.c
. But I found that file in c was not bulit as part of esp-idf project, so#include "usbh_modem_board.h"
does not work anymore.I wonder how to setup the correct build dependency (basically the include path and macros) for those source file in a module?
Beta Was this translation helpful? Give feedback.
All reactions