Skip to content

Commit

Permalink
Updated but non-working wolfssh server example
Browse files Browse the repository at this point in the history
  • Loading branch information
gojimmypi committed Dec 28, 2023
1 parent 757734c commit 8d049d8
Show file tree
Hide file tree
Showing 15 changed files with 845 additions and 248 deletions.
41 changes: 40 additions & 1 deletion ide/Espressif/ESP-IDF/examples/wolfssh_server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
# 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)

# enable wolfssl user_settings.h project-wide
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSL_USER_SETTINGS")
set(WOLFSSL_USER_SETTINGS ON)


set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWOLFSSH_TERM")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDEBUG_WOLFSSH")

set(WOLFSSL_ROOT "C:/workspace/wolfssl-master")

# 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")
# set(WOLFSSH_ROOT "~/workspace/wolfssh-other-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 @@ -42,6 +58,17 @@ if(APPLE)
endif()
# End optional WOLFSSL_CMAKE_SYSTEM_NAME

# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
set (PROTOCOL_EXAMPLES_DIR $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)

if (EXISTS "${PROTOCOL_EXAMPLES_DIR}")
message("Found PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR}")
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFOUND_PROTOCOL_EXAMPLES_DIR")
else()
message("NOT FOUND: PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR}")
endif()

# 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
Expand All @@ -63,6 +90,18 @@ else()
message(STATUS "No conflicting wolfSSL components found.")
endif()


# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
set (PROTOCOL_EXAMPLES_DIR $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)

if (EXISTS "${PROTOCOL_EXAMPLES_DIR}")
message("Found PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR}")
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFOUND_PROTOCOL_EXAMPLES_DIR")
else()
message("NOT FOUND: PROTOCOL_EXAMPLES_DIR=${PROTOCOL_EXAMPLES_DIR}")
endif()

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

project(wolfssh_server)
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Project("{803FD0C6-D64E-4E16-9DC3-1DAEC859A3D2}") = "wolfssh_server_IDF_v5.1_ESP
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{510C1DEE-DFFB-4C38-864E-DCE7A172ABB7}"
ProjectSection(SolutionItems) = preProject
..\..\..\..\..\..\..\wolfssl-gojimmypi\wolfssl\wolfcrypt\port\Espressif\esp32-crypt.h = ..\..\..\..\..\..\..\wolfssl-gojimmypi\wolfssl\wolfcrypt\port\Espressif\esp32-crypt.h
..\README.md = ..\README.md
EndProjectSection
EndProject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<Subdirectory>esp-idf/v5.1</Subdirectory>
<Type>ESPIDF</Type>
</IDFCheckout>
<COMPort>COM9</COMPort>
<COMPort>COM19</COMPort>
<SuppressTestPrerequisiteChecks>false</SuppressTestPrerequisiteChecks>
<UseCCache>false</UseCCache>
<DeviceID>ESP32</DeviceID>
Expand All @@ -93,7 +93,7 @@
</CustomDebug>
<DeviceTerminalSettings>
<Connection xsi:type="com.sysprogs.terminal.connection.serial">
<ComPortName>COM9</ComPortName>
<ComPortName>COM19</ComPortName>
<AdvancedSettings>
<BaudRate>115200</BaudRate>
<DataBits>8</DataBits>
Expand All @@ -104,7 +104,7 @@
</Connection>
<LastConnectionTime>0</LastConnectionTime>
<EchoTypedCharacters>false</EchoTypedCharacters>
<ClearContentsWhenReconnecting>false</ClearContentsWhenReconnecting>
<ClearContentsWhenReconnecting>true</ClearContentsWhenReconnecting>
<ReconnectAutomatically>false</ReconnectAutomatically>
<DisplayMode>ASCII</DisplayMode>
<Colors>
Expand Down
Loading

0 comments on commit 8d049d8

Please sign in to comment.