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

Experimental ESP-IDF v4 #806

Closed

Conversation

llange
Copy link
Contributor

@llange llange commented Jan 26, 2023

This PR is more or less ready for review.

It aims to bring compatibility with ESP-IDFv4, with the following caveats:

  • the crash handler (xt_set_error_handler_callback and esp_task_wdt_get_trigger_tasknames) is disabled for the moment, we need to decide whether we "fork" ESP-IDF again to port it ; or if the new APIs are enough to (partially ?) reimplement it (see commit: "WIP WIP WIP : comment out ESP-IDF specifics of our fork")
  • There is a crash in OvmsConsole::Poll which I did not analyse (yet) and which I worked around by declaring a variable static (see commit: "WIP WIP WIP : prevent a crash at boot (to be analysed)")
  • I decided to transform our local copies of wolfssh and wolfssl in submodules (and move them one level below in terms of directories) - mainly to be able to have a CMakeLists.txt different from the upstream one. In the process, I "lost" one of our patches : 5144453 and we need to decide how to handle this.
  • A lot of dependencies are now explicitly (hard-)coded in the CMakeLists.txt - which may, or may not be a good thing. Let's discuss it.
  • I had to change a set of defines into a header generation (in ovms_webserver) because I was unable to implement those in a satisfying manner in cmake. If you manage to do it, it's a win !
  • Even if there is experimental support for cmake / idf.py in ESP-IDF 3.3.x, I did not make any effort to be compatible with it, as our v3.3.x fork does not seem to include this build system + It was experimental, the component API changed and I did not want to have edge case for something not used at the moment.

To be able to "test" this PR, you'll need:

  • An ESP-IDF v4 installation (from git) tested and configured, set to branch v4.4.3
  • You may want to apply the following "patch" : git cherry-pick 273633ee310fbc18b17edfaeae3f3121508e3b8d (Which will bring the support for WHOLE_ARCHIVE: espressif/esp-idf@273633e )

Ideally this may need to be broken down for better review - note that you should be able to review commit per commit as I tried to keep them consistent and compilable.

llange added 23 commits February 5, 2023 21:17
`wifi_interface_t` is more or less equivalent to `esp_interface_t` and the
values are the same, however in terms of argument type it's more consistent
to use `wifi_interface_t` for `esp_wifi_set_bandwidth()` and `esp_wifi_get_mac()`

Signed-off-by: Ludovic LANGE <[email protected]>
…DF >= 4

Conditional compilation depending on the ESP-IDF version.

Signed-off-by: Ludovic LANGE <[email protected]>
`xt_set_error_handler_callback` and `esp_task_wdt_get_trigger_tasknames` are
related to crash handling and are only available in our ESP-IDF fork.
We comment them before deciding what to do with it (either reimplement them
in the new ESP-IDF framewok, or make use of the similar and new API
`esp_core_dump_image_get` and `esp_core_dump_get_summary`).

Signed-off-by: Ludovic LANGE <[email protected]>
…tor" for ESP-IDF >= 4 (followup)

Conditional compilation depending on the ESP-IDF version

Signed-off-by: Ludovic LANGE <[email protected]>
@llange llange force-pushed the experimental-esp-idf-v4-rework-network branch from 4954c69 to af0475a Compare February 5, 2023 20:17
@llange llange closed this Jun 7, 2023
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