1- ### wolfSSL with Arduino
1+ # wolfSSL with Arduino
22
3- Many of the supported devices are natively built-in to the [ Arduino IDE Board Manager] ( https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-board-manager/ )
3+ Many of the supported boards are natively built-in to the [ Arduino IDE Board Manager] ( https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-board-manager/ )
44and by adding [ additional cores] ( https://docs.arduino.cc/learn/starting-guide/cores/ ) as needed.
55
6- STM32 Support can be added by including this link in the "Additional Boards Managers URLs" field:
6+ STM32 Support can be added by including this link in the "Additional Boards Managers URLs" field
7+ from [ stm32duino/Arduino_Core_STM32] ( https://github.com/stm32duino/Arduino_Core_STM32?tab=readme-ov-file#getting-started ) .
78
9+ ```
810https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
11+ ```
912
10- from [ stm32duino/Arduino_Core_STM32] ( https://github.com/stm32duino/Arduino_Core_STM32?tab=readme-ov-file#getting-started ) .
13+ ## Using wolfSSL from the Arduino IDE
14+
15+ Coming soon! https://github.com/wolfSSL/arduino-wolfSSL See [ PR #1 ] ( https://github.com/wolfSSL/Arduino-wolfSSL/pull/1 ) .
16+
17+ This option will allow wolfSSL to be installed directly using the native Arduino tools.
18+
19+ ## Manually Reformatting wolfSSL as a Compatible Arduino Library
1120
21+ Use [ this] ( ./wolfssl-arduino.sh ) shell script that will re-organize the wolfSSL library to be
22+ compatible with [ Arduino Library Specification] ( https://arduino.github.io/arduino-cli/0.35/library-specification/ )
23+ for projects that use Arduino IDE 1.5.0 or newer.
1224
25+ The Arduino IDE requires a library's source files to be in the library's root directory with a
26+ header file in the name of the library. This script moves all ` src/ ` files to the ` IDE/ARDUINO/wolfSSL/src `
27+ directory and creates a stub header file called ` wolfssl.h ` inside that directory.
1328
14- ##### Reformatting wolfSSL as a compatible Arduino Library
15- This is a shell script that will re-organize the wolfSSL library to be
16- compatible with Arduino projects that use Arduino IDE 1.5.0 or newer.
17- The Arduino IDE requires a library's source files to be in the library's root
18- directory with a header file in the name of the library. This script moves all
19- src/ files to the ` IDE/ARDUINO/wolfSSL/src ` directory and creates a stub header
20- file called ` wolfssl.h ` inside that directory.
29+ ### Step 1:
2130
22- Step 1: To configure wolfSSL with Arduino, enter one of the following commands
31+ To configure wolfSSL with Arduino, enter one of the following commands
2332from within the ` wolfssl/IDE/ARDUINO ` directory:
2433
25341 . ` ./wolfssl-arduino.sh `
35+ - Creates an Arduino Library directory structure in the local ` wolfSSL ` directory of ` IDE/ARDUINO ` .
36+ - You can add your own ` user_settings.h ` , or copy/rename the [ default] ( ../../examples/configs/user_settings_arduino.h ) .
37+
38+ 2 . ` ./wolfssl-arduino.sh INSTALL ` (The most common option)
39+ - Creates an Arduino Library in the local ` wolfSSL ` directory
40+ - Moves that directory to the Arduino library directory:
41+ - ` $HOME/Arduino/libraries ` for most bash environments
42+ - ` /mnt/c/Users/$USER/Documents/Arduino/libraries ` (for WSL)
43+ - Adds the [ default] ( ../../examples/configs/user_settings_arduino.h ) as ` user_settings.h ` .
44+ - The wolfSSL library is now available from the Arduino IDE.
45+
46+ 3 . ` ./wolfssl-arduino.sh INSTALL /path/to/repository ` (Used to update [ arduino-wolfSSL] ( https://github.com/wolfSSL/arduino-wolfSSL ) )
2647 - Creates an Arduino Library in ` wolfSSL ` directory
27- 2 ` ./wolfssl-arduino.sh INSTALL `
28- - Creates an Arduino Library in ` wolfSSL ` directory
29- - Moves that directory to the Arduino library directory:
30- - ` $HOME/Arduino/libraries ` for most bash environments
31- - ` /mnt/c/Users/$USER/Documents/Arduino/libraries ` (for WSL)
32- 3 . ` ./wolfssl-arduino.sh INSTALL /path/to/repository `
33- - Creates an Arduino Library in ` wolfSSL ` directory
34- - Copies that directory contents to the specified ` /path/to/repository `
48+ - Copies that directory contents to the specified ` /path/to/repository `
49+ - Adds the [ default] ( ../../examples/configs/user_settings_arduino.h ) as ` user_settings.h ` .
50+
35514 . ` ./wolfssl-arduino.sh INSTALL /path/to/any/other/directory `
36- - Creates an Arduino Library in ` wolfSSL ` directory
37- - Copies that directory contents to the specified ` /path/to/repository `
52+ - Creates an Arduino Library in ` wolfSSL ` directory
53+ - Copies that directory contents to the specified ` /path/to/any/other/directory `
54+
55+ ### Step 2:
3856
39- Step 2: Edit ` <arduino-libraries>/wolfSSL/src/user_settings.h `
57+ Edit ` <arduino-libraries>/wolfSSL/src/user_settings.h `
4058If building for Intel Galileo platform add: ` #define INTEL_GALILEO ` .
41- Add any other custom settings, for a good start see the examples in wolfssl root
42- "/examples/configs/user_settings_ * .h"
59+ Add any other custom settings. For a good start see the examples in wolfssl root
60+ "[ /examples/configs/user_settings_ * .h] ( https://github.com/wolfssl/wolfssl/tree/master/examples/configs ) "
61+
62+ ### Step 3:
4363
44- Step 3: If you experience any issues with custom user_settings.h see the wolfssl
64+ If you experience any issues with custom ` user_settings.h ` see the wolfssl
4565porting guide here for more assistance: https://www.wolfssl.com/docs/porting-guide/
4666
4767If you have any issues contact
[email protected] for help.
4868
49- ##### Including wolfSSL in Arduino Libraries (for Arduino version 2.0 or greater)
69+ # Including wolfSSL in Arduino Libraries (for Arduino version 2.0 or greater)
5070
51711 . In the Arduino IDE:
5272
5373The wolfSSL library should automatically be detected when found in the ` libraries `
5474directory.
5575
56- - In `Sketch -> Include Library` choose wolfSSL for new sketches.
76+ - In ` Sketch -> Include Library ` choose wolfSSL for new sketches.
5777
5878
5979##### Including wolfSSL in Arduino Libraries (for Arduino version 1.6.6)
@@ -67,9 +87,9 @@ directory.
6787
6888Open an example Arduino sketch for wolfSSL:
6989
70- - wolfSSL Client INO sketch: `sketches/wolfssl_client/wolfssl_client.ino`
90+ - wolfSSL [ Client INO sketch] ( ./sketches/wolfssl_client/README.md ) : ` sketches/wolfssl_client/wolfssl_client.ino `
7191
72- - wolfSSL Server INO sketch: `sketches/wolfssl_server/wolfssl_server.ino`
92+ - wolfSSL [ Server INO sketch] ( ./sketches/wolfssl_server/README.md ) : ` sketches/wolfssl_server/wolfssl_server.ino `
7393
7494#### Script Examples
7595
@@ -96,13 +116,14 @@ cd /mnt/c/workspace/wolfssl-$USER
96116./examples/client/client -h 192.168.1.43 -p 11111 -v 3
97117```
98118
99- Build wolfSSL to include wolfSSH support, but to an alternate development directory.
119+ Build wolfSSL to include wolfSSH support to an alternate development directory.
100120
101121``` bash
102- cd /mnt/c/workspace/wolfssl-$USER
103- ./configure --prefix=/mnt/c/workspace/wolfssh-$USER /wolfssl_install --enable-ssh
104- make
105- make install
122+ cd /mnt/c/workspace/wolfssl-$USER
123+ ./configure --prefix=/mnt/c/workspace/wolfssh-$USER /wolfssl_install --enable-ssh
124+ make
125+ make install
126+
106127```
107128
108129Build wolfSSH with wolfSSL not installed to default directory.
@@ -125,7 +146,7 @@ make clean
125146make && make test
126147```
127148
128- Build and run ` testwolfcrypt `
149+ Build and run ` testwolfcrypt ` .
129150
130151``` bash
131152./autogen.sh
0 commit comments