Error 'EFUSE_DISABLE_DL_DECRYPT' undeclared when compile with esp-idf-v3.3

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Error 'EFUSE_DISABLE_DL_DECRYPT' undeclared when compile with esp-idf-v3.3

Postby davdav » Wed Sep 18, 2019 9:41 am

Hi everybody,

I'm trying to switch to ESP-IDF v3.3 (I'm currently on ESP-IDF v3.2) but when compile I got some error

Code: Select all

C:/msys32/home/Davide/esp/Avior_ESP32_WiFi/main/ota.c: In function 'OTA_burn_protection_efuses':
C:/msys32/home/Davide/esp/Avior_ESP32_WiFi/main/ota.c:96:25: error: 'EFUSE_DISABLE_DL_ENCRYPT' undeclared (first use in this function)
     uint32_t new_fuse = EFUSE_DISABLE_DL_ENCRYPT | EFUSE_DISABLE_DL_DECRYPT | EFUSE_DISABLE_DL_CACHE | EFUSE_RD_DISABLE_JTAG | EFUSE_RD_CONSOLE_DEBUG_DISABLE;
                         ^
C:/msys32/home/Davide/esp/Avior_ESP32_WiFi/main/ota.c:96:25: note: each undeclared identifier is reported only once for each function it appears in
C:/msys32/home/Davide/esp/Avior_ESP32_WiFi/main/ota.c:96:52: error: 'EFUSE_DISABLE_DL_DECRYPT' undeclared (first use in this function)
     uint32_t new_fuse = EFUSE_DISABLE_DL_ENCRYPT | EFUSE_DISABLE_DL_DECRYPT | EFUSE_DISABLE_DL_CACHE | EFUSE_RD_DISABLE_JTAG | EFUSE_RD_CONSOLE_DEBUG_DISABLE;
                                                    ^
C:/msys32/home/Davide/esp/Avior_ESP32_WiFi/main/ota.c:96:79: error: 'EFUSE_DISABLE_DL_CACHE' undeclared (first use in this function)
     uint32_t new_fuse = EFUSE_DISABLE_DL_ENCRYPT | EFUSE_DISABLE_DL_DECRYPT | EFUSE_DISABLE_DL_CACHE | EFUSE_RD_DISABLE_JTAG | EFUSE_RD_CONSOLE_DEBUG_DISABLE;
                                                                               ^
C:/msys32/home/Davide/esp/Avior_ESP32_WiFi/main/ota.c:96:104: error: 'EFUSE_RD_DISABLE_JTAG' undeclared (first use in this function)
     uint32_t new_fuse = EFUSE_DISABLE_DL_ENCRYPT | EFUSE_DISABLE_DL_DECRYPT | EFUSE_DISABLE_DL_CACHE | EFUSE_RD_DISABLE_JTAG | EFUSE_RD_CONSOLE_DEBUG_DISABLE;
                                                                                                        ^
C:/msys32/home/Davide/esp/Avior_ESP32_WiFi/main/ota.c:96:128: error: 'EFUSE_RD_CONSOLE_DEBUG_DISABLE' undeclared (first use in this function)
     uint32_t new_fuse = EFUSE_DISABLE_DL_ENCRYPT | EFUSE_DISABLE_DL_DECRYPT | EFUSE_DISABLE_DL_CACHE | EFUSE_RD_DISABLE_JTAG | EFUSE_RD_CONSOLE_DEBUG_DISABLE;
                                                                                                                                ^
In file included from C:/msys32/home/Davide/esp/esp-idf-v3.3/components/esp32/include/rom/ets_sys.h:21:0,
                 from C:/msys32/home/Davide/esp/esp-idf-v3.3/components/freertos/include/freertos/FreeRTOSConfig.h:120,
                 from C:/msys32/home/Davide/esp/esp-idf-v3.3/components/esp32/include/esp_task.h:30,
                 from C:/msys32/home/Davide/esp/esp-idf-v3.3/components/lwip/port/esp32/include/lwipopts.h:43,
                 from C:/msys32/home/Davide/esp/esp-idf-v3.3/components/lwip/lwip/src/include/lwip/opt.h:51,
                 from C:/msys32/home/Davide/esp/esp-idf-v3.3/components/lwip/lwip/src/include/lwip/netdb.h:37,
                 from C:/msys32/home/Davide/esp/esp-idf-v3.3/components/lwip/port/esp32/include/netdb.h:33,
                 from C:/msys32/home/Davide/esp/Avior_ESP32_WiFi/main/glob_inc.h:20,
                 from C:/msys32/home/Davide/esp/Avior_ESP32_WiFi/main/ota.c:3:
C:/msys32/home/Davide/esp/Avior_ESP32_WiFi/main/ota.c:98:30: error: 'EFUSE_BLK0_RDATA6_REG' undeclared (first use in this function)
     if ((new_fuse & REG_READ(EFUSE_BLK0_RDATA6_REG)) != new_fuse)
                              ^
C:/msys32/home/Davide/esp/esp-idf-v3.3/components/soc/esp32/include/soc/soc.h:165:37: note: in definition of macro 'REG_READ'
             (*(volatile uint32_t *)(_r));                                                                              \
                                     ^
C:/msys32/home/Davide/esp/Avior_ESP32_WiFi/main/ota.c:101:19: error: 'EFUSE_BLK0_WDATA6_REG' undeclared (first use in this function)
         REG_WRITE(EFUSE_BLK0_WDATA6_REG, new_fuse);
                   ^
C:/msys32/home/Davide/esp/esp-idf-v3.3/components/soc/esp32/include/soc/soc.h:159:37: note: in definition of macro 'REG_WRITE'
             (*(volatile uint32_t *)(_r)) = (_v);  
However, it seems that the missing definition are present in

Code: Select all

IDF_PATH\components\soc\esp32\include\soc\efuse_reg.h
If I switch back to esp-idf v3.2, everything compiles correctly. What Am I wrong?

thanks

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: Error 'EFUSE_DISABLE_DL_DECRYPT' undeclared when compile with esp-idf-v3.3

Postby davdav » Wed Sep 18, 2019 12:26 pm

I was able to fix the problem including specifically these header files

Code: Select all

#include "esp_efuse.h"
#include "soc/efuse_reg.h"
Now I have another error:

Code: Select all

make: *** No rule to make target '/home/Davide/esp/Avior_ESP32_WiFi/build_v2_EspIdfV3.3/esp32/esp32.project.ld', needed by 'C:/msys32/home/Davide/esp/esp-idf-v3.3/../Avior_ESP32_WiFi/build_v2_EspIdfV3.3/Avior_ESP32_WiFi.elf'.  Stop.
someone has got this error?

thanks

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: Error 'EFUSE_DISABLE_DL_DECRYPT' undeclared when compile with esp-idf-v3.3

Postby davdav » Tue Sep 24, 2019 7:07 am

davdav wrote:
Wed Sep 18, 2019 12:26 pm
I was able to fix the problem including specifically these header files

Code: Select all

#include "esp_efuse.h"
#include "soc/efuse_reg.h"
Now I have another error:

Code: Select all

make: *** No rule to make target '/home/Davide/esp/Avior_ESP32_WiFi/build_v2_EspIdfV3.3/esp32/esp32.project.ld', needed by 'C:/msys32/home/Davide/esp/esp-idf-v3.3/../Avior_ESP32_WiFi/build_v2_EspIdfV3.3/Avior_ESP32_WiFi.elf'.  Stop.
someone has got this error?

thanks
Hello,

Can anyone give any hint on how to solve the above issue?

ESP-IDF-v3.3 need a different toolchain to work? I'm currently on:

Code: Select all

Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
Thanks

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

Re: Error 'EFUSE_DISABLE_DL_DECRYPT' undeclared when compile with esp-idf-v3.3

Postby ESP_Angus » Mon Oct 07, 2019 11:22 pm

davdav wrote:
Wed Sep 18, 2019 12:26 pm

Code: Select all

make: *** No rule to make target '/home/Davide/esp/Avior_ESP32_WiFi/build_v2_EspIdfV3.3/esp32/esp32.project.ld', needed by 'C:/msys32/home/Davide/esp/esp-idf-v3.3/../Avior_ESP32_WiFi/build_v2_EspIdfV3.3/Avior_ESP32_WiFi.elf'.  Stop.
someone has got this error?

thanks
Hi davdav,

You shouldn't need to do this, but if you delete the project's "build" directory and re-run make, does the problem still occur?

Angus

davdav
Posts: 208
Joined: Thu Nov 17, 2016 2:33 pm

Re: Error 'EFUSE_DISABLE_DL_DECRYPT' undeclared when compile with esp-idf-v3.3

Postby davdav » Tue Oct 29, 2019 3:53 pm

ESP_Angus wrote:
Mon Oct 07, 2019 11:22 pm
davdav wrote:
Wed Sep 18, 2019 12:26 pm

Code: Select all

make: *** No rule to make target '/home/Davide/esp/Avior_ESP32_WiFi/build_v2_EspIdfV3.3/esp32/esp32.project.ld', needed by 'C:/msys32/home/Davide/esp/esp-idf-v3.3/../Avior_ESP32_WiFi/build_v2_EspIdfV3.3/Avior_ESP32_WiFi.elf'.  Stop.
someone has got this error?

thanks
Hi davdav,

You shouldn't need to do this, but if you delete the project's "build" directory and re-run make, does the problem still occur?

Angus
Hello Angus,

I think I have solved, cancelling makefile and component.mk file..then I have re-run compile and it seems to work.

Thanks

Who is online

Users browsing this forum: No registered users and 94 guests