mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-23 13:18:59 +00:00
[feat][mbedtls] add mbedtls component
This commit is contained in:
parent
b0e709d9d6
commit
f098272250
219 changed files with 149965 additions and 0 deletions
19
components/mbedtls/bflb_port/inc/mbedtls_bflb_config.h
Normal file
19
components/mbedtls/bflb_port/inc/mbedtls_bflb_config.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#ifndef MBEDTLS_CONFIG_H
|
||||
#define MBEDTLS_CONFIG_H
|
||||
|
||||
#include "mbedtls_port_config.h"
|
||||
|
||||
#define MBEDTLS_AES_C
|
||||
#define MBEDTLS_AES_ROM_TABLES
|
||||
#define MBEDTLS_CCM_C
|
||||
#define MBEDTLS_CIPHER_C
|
||||
#define MBEDTLS_SHA256_C
|
||||
|
||||
#define MBEDTLS_CIPHER_MODE_CBC
|
||||
#define MBEDTLS_CIPHER_MODE_CTR
|
||||
|
||||
// #define MBEDTLS_PLATFORM_MEMORY
|
||||
// #define MBEDTLS_PLATFORM_FREE_MACRO
|
||||
// #define MBEDTLS_PLATFORM_CALLOC_MACRO
|
||||
|
||||
#endif /* MBEDTLS_CONFIG_H */
|
27
components/mbedtls/bflb_port/inc/mbedtls_port_config.h
Normal file
27
components/mbedtls/bflb_port/inc/mbedtls_port_config.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
#ifndef __MBEDTLS_PORT_CONFIG_H__
|
||||
#define __MBEDTLS_PORT_CONFIG_H__
|
||||
|
||||
#include "bflb_platform.h"
|
||||
#include "bl702_sec_eng.h"
|
||||
|
||||
#define MBEDTLS_USE_BFLB_SHA
|
||||
#define MBEDTLS_USE_BFLB_AES
|
||||
#define MBEDTLS_USE_BFLB_TRNG
|
||||
#define MBEDTLS_USE_BFLB_PKA
|
||||
#define MBEDTLS_USE_BFLB_GMAC
|
||||
|
||||
#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
|
||||
#define MBEDTLS_PLATFORM_PRINTF_MACRO MSG
|
||||
#define MBEDTLS_PLATFORM_SNPRINTF_ALT
|
||||
//#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf
|
||||
#define MBEDTLS_PLATFORM_MEMORY
|
||||
//#if defined(bflb_platform_calloc) && defined(bflb_platform_free)
|
||||
//#define MBEDTLS_PLATFORM_CALLOC_MACRO bflb_platform_calloc
|
||||
//#define MBEDTLS_PLATFORM_FREE_MACRO bflb_platform_free
|
||||
//#endif
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
#define SIZE_MAX 0xffffffff
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue