RNG bootloader compile error

Zoptune
Posts: 18
Joined: Mon May 27, 2019 11:02 pm

RNG bootloader compile error

Postby Zoptune » Tue Jun 25, 2019 5:31 pm

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

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: RNG bootloader compile error

Postby ESP_Angus » Wed Jun 26, 2019 12:56 am

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.)

Zoptune
Posts: 18
Joined: Mon May 27, 2019 11:02 pm

Re: RNG bootloader compile error

Postby Zoptune » Tue Jul 02, 2019 7:52 am

Hi ESP_Angus and thank you for your answer.

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

Thanks

Zoptune
Posts: 18
Joined: Mon May 27, 2019 11:02 pm

Re: RNG bootloader compile error

Postby Zoptune » Wed Jul 03, 2019 7:23 pm

Hi,

After trying your fix I still have the same error.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: RNG bootloader compile error

Postby ESP_Angus » Thu Jul 04, 2019 12:09 am

Hi Zoptune,

What version of ESP-IDF are you using?

Angus

Who is online

Users browsing this forum: Baidu [Spider] and 164 guests