Skip to content

Commit 5b01270

Browse files
committed
Update all Expressif examples, ready for PR #6990
1 parent 0306d07 commit 5b01270

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+6758
-1862
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ user_settings_asm.h
421421
# Espressif sdk config default should be saved in sdkconfig.defaults
422422
# we won't track the actual working sdkconfig files
423423
/IDE/Espressif/**/sdkconfig
424+
/IDE/Espressif/**/sdkconfig.old
424425

425426
# auto-created CMake backups
426427
**/CMakeLists.txt.old

IDE/Espressif/ESP-IDF/examples/template/CMakeLists.txt

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
1+
# wolfSSL Espressif Example Project CMakeLists.txt
2+
# v1.0
3+
#
14
# The following lines of boilerplate have to be in your project's
25
# CMakeLists in this exact order for cmake to work correctly
3-
cmake_minimum_required(VERSION 3.5)
6+
cmake_minimum_required(VERSION 3.16)
47

8+
# The wolfSSL CMake file should be able to find the source code.
9+
# Otherwise, assign an environment variable or set it here:
10+
#
511
# set(WOLFSSL_ROOT "~/workspace/wolfssl-other-source")
6-
7-
# This tag is used to include this file in the ESP Component Registry:
8-
# __ESP_COMPONENT_SOURCE__
9-
12+
#
1013
# Optional WOLFSSL_CMAKE_SYSTEM_NAME detection to find
1114
# USE_MY_PRIVATE_CONFIG path for my_private_config.h
1215
#
16+
# Expected path varies:
17+
#
18+
# WSL: /mnt/c/workspace
19+
# Linux: ~/workspace
20+
# Windows: C:\workspace
21+
#
1322
if(WIN32)
1423
# Windows-specific configuration here
1524
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_SYSTEM_NAME_WINDOWS")
@@ -38,6 +47,27 @@ if(APPLE)
3847
endif()
3948
# End optional WOLFSSL_CMAKE_SYSTEM_NAME
4049

50+
# Check that there are not conflicting wolfSSL components
51+
# The ESP Registry Component will be in ./managed_components/wolfssl__wolfssl
52+
# The local component wolfSSL directory will be in ./components/wolfssl
53+
if( EXISTS "${CMAKE_HOME_DIRECTORY}/managed_components/wolfssl__wolfssl" AND EXISTS "${CMAKE_HOME_DIRECTORY}/components/wolfssl" )
54+
# These exclude statements don't seem to be honored by the $ENV{IDF_PATH}/tools/cmake/project.cmake'
55+
# add_subdirectory("${CMAKE_HOME_DIRECTORY}/managed_components/wolfssl__wolfssl" EXCLUDE_FROM_ALL)
56+
# add_subdirectory("${CMAKE_HOME_DIRECTORY}/managed_components/wolfssl__wolfssl/include" EXCLUDE_FROM_ALL)
57+
# So we'll error out and let the user decide how to proceed:
58+
message(WARNING "\nFound wolfSSL components in\n"
59+
"./managed_components/wolfssl__wolfssl\n"
60+
"and\n"
61+
"./components/wolfssl\n"
62+
"in project directory: \n"
63+
"${CMAKE_HOME_DIRECTORY}")
64+
message(FATAL_ERROR "\nPlease use either the ESP Registry Managed Component or the wolfSSL component directory but not both.\n"
65+
"If removing the ./managed_components/wolfssl__wolfssl directory, remember to also remove "
66+
"or rename the idf_component.yml file typically found in ./main/")
67+
else()
68+
message(STATUS "No conflicting wolfSSL components found.")
69+
endif()
70+
4171
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
4272

4373
project(wolfssl_template)

IDE/Espressif/ESP-IDF/examples/template/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ echo "Run export.sh from ${WRK_IDF_PATH}"
4040
# build the example:
4141
idf.py build
4242
43+
# optionally erase the flash
44+
idf.py erase-flash -p /dev/ttyS19 -b 115200
45+
4346
# flash the code onto the serial device at /dev/ttyS19
4447
idf.py flash -p /dev/ttyS19 -b 115200
4548

IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/CMakeLists.txt

Lines changed: 151 additions & 116 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)