Openssl, arm, windows, msys2, dirent.h

379 views Asked by At

I am trying to build a windows openssl library for a rasbery pi pico microcontroller, with an arm cortex m0 processor.

I downloaded the openssl library from the official site and unzipped it. Installed MSYS2 and launched it. It indicated the path to the directory with the openssl library:

cd /C/openssl-3.0.0-beta1

Selected settings for the config file:

./Configure gcc --cross-compile-prefix=arm-none-eabi- --prefix=/K/OpenSSL-x32-arm -mcpu=cortex-m0plus PROCESSOR=ARM -DL_ENDIAN no-shared -DNO_SYSLOG -DOPENSSL_NO_X509 -DOPENSSL_NO_X509V3 -DOPENSSL_NO_X509_VFY no-idea no-camellia no-seed no-bf no-cast no-des no-rc4 no-rc5 no-md2 no-md4 no-ripemd no-mdc2 no-dsa no-dh no-ec no-ecdsa no-ecdh no-sock no-ssl2 no-ssl3 no-err no-engine no-hw

and started compiling:

make depend && make

it throws an error:

In file included from c:\msys64\mingw64\arm-none-eabi\include\dirent.h:39,
             from crypto/LPdir_unix.c:44,
             from crypto/o_dir.c:28:
c:\msys64\mingw64\arm-none-eabi\include\sys\dirent.h:10:2: error: #error "<dirent.h> not supported"
   10 | #error "<dirent.h> not supported"

What am I doing wrong?

1

There are 1 answers

0
Botje On

The raspberry pi pico does not actually have a filesystem, so it does not support file operations. Furthermore, it only has 246kb of programmable memory. Are you sure you want to blow it all on OpenSSL? There are far smaller TLS stacks such as Mbed-TLS (<30kb) and WolfSSL (<100kb).