Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: external modules #1778

Closed
proddy opened this issue May 28, 2024 · 8 comments
Closed

Feature: external modules #1778

proddy opened this issue May 28, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request technical Technical enhancement, or tech-debt issue
Milestone

Comments

@proddy
Copy link
Contributor

proddy commented May 28, 2024

Created an extension where external modules can be coded, compiled and the library file (.a) dropped into EMS-ESP which will pick it up automatically. This allows 3rd parties to build on top of EMS-ESP safely.

The first prototype is done at https://github.com/emsesp/EMS-ESP-Modules and I'll include in v3.7 but won't have them as activated.

The extra module uses 900 bytes of extra Flash, so it's not intrusive either.

The feature branch is https://github.com/emsesp/EMS-ESP32/tree/feat_modules

@proddy proddy added this to the v3.7.0 milestone May 28, 2024
@proddy proddy added enhancement New feature or request technical Technical enhancement, or tech-debt issue labels May 28, 2024
@proddy proddy self-assigned this May 28, 2024
@proddy
Copy link
Contributor Author

proddy commented May 30, 2024

image

@proddy
Copy link
Contributor Author

proddy commented Jun 8, 2024

Added the license manager and optimized a few things. I think this is ready to be merged into dev.

@proddy proddy closed this as completed Jun 11, 2024
@MichaelDvP
Copy link
Contributor

Seems to be broken in github actions:

linking .pio/build/ci/firmware.elf
/home/runner/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/ci/src/web/WebModulesService.cpp.o:(.literal._ZN6emsesp10WebModules4readERS0_N11ArduinoJson8V710PB2210JsonObjectE+0x18): undefined reference to `ModuleLibrary::list(ArduinoJson::V710PB22::JsonObject)'
/home/runner/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/ci/src/web/WebModulesService.cpp.o: in function `ArduinoJson::V710PB22::detail::VariantTo<ArduinoJson::V710PB22::JsonObject>::type ArduinoJson::V710PB22::JsonDocument::to<ArduinoJson::V710PB22::JsonObject>()':
/home/runner/work/EMS-ESP32/EMS-ESP32/.pio/libdeps/ci/ArduinoJson/src/ArduinoJson/Document/JsonDocument.hpp:150: undefined reference to `ModuleLibrary::list(ArduinoJson::V710PB22::JsonObject)'
collect2: error: ld returned 1 exit status
*** [.pio/build/ci/firmware.elf] Error 1

@proddy
Copy link
Contributor Author

proddy commented Jun 28, 2024

Thanks. It's because the ArduinoJson namespace's don't match, which are dynamically generated (like V710PB22). I'm not sure why it's broken again. I'll look into it.

@proddy
Copy link
Contributor Author

proddy commented Jun 28, 2024

fixed.

@MichaelDvP
Copy link
Contributor

A few days ago compile failed for esp32C3 because of missing modules lib.
The c3 is always 4M, maybe we can skip the modules. But than we need a define to exclude from code.
For esp32, esp32s2 and esp32s3 it seems to work, it's all Xtensa code, but LX6 for esp32 and LX7 for S2/S3

@proddy proddy reopened this Jul 22, 2024
@proddy
Copy link
Contributor Author

proddy commented Jul 22, 2024

I need to think of a way to do that. I can compile to C3 and add include it, or just skip the linking for 4MB variants.

I was only focused on the two BBQKees boards - the ESP32 16M and the ESP32-S3 16M

@proddy
Copy link
Contributor Author

proddy commented Jul 23, 2024

think it should work now. I build libs for each BOARD_MCU

@proddy proddy closed this as completed Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request technical Technical enhancement, or tech-debt issue
Projects
None yet
Development

No branches or pull requests

2 participants