diff --git a/core/app_main.c b/core/app_main.c index a38fb5f..ebf9e9a 100644 --- a/core/app_main.c +++ b/core/app_main.c @@ -21,6 +21,7 @@ #include "esp/spi_regs.h" #include "esp/dport_regs.h" #include "esp/wdev_regs.h" +#include "esp/hwrand.h" #include "os_version.h" #include "espressif/esp_common.h" @@ -378,6 +379,8 @@ static __attribute__((noinline)) void user_start_phase2(void) { init_networking(&phy_info, sdk_info.sta_mac_addr); + srand(hwrand()); /* seed libc rng */ + // Call gcc constructor functions void (**ctor)(void); for ( ctor = &__init_array_start; ctor != &__init_array_end; ++ctor) {