Add support for STM32WBA

This commit is contained in:
Lealem Amedie
2025-03-11 15:07:19 -06:00
parent fb23b487eb
commit 96b8d72c4f
4 changed files with 21 additions and 9 deletions

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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
@ -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"