Page 1 of 1

RNG bootloader compile error

Posted: Tue Jun 25, 2019 5:31 pm
by Zoptune
Hi everyone,

I'm trying to use the ESP RNG but I'm not satisfied by random value returned by

Code: Select all

esp_random()
and because I'm not using RF subsystem I need to call

Code: Select all

bootloader_random_enable()
but I'm facing this compiling error :

Code: Select all

main.cpp:26: undefined reference to `bootloader_random_enable()'
I could not find where is defined this function, can you help me ?

Thanks

Re: RNG bootloader compile error

Posted: Wed Jun 26, 2019 12:56 am
by ESP_Angus
Hi Zoptune,

The bootloader_random.h header is missing include guards to work with C++ code.

We will fix this in ESP-IDF, but you can fix it for now by doing this in your main.cpp file:

Code: Select all

extern "C" {
#include "bootloader_random.h"
}
(This workaround will continue to work after we fix the problem in ESP-IDF, also.)

Re: RNG bootloader compile error

Posted: Tue Jul 02, 2019 7:52 am
by Zoptune
Hi ESP_Angus and thank you for your answer.

I will try this and come back here if I still have errors.

Thanks

Re: RNG bootloader compile error

Posted: Wed Jul 03, 2019 7:23 pm
by Zoptune
Hi,

After trying your fix I still have the same error.

Re: RNG bootloader compile error

Posted: Thu Jul 04, 2019 12:09 am
by ESP_Angus
Hi Zoptune,

What version of ESP-IDF are you using?

Angus