|
1 | 1 | # ESP-IDF Port |
2 | 2 |
|
3 | 3 | These Espressif examples have been created and tested with the latest stable release branch of |
4 | | -[ESP-IDF V5.1](https://docs.espressif.com/projects/esp-idf/en/release-v5.1/esp32/get-started/index.html). |
5 | | -The prior version 4.4 ESP-IDF is still supported, however version 5.1 or greater is recommended. |
| 4 | +[ESP-IDF V5.2](https://docs.espressif.com/projects/esp-idf/en/release-v5.2/esp32/get-started/index.html). |
| 5 | +The prior version 4.4 ESP-IDF is still supported, however version 5.2 or greater is recommended. |
6 | 6 | Espressif has [a list of all ESP-IDF versions](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/versions.html). |
7 | 7 |
|
8 | 8 | See the latest [Espressif Migration Guides](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/migration-guides/index.html). |
@@ -44,6 +44,28 @@ default configuration items in the wolfssl `settings.h`. With the latest version |
44 | 44 | wolfSSL, some of these defaults can be disabled with `NO_ESPIDF_DEFAULT` and customized |
45 | 45 | in your project `user_settings.h` as desired. |
46 | 46 |
|
| 47 | +The `user_settings.h` include file should not be explicitly included in an project source files. Be |
| 48 | +sure to include `settings.h` (which pulls in `user_settings.h`) before any other wolfSSL include files. |
| 49 | + |
| 50 | +A new project should also include a compiler option suc as `CFLAGS +=-DWOLFSSL_USER_SETTINGS"` to ensure |
| 51 | +the `user_settings.h` is included properly. See the [template example](https://github.com/wolfSSL/wolfssl/blob/master/IDE/Espressif/ESP-IDF/examples/template/main/main.c). |
| 52 | + |
| 53 | +``` |
| 54 | +#ifdef WOLFSSL_USER_SETTINGS |
| 55 | + #include <wolfssl/wolfcrypt/settings.h> |
| 56 | + #ifndef WOLFSSL_ESPIDF |
| 57 | + #warning "Problem with wolfSSL user_settings." |
| 58 | + #warning "Check components/wolfssl/include" |
| 59 | + #endif |
| 60 | + #include <wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h> |
| 61 | +#else |
| 62 | + /* Define WOLFSSL_USER_SETTINGS project wide for settings.h to include */ |
| 63 | + /* wolfSSL user settings in ./components/wolfssl/include/user_settings.h */ |
| 64 | + #error "Missing WOLFSSL_USER_SETTINGS in CMakeLists or Makefile:\ |
| 65 | + CFLAGS +=-DWOLFSSL_USER_SETTINGS" |
| 66 | +#endif |
| 67 | +``` |
| 68 | + |
47 | 69 | See the respective project directory: |
48 | 70 |
|
49 | 71 | `[project-dir]/components/wolfssl/user_settings.h` |
@@ -116,15 +138,15 @@ See the specific examples for additional details. |
116 | 138 |
|
117 | 139 | ## Setup for Linux (wolfSSL local copy) |
118 | 140 |
|
119 | | -This is a legacy method for installation. It is recommended to use the new `CMakeLists.txt` to point to wolfSSL source code. |
| 141 | +This is an alternate method for installation. It is recommended to use the new `CMakeLists.txt` to point to wolfSSL source code. |
120 | 142 |
|
121 | 143 | 1. Run `setup.sh` at _/path/to_`/wolfssl/IDE/Espressif/ESP-IDF/` to deploy files into ESP-IDF tree |
122 | 144 | 2. Find Wolfssl files at _/path/to/esp_`/esp-idf/components/wolfssl/` |
123 | 145 | 3. Find [Example Programs](https://github.com/wolfSSL/wolfssl/tree/master/IDE/Espressif/ESP-IDF/examples) under _/path/to/esp_`/esp-idf/examples/protocols/wolfssl_xxx` (where xxx is the project name) |
124 | 146 |
|
125 | 147 | ## Setup for Windows |
126 | 148 |
|
127 | | -This is a legacy method for installation. It is recommended to use the new `CMakeLists.txt` to point to wolfSSL source code. |
| 149 | +This is an alternate method for installation. It is recommended to use the new `CMakeLists.txt` to point to wolfSSL source code. |
128 | 150 |
|
129 | 151 | 1. Run ESP-IDF Command Prompt (cmd.exe) or Run ESP-IDF PowerShell Environment |
130 | 152 | 2. Run `setup_win.bat` at `.\IDE\Espressif\ESP-IDF\` |
|
0 commit comments