Added `--enable-smallstack` build options for reducing stack usage.

pull/73/head
David Garske 2019-07-26 12:36:50 -07:00
parent 38e7b00964
commit 2beeb4b4ac
2 changed files with 18 additions and 0 deletions

View File

@ -118,6 +118,7 @@ WOLFTPM_TIS_LOCK Enable Linux Named Semaphore for locking access to SPI d
WOLFTPM_USE_SYMMETRIC Enables symmetric AES/Hashing/HMAC support for TLS examples.
TLS_BENCH_MODE Enables TLS benchmarking mode.
NO_TPM_BENCH Disables the TPM benchmarking example.
--enable-smallstack Enable options to reduce stack usage
```
### Building Infineon SLB9670

View File

@ -196,6 +196,23 @@ then
fi
# Small Stack
AC_ARG_ENABLE([smallstack],
[AS_HELP_STRING([--enable-smallstack],[Enable Small Stack Usage (default: disabled)])],
[ ENABLED_SMALL_STACK=$enableval ],
[ ENABLED_SMALL_STACK=no ]
)
if test "x$ENABLED_SMALL_STACK" = "xyes"
then
AM_CFLAGS="$AM_CFLAGS -DWOLFTPM_SMALL_STACK"
# Reduces max packet and buffer sizes to 1024 bytes
AM_CFLAGS="$AM_CFLAGS -DMAX_COMMAND_SIZE=1024 -DMAX_RESPONSE_SIZE=1024 -DWOLFTPM2_MAX_BUFFER=1500 -DMAX_SESSION_NUM=1 -DMAX_DIGEST_BUFFER=973"
fi
# HARDEN FLAGS
AX_HARDEN_CC_COMPILER_FLAGS