Topic: Documentation for ESP32-S3
Hello,
Are there any instructions available for using wolfSSL with Visual Studio Code, PlatformIO and ESP32-S3 utilizing the Arduino framework?
I can see instructions for building for Visual Studio, but nothing for Visual Studio Code or ESP32-S3 specific without using the ESP-IDF
Tried to install wolfSSL using the platformio registry which pulls in version 5.5.4 but get the following errors when trying to build.
unknown register name 'r8' in 'asm'
#error "you need to write an os specific wc_GenerateSeed() here"
I am including a wc_GenerateSeed function
// custom_entropy.cpp
#include <wolfssl/wolfcrypt/types.h>
#include <string.h> // for memcpy
extern "C" {
#include <esp_system.h>
}
// Define the OS_Seed type
typedef struct {
byte* seed; // Pointer to the seed buffer
word32 size; // Size of the seed buffer
word32 idx; // Index to keep track of the position in the seed buffer
} OS_Seed;
// Declaration of the custom wc_GenerateSeed function
int wc_GenerateSeed(OS_Seed* os, byte* seed, word32 sz);
// Implementation of the custom wc_GenerateSeed function
int wc_GenerateSeed(OS_Seed* os, byte* seed, word32 sz)
{
// Gather entropy using ESP32 SDK functions
for (word32 i = 0; i < sz; i += sizeof(uint32_t)) {
uint32_t randomValue = esp_random();
memcpy(seed + i, &randomValue, sizeof(uint32_t));
}
return 0; // Success
}
Any help appreciated!
Thanks
Adam