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

Roll esp-idf to 5.1. #2650

Merged
merged 6 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ else()
# pressure, but means the TLS connection often breaks after a while when the
# counterpart makes the packets larger. This ...IN_CONTENT_LEN define is
# overriddden in sdkconfig files for devices.
set(MBEDTLS_C_FLAGS "-DMBEDTLS_SSL_IN_CONTENT_LEN=7800 -DMBEDTLS_SSL_OUT_CONTENT_LEN=3700 -DMBEDTLS_PLATFORM_MEMORY=1 -DMBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK=1")
set(MBEDTLS_C_FLAGS "-DMBEDTLS_CONFIG_FILE=\\\"${CMAKE_SOURCE_DIR}/mbedtls/include/toit_config.h\\\"")
endif()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TOIT_GENERIC_FLAGS} ${TOIT_LWIP_C_FLAGS} ${MBEDTLS_C_FLAGS}")
Expand Down
15 changes: 15 additions & 0 deletions mbedtls/include/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Toit configuration for mbedtls

This directory contains the configuration for building mbedtls with Toit.
When compiling for the ESP32 family, the ESP-IDF configuration is used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So these two files are ignored on esp-idf? Maybe clarify. Also where is the esp-idf configuration stored?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.


This directory contains two files: [default_config.h](default_config.h)
and [toit_config.h](toit_config.h). The default config is unused and
serves as a reference for the configuration options. It makes it possible to
easily see which configurations have changed.

## Updating mbedtls

When updating mbedtls to a new version, the configuration files should be
updated to match the new version. Replace the `default_config.h` with the
new version and update the `toit_config.h` to match the changes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do you get the new default version from? I guess it is a copy of mbedtls_config.h? Why do we need to have an unused copy? I'm not sure I follow the "serves as a reference for the configuration options" part.

Is it because the mbedtls_config.h file lives in another repository?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just to have the "old" config file as reference to make diffs and see what we changed.
I clarified the text and added a Makefile check to ensure we don't forget to update it when we roll a new esp-idf.
done.

Loading
Loading