ESP32 bootloader_random_enable() - undefined reference

The ESP32 hardware RNG requires WiFi|BT (RF) to generate true hardware RNG.
In lieu of RF being enabled PRNG is possible and should first call
bootloader_random_enable() according to

esp-idf/bootloader_random.h at 1ca2afd982230e4cbf021c58137f3141c1870572 · espressif/esp-idf (github.com)

I have included
#include "bootloader_random.h"

I have noticed the file exists at:

C:\Users(YOURUSERNAME)\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\tools\sdk\include\bootloader_support\bootloader_random.h

However, when compiling for ESP32 boards I get the "undefined reference" error on the function call bootloader_random_enable()

I don't get an error message from the #include, am I missing some path info?

bump

It seems the authors of that module didn't envisage it being used from C++ code. You should be able to get it to link by telling the compiler that the module has been compiled as C code. ie. :

extern "C" {
#include "bootloader_random.h"
}

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.