error while running the hello world sample

ujurmsde
Posts: 18
Joined: Tue Jan 19, 2021 6:37 am

error while running the hello world sample

Postby ujurmsde » Tue Jan 25, 2022 9:56 am

While using the esp-idf platform I tried to run the hello_world example, I got the following error. I am using Linux and esp-idf version 4.2,
Many times, I encounter errors related to either segmentation fault or one as similar to the following. I have no idea how to solve this error?

$if.py build

Code: Select all

In file included from ../../../../components/soc/soc/esp32s2/../include/soc/rtc_io_periph.h:23,
                 from ../../../../components/soc/soc/esp32s2/../include/soc/rtc_periph.h:17,
                 from /home/ujjval/esp/esp-idf/components/soc/soc/esp32s2/rtc_periph.c:15:
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:438:9: error: macro names must be identifiers
 #define �TC_CNTL_TXRF_I2C_PU_V  0x1
         ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:457:33: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_PLLA_FORCE_PU_S� 24
                                 ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:460:20: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_PL\A_FORCE_PD  (BIT(23))
                    ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:463:24: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_PLLA_F|RCE_PD_S  23
                        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:469:2: error: invalid preprocessing directive #def; did you mean #ifdef?
 #defne RTC_CNTL_SAR_I2C_FORCE_PU_S  22
  ^~~
  ifdef
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:474:22: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_SAR_2C_FORCE_PD_V  0x1
                      ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:480:28: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_GLITCH_RST<EN_V  0x1
                            ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:486:13: warning: ISO C99 requires whitespace after the macro name
 #define RTC_-NTL_I2C_RESET_POR_FORCE_PU_V  0x1
             ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:491:33: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_I2C_RESET_POR_F�RCE_PD_M  (BIT(18))
                                 ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:495:14: warning: ISO C99 requires whitespace after the macro name
 #define RTC_C�TL_RESET_STATE_REG          (DR_REG_RTCCNTL_BASE + 0x0038)
              ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:504:24: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_APPCPU{STAT_VECTOR_SEL  (BIT(12))
                        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:507:1: error: stray '\204' in program
 �define RTC_CNTL_APPCPU_STAT_VECTOR_SEL_S  12
 ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:507:2: error: unknown type name 'define'
 �define RTC_CNTL_APPCPU_STAT_VECTOR_SEL_S  12
  ^~~~~~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:507:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
 �define RTC_CNTL_APPCPU_STAT_VECTOR_SEL_S  12
                                            ^~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:513:33: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_RESET_CAUSE_APPPU_S  6
                                 ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:521:29: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_WAKEUP_STAT_REG          (DR_REG_RTCCNTL_BASE + 0x003C)
                             ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:534:13: warning: ISO C99 requires whitespace after the macro name
 #define RTC_NTL_GLITCH_DET_INT_ENA_V  0x1
             ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:534: warning: "RTC_" redefined
 #define RTC_NTL_GLITCH_DET_INT_ENA_V  0x1
 
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:486: note: this is the location of the previous definition
 #define RTC_-NTL_I2C_RESET_POR_FORCE_PU_V  0x1
 
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:556:8: warning: missing terminating ' character
 #define'RTC_CNTL_SWD_INT_ENA_M  (BIT(15))
        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:556:8: error: macro names must be identifiers
 #define'RTC_CNTL_SWD_INT_ENA_M  (BIT(15))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:565:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
 .* RTC_CNTL_COCPU_INT_ENA : R/W ;bitpos:[13] ;default: 1'b0 ; */
                                        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:565:47: error: expected identifier or '(' before 'default'
 .* RTC_CNTL_COCPU_INT_ENA : R/W ;bitpos:[13] ;default: 1'b0 ; */
                                               ^~~~~~~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:565:57: warning: missing terminating ' character
 .* RTC_CNTL_COCPU_INT_ENA : R/W ;bitpos:[13] ;default: 1'b0 ; */
                                                         ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:565:57: error: missing terminating ' character
 .* RTC_CNTL_COCPU_INT_ENA : R/W ;bitpos:[13] ;default: 1'b0 ; */
                                                         ^~~~~~~~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:567:18: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_�OCPU_INT_ENA  (BIT(13))
                  ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:573:8: error: macro names must be identifiers
 #define!RTC_CNTL_TSENS_INT_ENA  (BIT(12))
        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:592:8: error: macro names must be identifiers
 #define#RTC_CNTL_BROWN_OUT_INT_ENA_M  (BIT(9))
        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:597:13: warning: ISO C99 requires whitespace after the macro name
 #define RTC_�NTL_TOUCH_INACTIVE_INT_ENA  (BIT(8))
             ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:597: warning: "RTC_" redefined
 #define RTC_�NTL_TOUCH_INACTIVE_INT_ENA  (BIT(8))
 
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:534: note: this is the location of the previous definition
 #define RTC_NTL_GLITCH_DET_INT_ENA_V  0x1
 
In file included from ../../../../components/soc/soc/esp32s2/../include/soc/rtc_io_periph.h:24,
                 from ../../../../components/soc/soc/esp32s2/../include/soc/rtc_periph.h:17,
                 from /home/ujjval/esp/esp-idf/components/soc/soc/esp32s2/rtc_periph.c:15:
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_struct.h:880:3: warning: data definition has no type or storage class
 } rtc_cntl_dev_t;
   ^~~~~~~~~~~~~~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_struct.h:880:3: error: type defaults to 'int' in declaration of 'rtc_cntl_dev_t' [-Werror=implicit-int]
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_struct.h:881:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'RTCCNTL'
 extern rtc_cntl_dev_t RTCCNTL;
                       ^~~~~~~
cc1: some warnings being treated as errors
[99/927] Building C object esp-idf/soc...es/soc_esp32s2.dir/rtc_io_periph.c.obj
FAILED: esp-idf/soc/soc/esp32s2/CMakeFiles/soc_esp32s2.dir/rtc_io_periph.c.obj 
/home/ujjval/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-gcc  -Iconfig -I../../../../components/soc/soc/esp32s2/include -I../../../../components/soc/soc/esp32s2/../include -I../../../../components/soc/soc/esp32s2/private_include -I../../../../components/newlib/platform_include -I../../../../components/freertos/include -I../../../../components/freertos/xtensa/include -I../../../../components/heap/include -I../../../../components/log/include -I../../../../components/lwip/include/apps -I../../../../components/lwip/include/apps/sntp -I../../../../components/lwip/lwip/src/include -I../../../../components/lwip/port/esp32/include -I../../../../components/lwip/port/esp32/include/arch -I../../../../components/soc/src/esp32s2/. -I../../../../components/soc/src/esp32s2/include -I../../../../components/soc/include -I../../../../components/esp_rom/include -I../../../../components/esp_common/include -I../../../../components/esp_system/include -I../../../../components/xtensa/include -I../../../../components/xtensa/esp32s2/include -I../../../../components/esp32s2/include -I../../../../components/driver/include -I../../../../components/driver/esp32s2/include -I../../../../components/esp_ringbuf/include -I../../../../components/efuse/include -I../../../../components/efuse/esp32s2/include -I../../../../components/espcoredump/include -I../../../../components/esp_timer/include -I../../../../components/esp_ipc/include -I../../../../components/vfs/include -I../../../../components/esp_wifi/include -I../../../../components/esp_wifi/esp32s2/include -I../../../../components/esp_event/include -I../../../../components/esp_netif/include -I../../../../components/esp_eth/include -I../../../../components/tcpip_adapter/include -I../../../../components/app_trace/include -mlongcalls   -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.2-dirty\" -DESP_PLATFORM -MD -MT esp-idf/soc/soc/esp32s2/CMakeFiles/soc_esp32s2.dir/rtc_io_periph.c.obj -MF esp-idf/soc/soc/esp32s2/CMakeFiles/soc_esp32s2.dir/rtc_io_periph.c.obj.d -o esp-idf/soc/soc/esp32s2/CMakeFiles/soc_esp32s2.dir/rtc_io_periph.c.obj   -c /home/ujjval/esp/esp-idf/components/soc/soc/esp32s2/rtc_io_periph.c
In file included from ../../../../components/soc/soc/esp32s2/../include/soc/rtc_io_periph.h:23,
                 from /home/ujjval/esp/esp-idf/components/soc/soc/esp32s2/rtc_io_periph.c:15:
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:438:9: error: macro names must be identifiers
 #define �TC_CNTL_TXRF_I2C_PU_V  0x1
         ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:457:33: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_PLLA_FORCE_PU_S� 24
                                 ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:460:20: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_PL\A_FORCE_PD  (BIT(23))
                    ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:463:24: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_PLLA_F|RCE_PD_S  23
                        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:469:2: error: invalid preprocessing directive #def; did you mean #ifdef?
 #defne RTC_CNTL_SAR_I2C_FORCE_PU_S  22
  ^~~
  ifdef
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:474:22: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_SAR_2C_FORCE_PD_V  0x1
                      ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:480:28: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_GLITCH_RST<EN_V  0x1
                            ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:486:13: warning: ISO C99 requires whitespace after the macro name
 #define RTC_-NTL_I2C_RESET_POR_FORCE_PU_V  0x1
             ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:491:33: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_I2C_RESET_POR_F�RCE_PD_M  (BIT(18))
                                 ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:495:14: warning: ISO C99 requires whitespace after the macro name
 #define RTC_C�TL_RESET_STATE_REG          (DR_REG_RTCCNTL_BASE + 0x0038)
              ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:504:24: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_APPCPU{STAT_VECTOR_SEL  (BIT(12))
                        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:507:1: error: stray '\204' in program
 �define RTC_CNTL_APPCPU_STAT_VECTOR_SEL_S  12
 ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:507:2: error: unknown type name 'define'
 �define RTC_CNTL_APPCPU_STAT_VECTOR_SEL_S  12
  ^~~~~~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:507:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
 �define RTC_CNTL_APPCPU_STAT_VECTOR_SEL_S  12
                                            ^~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:513:33: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_RESET_CAUSE_APPPU_S  6
                                 ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:521:29: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_WAKEUP_STAT_REG          (DR_REG_RTCCNTL_BASE + 0x003C)
                             ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:534:13: warning: ISO C99 requires whitespace after the macro name
 #define RTC_NTL_GLITCH_DET_INT_ENA_V  0x1
             ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:534: warning: "RTC_" redefined
 #define RTC_NTL_GLITCH_DET_INT_ENA_V  0x1
 
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:486: note: this is the location of the previous definition
 #define RTC_-NTL_I2C_RESET_POR_FORCE_PU_V  0x1
 
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:556:8: warning: missing terminating ' character
 #define'RTC_CNTL_SWD_INT_ENA_M  (BIT(15))
        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:556:8: error: macro names must be identifiers
 #define'RTC_CNTL_SWD_INT_ENA_M  (BIT(15))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:565:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
 .* RTC_CNTL_COCPU_INT_ENA : R/W ;bitpos:[13] ;default: 1'b0 ; */
                                        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:565:47: error: expected identifier or '(' before 'default'
 .* RTC_CNTL_COCPU_INT_ENA : R/W ;bitpos:[13] ;default: 1'b0 ; */
                                               ^~~~~~~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:565:57: warning: missing terminating ' character
 .* RTC_CNTL_COCPU_INT_ENA : R/W ;bitpos:[13] ;default: 1'b0 ; */
                                                         ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:565:57: error: missing terminating ' character
 .* RTC_CNTL_COCPU_INT_ENA : R/W ;bitpos:[13] ;default: 1'b0 ; */
                                                         ^~~~~~~~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:567:18: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_�OCPU_INT_ENA  (BIT(13))
                  ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:573:8: error: macro names must be identifiers
 #define!RTC_CNTL_TSENS_INT_ENA  (BIT(12))
        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:592:8: error: macro names must be identifiers
 #define#RTC_CNTL_BROWN_OUT_INT_ENA_M  (BIT(9))
        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:597:13: warning: ISO C99 requires whitespace after the macro name
 #define RTC_�NTL_TOUCH_INACTIVE_INT_ENA  (BIT(8))
             ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:597: warning: "RTC_" redefined
 #define RTC_�NTL_TOUCH_INACTIVE_INT_ENA  (BIT(8))
 
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:534: note: this is the location of the previous definition
 #define RTC_NTL_GLITCH_DET_INT_ENA_V  0x1
 
In file included from ../../../../components/soc/soc/esp32s2/../include/soc/rtc_io_periph.h:24,
                 from /home/ujjval/esp/esp-idf/components/soc/soc/esp32s2/rtc_io_periph.c:15:
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_struct.h:880:3: warning: data definition has no type or storage class
 } rtc_cntl_dev_t;
   ^~~~~~~~~~~~~~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_struct.h:880:3: error: type defaults to 'int' in declaration of 'rtc_cntl_dev_t' [-Werror=implicit-int]
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_struct.h:881:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'RTCCNTL'
 extern rtc_cntl_dev_t RTCCNTL;
                       ^~~~~~~
cc1: some warnings being treated as errors
[101/927] Building C object esp-idf/bo...support.dir/src/bootloader_clock.c.obj
FAILED: esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock.c.obj 
/home/ujjval/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-gcc -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -Iconfig -I../../../../components/bootloader_support/include -I../../../../components/bootloader_support/include_bootloader -I../../../../components/newlib/platform_include -I../../../../components/freertos/include -I../../../../components/freertos/xtensa/include -I../../../../components/heap/include -I../../../../components/log/include -I../../../../components/lwip/include/apps -I../../../../components/lwip/include/apps/sntp -I../../../../components/lwip/lwip/src/include -I../../../../components/lwip/port/esp32/include -I../../../../components/lwip/port/esp32/include/arch -I../../../../components/soc/src/esp32s2/. -I../../../../components/soc/src/esp32s2/include -I../../../../components/soc/include -I../../../../components/esp_rom/include -I../../../../components/esp_common/include -I../../../../components/esp_system/include -I../../../../components/xtensa/include -I../../../../components/xtensa/esp32s2/include -I../../../../components/esp32s2/include -I../../../../components/driver/include -I../../../../components/driver/esp32s2/include -I../../../../components/esp_ringbuf/include -I../../../../components/efuse/include -I../../../../components/efuse/esp32s2/include -I../../../../components/espcoredump/include -I../../../../components/esp_timer/include -I../../../../components/esp_ipc/include -I../../../../components/soc/soc/esp32s2/include -I../../../../components/soc/soc/esp32s2/../include -I../../../../components/soc/soc/esp32s2/private_include -I../../../../components/vfs/include -I../../../../components/esp_wifi/include -I../../../../components/esp_wifi/esp32s2/include -I../../../../components/esp_event/include -I../../../../components/esp_netif/include -I../../../../components/esp_eth/include -I../../../../components/tcpip_adapter/include -I../../../../components/app_trace/include -I../../../../components/spi_flash/include -I../../../../components/mbedtls/port/include -I../../../../components/mbedtls/mbedtls/include -I../../../../components/mbedtls/esp_crt_bundle/include -mlongcalls   -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.2-dirty\" -DESP_PLATFORM -MD -MT esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock.c.obj -MF esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock.c.obj.d -o esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock.c.obj   -c /home/ujjval/esp/esp-idf/components/bootloader_support/src/bootloader_clock.c
In file included from /home/ujjval/esp/esp-idf/components/bootloader_support/src/bootloader_clock.c:19:
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:438:9: error: macro names must be identifiers
 #define �TC_CNTL_TXRF_I2C_PU_V  0x1
         ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:457:33: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_PLLA_FORCE_PU_S� 24
                                 ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:460:20: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_PL\A_FORCE_PD  (BIT(23))
                    ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:463:24: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_PLLA_F|RCE_PD_S  23
                        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:469:2: error: invalid preprocessing directive #def; did you mean #ifdef?
 #defne RTC_CNTL_SAR_I2C_FORCE_PU_S  22
  ^~~
  ifdef
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:474:22: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_SAR_2C_FORCE_PD_V  0x1
                      ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:480:28: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_GLITCH_RST<EN_V  0x1
                            ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:486:13: warning: ISO C99 requires whitespace after the macro name
 #define RTC_-NTL_I2C_RESET_POR_FORCE_PU_V  0x1
             ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:491:33: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_I2C_RESET_POR_F�RCE_PD_M  (BIT(18))
                                 ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:495:14: warning: ISO C99 requires whitespace after the macro name
 #define RTC_C�TL_RESET_STATE_REG          (DR_REG_RTCCNTL_BASE + 0x0038)
              ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:504:24: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_APPCPU{STAT_VECTOR_SEL  (BIT(12))
                        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:507:1: error: stray '\204' in program
 �define RTC_CNTL_APPCPU_STAT_VECTOR_SEL_S  12
 ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:507:2: error: unknown type name 'define'
 �define RTC_CNTL_APPCPU_STAT_VECTOR_SEL_S  12
  ^~~~~~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:507:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
 �define RTC_CNTL_APPCPU_STAT_VECTOR_SEL_S  12
                                            ^~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:513:33: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_RESET_CAUSE_APPPU_S  6
                                 ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:521:29: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_WAKEUP_STAT_REG          (DR_REG_RTCCNTL_BASE + 0x003C)
                             ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:534:13: warning: ISO C99 requires whitespace after the macro name
 #define RTC_NTL_GLITCH_DET_INT_ENA_V  0x1
             ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:534: warning: "RTC_" redefined
 #define RTC_NTL_GLITCH_DET_INT_ENA_V  0x1
 
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:486: note: this is the location of the previous definition
 #define RTC_-NTL_I2C_RESET_POR_FORCE_PU_V  0x1
 
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:556:8: warning: missing terminating ' character
 #define'RTC_CNTL_SWD_INT_ENA_M  (BIT(15))
        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:556:8: error: macro names must be identifiers
 #define'RTC_CNTL_SWD_INT_ENA_M  (BIT(15))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:565:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
 .* RTC_CNTL_COCPU_INT_ENA : R/W ;bitpos:[13] ;default: 1'b0 ; */
                                        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:565:47: error: expected identifier or '(' before 'default'
 .* RTC_CNTL_COCPU_INT_ENA : R/W ;bitpos:[13] ;default: 1'b0 ; */
                                               ^~~~~~~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:565:57: warning: missing terminating ' character
 .* RTC_CNTL_COCPU_INT_ENA : R/W ;bitpos:[13] ;default: 1'b0 ; */
                                                         ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:565:57: error: missing terminating ' character
 .* RTC_CNTL_COCPU_INT_ENA : R/W ;bitpos:[13] ;default: 1'b0 ; */
                                                         ^~~~~~~~
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:567:18: warning: ISO C99 requires whitespace after the macro name
 #define RTC_CNTL_�OCPU_INT_ENA  (BIT(13))
                  ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:573:8: error: macro names must be identifiers
 #define!RTC_CNTL_TSENS_INT_ENA  (BIT(12))
        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:592:8: error: macro names must be identifiers
 #define#RTC_CNTL_BROWN_OUT_INT_ENA_M  (BIT(9))
        ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:597:13: warning: ISO C99 requires whitespace after the macro name
 #define RTC_�NTL_TOUCH_INACTIVE_INT_ENA  (BIT(8))
             ^
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:597: warning: "RTC_" redefined
 #define RTC_�NTL_TOUCH_INACTIVE_INT_ENA  (BIT(8))
 
../../../../components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h:534: note: this is the location of the previous definition
 #define RTC_NTL_GLITCH_DET_INT_ENA_V  0x1
 
In file included from ../../../../components/esp_rom/include/esp32s2/rom/uart.h:20,
                 from /home/ujjval/esp/esp-idf/components/bootloader_support/src/bootloader_clock.c:25:
../../../../components/esp_rom/include/esp32s2/rom/ets_sys.h:57:3: warning: data definition has no type or storage class
 } ETS_STATUS;
   ^~~~~~~~~~
../../../../components/esp_rom/include/esp32s2/rom/ets_sys.h:57:3: error: type defaults to 'int' in declaration of 'ETS_STATUS' [-Werror=implicit-int]
../../../../components/esp_rom/include/esp32s2/rom/ets_sys.h:59:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ets_status_t'
 typedef ETS_STATUS ets_status_t;
                    ^~~~~~~~~~~~
../../../../components/esp_rom/include/esp32s2/rom/ets_sys.h:121:1: error: unknown type name 'ETS_STATUS'; did you mean 'EFUSE_STATE'?
 ETS_STATUS ets_post(uint8_t prio, ETSSignal sig, ETSParam par);
 ^~~~~~~~~~
 EFUSE_STATE
cc1: some warnings being treated as errors
[106/927] Building C object esp-idf/mb...y/CMakeFiles/mbedtls.dir/ssl_tls.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1


ESP_Sprite
Posts: 6359
Joined: Thu Nov 26, 2015 4:08 am

Re: error while running the hello world sample

Postby ESP_Sprite » Tue Jan 25, 2022 2:05 pm

It looks like something is very, very wrong with either your ESP-IDF install or your computer: either the files on disk are corrupted or your computer corrupts them after reading them into memory (which would also explain the segfaults). I'd try removing ESP-IDF entirely and re-installing it. If that doesn't work, I'd look at your hardware (as in: the computer, not the ESP32 itself): is it otherwise unstable, are the temperatures OK? If that doesn't work... maybe an exorcist?

ujurmsde
Posts: 18
Joined: Tue Jan 19, 2021 6:37 am

Re: error while running the hello world sample

Postby ujurmsde » Tue Jan 25, 2022 4:18 pm

You have exactly found the issue. The file was corrupted with some random spacial character and #defive instead of #define etc. :lol: :lol:

For now, I changed the only file which gave me an error by pasting it from Github.

The thing is for quite some time I am using an external SSD to boot Linux. It works fine for me on all other projects but did not realize until today that it can corrupt files.!!

mrugesh_goriwale
Posts: 1
Joined: Sat Mar 19, 2022 9:38 am

Re: error while running the hello world sample

Postby mrugesh_goriwale » Sat Mar 19, 2022 9:51 am

I am also getting same error of" Ninja Failed with exit code1" with following screen shot. I am working on Windows10 with ESP IDF. Please any body can tell me how to come out of this situation.

File "C:\ESPRESSIF-ESP32\python_env\idf4.2_py3.8_env\lib\site-packages\serial\serialwin32.py", line 64, in open
raise SerialException("could not open port {!r}: {!r}".format(self.portstr, ctypes.WinError()))
serial.serialutil.SerialException: could not open port 'PORT13': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2)
CMake Error at run_cmd.cmake:14 (message):
esptool.py failed
Call Stack (most recent call first):
run_esptool.cmake:21 (include)


FAILED: CMakeFiles/flash
cmd.exe /C "cd /D C:\Users\mruge\Desktop\esp-idf\components\esptool_py && C:\ESPRESSIF-ESP32\tools\cmake\3.16.4\bin\cmake.exe -D IDF_PATH="C:/Users/mruge/Desktop/esp-idf" -D ESPTOOLPY="C:\ESPRESSIF-ESP32\python_env\idf4.2_py3.8_env\Scripts\python.exe C:/Users/mruge/Desktop/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32" -D ESPTOOL_ARGS="--before=default_reset --after=hard_reset write_flash @flash_args" -D WORKING_DIRECTORY="C:/Users/mruge/esp/hello_world/build" -P C:/Users/mruge/Desktop/esp-idf/components/esptool_py/run_esptool.cmake"
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

Who is online

Users browsing this forum: Bing [Bot] and 62 guests