.. | ||
.gitignore | ||
Kconfig | ||
Make.defs | ||
Makefile | ||
README.md | ||
user_settings.h |
NuttX + wolfSSL
Installation
Installing from nuttx-apps
Skip to step 6
Installing from wolfssl
- Create working directory (e.g. ~/nuttxspace):
$ cd ~ $ mkdir nuttxspace
- Install dependencies:
$ cd ~/nuttxspace $ sudo apt install -y bison flex gettext texinfo libncurses5-dev libncursesw5-dev gperf automake libtool pkg-config build-essential gperf genromfs libgmp-dev libmpc-dev libmpfr-dev libisl-dev binutils-dev libelf-dev libexpat-dev gcc-multilib g++-multilib picocom u-boot-tools util-linux $ sudo apt install -y kconfig-frontends $ sudo apt install -y gcc-arm-none-eabi binutils-arm-none-eabi
- Clone nuttx and nuttx-apps into working directory:
$ git clone https://github.com/apache/nuttx.git nuttx $ git clone https://github.com/apache/nuttx-apps apps
- Copy this directory into the working directory applications:
$ cp -R RTOS/nuttx/wolfssl ~/nuttxspace/apps/crypto/wolfssl
- Setup wolfSSL in preparation for the build,
WOLFSSL_DIR
must be the path to the original wolfssl repo:$ cd ~/nuttxspace/apps/crypto/wolfssl $ WOLFSSL_DIR=<path-to-wolfssl-repo> ./setup-wolfssl.sh
- Setup baseline NuttX configuration (board + NuttX Shell):
If you are using wolfSSL for TLS you should use the$ cd ~/nuttxspace/nuttx $ ./tools/configure.sh -l <board>:nsh
netnsh
target if your board supports it$ ./tools/configure.sh -l <board>:netnsh
EXAMPLES:
- For NuttX Simulator:
$ ./tools/configure.sh sim:nsh
- For BL602 (RISC-V):
$ ./tools/configure.sh -l bl602evb:nsh
- For NUCLEO-L552ZE-Q (Cortex-M33):
$ ./tools/configure.sh -l nucleo-l552ze:nsh
- For NUCLEO-H753ZI:
$ ./tools/configure.sh -l nucleo-h743zi:nsh
- For NUCLEO-F756ZG:
./tools/configure.sh -l nucleo-144:f746-nsh
-
Start custom configuration system:
$ make menuconfig
-
Configure NuttX to enable the wolfSSL crypto library test applications:
- From main menu select: Application Configuration > Cryptography Library Support
- Enable and then select wolfSSL SSL/TLS Cryptography Library
- Enable and then select wolfSSL applications
- Enable applications:
- wolfCrypt Benchmark application
- wolfCrypt Test application
- wolfSSL client and server example
- Select Save from bottom menu, saving to
.config
file - Exit configuration tool
If you are using wolfSSL for TLS you should use the
netnsh
target and should enable an NTP or some for of system time keeping so that wolfSSL has the current date to check certificates. You will also need to set the right networking settings for NuttX to connect to the internet. -
Build NuttX and wolfSSL:
$ make
-
Flash the target
Simulator
./nuttx
STM32 Targets (address may vary)
STM32_Programmer_CLI -c port=swd -d ./nuttx.bin 0x08000000
-
Connect to the target with a serial monitoring tool, the device on linux is usually /dev/ttyACM0 but it may vary
- minicom -D /dev/ttyACM0
-
Run the wolfcrypt benchmark and/or test in the NuttX Shell:
nsh> wolfcrypt_test nsh> wolfcrypt_benchmark nsh> wolfssl_client_server
Notes
- Developed using the following targets:
- STM NUCLEO-L552ZE-Q (Cortex-M33)
- STM NUCLEO-H753ZI
- STM NUCLEO-F756ZG
- DT-BL10 / BL602 (RISC-V)
- NuttX simulator