The esp_hosted repository
https://github.com/espressif/esp-hosted-mcu contains the folder 'slave' which contains the firmware code to run on the wifi-enabled esp32 soc. It has its own readme which instructs to use it like an example, so it can be copied into a new project by calling
Code: Select all
idf.py create-project-from-example "espressif/esp_hosted:slave"
however, it seems to rather be structured like its own component as it has no dependency on esp_hosted and instead just copies esp_hosted's 'common' folder through CMake I guess. It has a kconfig.projbuild variable ESP_HOSTED_COPROCESSOR_APP_MAIN which allows to not compile the app_main in esp_hosted_processor.c, which would be useful to supply one's own app_main if that slave code actually was its own component.
So when creating a customized esp_hosted slave firmware, the suggested way seems to be to copy the code into a new project using
Code: Select all
idf.py create-project-from-example "espressif/esp_hosted:slave"
and then modify that project. But that makes ESP_HOSTED_COPROCESSOR_APP_MAIN irrelevant and the biggest issue is that it makes updating the project to new versions of the esp_hosted repository more cumbersome.
So my question is, is there a way to use espressif/esp_hosted:slave as its own component in a new project?
I tried to add this to my idf_component.yml:
Code: Select all
dependencies:
espressif/esp_hosted:slave:
version: "*"
or
Code: Select all
dependencies:
espressif/esp_hosted/slave:
version: "*"
but neither seems to be valid syntax. What's the best way to do this?