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

Add support for esp-idf #265

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Conversation

NeroReflex
Copy link

ESP32 platform requires the usage of linux sockets with FreeRTOS primitives alongside the usage of idf_component_register.

Split the code in MQTTFreeRTOS and MQTTLinux to be able to use the Linux network code with the FreeRTOS OS primitives handling.

Also modify the CMake file so that the only required step is to clone the repo in the project components directory.

Add a forward declaration for the implementation-dependant Timer struct to avoid build failures on the ESP32.

Signed-off-by: Denis Benato <[email protected]>
Platforms using LwIP needs to use the "linux" implementation of networking.

Not every platform using LwIP has support for every linux primitives/syscalls (such as signal).

To allow the adoption in these kind of devices split the network from OS primitives.

Signed-off-by: Denis Benato <[email protected]>
The esp-idf SDK requires components (including the main software sources) to be declared with idf_component_register: use that if ESP_PLATFORM is detected.

Signed-off-by: Denis Benato <[email protected]>
The lwIP library does not generate SIGPIPE and platforms supporting lwIP might not have a valid implementation of signal: avoid using signal in these circumstances.

Signed-off-by: Denis Benato <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant