Skip to content

Commit

Permalink
Add support for STM32WBA
Browse files Browse the repository at this point in the history
  • Loading branch information
lealem47 committed Mar 11, 2025
1 parent fb23b48 commit 96b8d72
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
6 changes: 6 additions & 0 deletions IDE/STM32Cube/default_conf.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ extern ${variable.value} ${variable.name};
#undef NO_STM32_CRYPTO
#define WOLFSSL_STM32_PKA
#define WOLFSSL_STM32_PKA_V2
#elif defined(STM32WBA52xx)
#define WOLFSSL_STM32WBA
#define WOLFSSL_STM32_PKA
#undef NO_STM32_HASH
#undef NO_STM32_CRYPTO
#define HAL_CONSOLE_UART huart4
#else
#warning Please define a hardware platform!
/* This means there is not a pre-defined platform for your board/CPU */
Expand Down
3 changes: 3 additions & 0 deletions wolfcrypt/src/port/st/stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
#elif defined(WOLFSSL_STM32H7S)
#include <stm32h7rsxx_hal_conf.h>
#include <stm32h7rsxx_hal_pka.h>
#elif defined(WOLFSSL_STM32WBA)
#include <stm32wbaxx_hal_conf.h>
#include <stm32wbaxx_hal_pka.h>
#else
#error Please add the hal_pk.h include
#endif
Expand Down
3 changes: 2 additions & 1 deletion wolfssl/wolfcrypt/port/st/stm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ int wc_Stm32_Hash_Final(STM32_HASH_Context* stmCtx, word32 algo,
#define STM32_CRYPTO_AES_GCM
#endif

#if defined(WOLFSSL_STM32WB) || defined(WOLFSSL_STM32WL)
#if defined(WOLFSSL_STM32WB) || defined(WOLFSSL_STM32WL) || \
defined(WOLFSSL_STM32WBA)
#define STM32_CRYPTO_AES_ONLY /* crypto engine only supports AES */
#ifdef WOLFSSL_STM32WB
#define CRYP AES1
Expand Down
18 changes: 10 additions & 8 deletions wolfssl/wolfcrypt/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -2090,14 +2090,14 @@ extern void uITRON4_free(void *p) ;

#endif /* WOLFSSL_MAXQ1065 || WOLFSSL_MAXQ108X */

#if defined(WOLFSSL_STM32F2) || defined(WOLFSSL_STM32F4) || \
defined(WOLFSSL_STM32F7) || defined(WOLFSSL_STM32F1) || \
defined(WOLFSSL_STM32L4) || defined(WOLFSSL_STM32L5) || \
defined(WOLFSSL_STM32WB) || defined(WOLFSSL_STM32H7) || \
defined(WOLFSSL_STM32G0) || defined(WOLFSSL_STM32U5) || \
defined(WOLFSSL_STM32H5) || defined(WOLFSSL_STM32WL) || \
defined(WOLFSSL_STM32G4) || defined(WOLFSSL_STM32MP13) || \
defined(WOLFSSL_STM32H7S)
#if defined(WOLFSSL_STM32F2) || defined(WOLFSSL_STM32F4) || \
defined(WOLFSSL_STM32F7) || defined(WOLFSSL_STM32F1) || \
defined(WOLFSSL_STM32L4) || defined(WOLFSSL_STM32L5) || \
defined(WOLFSSL_STM32WB) || defined(WOLFSSL_STM32H7) || \
defined(WOLFSSL_STM32G0) || defined(WOLFSSL_STM32U5) || \
defined(WOLFSSL_STM32H5) || defined(WOLFSSL_STM32WL) || \
defined(WOLFSSL_STM32G4) || defined(WOLFSSL_STM32MP13) || \
defined(WOLFSSL_STM32H7S) || defined(WOLFSSL_STM32WBA)

#define SIZEOF_LONG_LONG 8
#ifndef CHAR_BIT
Expand Down Expand Up @@ -2167,6 +2167,8 @@ extern void uITRON4_free(void *p) ;
#include "stm32mp13xx_hal.h"
#include "stm32mp13xx_hal_conf.h"
#endif
#elif defined(WOLFSSL_STM32WBA)
#include "stm32wbaxx_hal.h"
#endif
#if defined(WOLFSSL_CUBEMX_USE_LL) && defined(WOLFSSL_STM32L4)
#include "stm32l4xx_ll_rng.h"
Expand Down

0 comments on commit 96b8d72

Please sign in to comment.