Skip to content

Commit

Permalink
Merge pull request wolfSSL#6844 from gojimmypi/Espressif-client-serve…
Browse files Browse the repository at this point in the history
…r-example

Espressif ESP32 Benchmark, Test, TLS 1.3 Client & Server Updates
  • Loading branch information
JacobBarthelmeh authored Dec 5, 2023
2 parents 223d8c9 + fb77319 commit 7753e3d
Show file tree
Hide file tree
Showing 70 changed files with 6,994 additions and 1,874 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ user_settings_asm.h
# Espressif sdk config default should be saved in sdkconfig.defaults
# we won't track the actual working sdkconfig files
/IDE/Espressif/**/sdkconfig
/IDE/Espressif/**/sdkconfig.old

# auto-created CMake backups
**/CMakeLists.txt.old
Expand Down
40 changes: 35 additions & 5 deletions IDE/Espressif/ESP-IDF/examples/template/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
# wolfSSL Espressif Example Project CMakeLists.txt
# v1.0
#
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)

# The wolfSSL CMake file should be able to find the source code.
# Otherwise, assign an environment variable or set it here:
#
# set(WOLFSSL_ROOT "~/workspace/wolfssl-other-source")

# This tag is used to include this file in the ESP Component Registry:
# __ESP_COMPONENT_SOURCE__

#
# Optional WOLFSSL_CMAKE_SYSTEM_NAME detection to find
# USE_MY_PRIVATE_CONFIG path for my_private_config.h
#
# Expected path varies:
#
# WSL: /mnt/c/workspace
# Linux: ~/workspace
# Windows: C:\workspace
#
if(WIN32)
# Windows-specific configuration here
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_CMAKE_SYSTEM_NAME_WINDOWS")
Expand Down Expand Up @@ -38,6 +47,27 @@ if(APPLE)
endif()
# End optional WOLFSSL_CMAKE_SYSTEM_NAME

# Check that there are not conflicting wolfSSL components
# The ESP Registry Component will be in ./managed_components/wolfssl__wolfssl
# The local component wolfSSL directory will be in ./components/wolfssl
if( EXISTS "${CMAKE_HOME_DIRECTORY}/managed_components/wolfssl__wolfssl" AND EXISTS "${CMAKE_HOME_DIRECTORY}/components/wolfssl" )
# These exclude statements don't seem to be honored by the $ENV{IDF_PATH}/tools/cmake/project.cmake'
# add_subdirectory("${CMAKE_HOME_DIRECTORY}/managed_components/wolfssl__wolfssl" EXCLUDE_FROM_ALL)
# add_subdirectory("${CMAKE_HOME_DIRECTORY}/managed_components/wolfssl__wolfssl/include" EXCLUDE_FROM_ALL)
# So we'll error out and let the user decide how to proceed:
message(WARNING "\nFound wolfSSL components in\n"
"./managed_components/wolfssl__wolfssl\n"
"and\n"
"./components/wolfssl\n"
"in project directory: \n"
"${CMAKE_HOME_DIRECTORY}")
message(FATAL_ERROR "\nPlease use either the ESP Registry Managed Component or the wolfSSL component directory but not both.\n"
"If removing the ./managed_components/wolfssl__wolfssl directory, remember to also remove "
"or rename the idf_component.yml file typically found in ./main/")
else()
message(STATUS "No conflicting wolfSSL components found.")
endif()

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

project(wolfssl_template)
3 changes: 3 additions & 0 deletions IDE/Espressif/ESP-IDF/examples/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ echo "Run export.sh from ${WRK_IDF_PATH}"
# build the example:
idf.py build
# optionally erase the flash
idf.py erase-flash -p /dev/ttyS19 -b 115200
# flash the code onto the serial device at /dev/ttyS19
idf.py flash -p /dev/ttyS19 -b 115200
Expand Down
267 changes: 151 additions & 116 deletions IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/CMakeLists.txt

Large diffs are not rendered by default.

Loading

0 comments on commit 7753e3d

Please sign in to comment.