msys2 in win10(32bit) compiler normal, but in win10(64bit ) compile error

billminux
Posts: 6
Joined: Wed Jun 07, 2017 2:32 pm

msys2 in win10(32bit) compiler normal, but in win10(64bit ) compile error

Postby billminux » Wed Jun 07, 2017 11:04 pm

The environment is configured according to the Webpage http://esp-idf.readthedocs.io/en/latest ... setup.html , msys2
the same environment in win10(32bit) compiler normal, but in win10(64bit ) compile the following error,why?

Code: Select all

$ make
make[1]: 进入目录“/c/esp32/esp-idf/tools/kconfig”
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o mconf.o mconf.c
flex -L -P zconf -o zconf.lex.c zconf.l
zconf.l:256: warning, -s 选项已给定但是可以吻合缺省规则
bison -t -l -p zconf -o zconf.tab.c zconf.y
sed -E "s/\\x0D$//" zconf.gperf | gperf -t --output-file zconf.hash.c -a -C -E -g -k '1,3,$' -p -t
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o zconf.tab.o zconf.tab.c
lxdialog/check-lxdialog.sh -check cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE -lncursesw -lintl
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o lxdialog/checklist.o lxdialog/checklist.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o lxdialog/util.o lxdialog/util.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o lxdialog/inputbox.o lxdialog/inputbox.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o lxdialog/textbox.o lxdialog/textbox.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o lxdialog/yesno.o lxdialog/yesno.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o lxdialog/menubox.o lxdialog/menubox.c
cc -o mconf mconf.o zconf.tab.o lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o -lncursesw -lintl
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o conf.o conf.c
cc -o conf conf.o  zconf.tab.o -lncursesw -lintl
make[1]: 离开目录“/c/esp32/esp-idf/tools/kconfig”
GENCONFIG
CC src/bootloader_random.o
CC src/flash_encrypt.o
C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c: In function 'initialise_flash_encryption':
C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c:88:9: error: implicit declaration of function 'bzero' [-Werror=implicit-function-declaration]
         bzero(buf, sizeof(buf));
         ^
C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c:88:9: warning: incompatible implicit declaration of built-in function 'bzero'
cc1.exe: some warnings being treated as errors
make[2]: *** [/c/esp32/esp-idf/make/component_wrapper.mk:211:src/flash_encrypt.o] 错误 1
make[1]: *** [/c/esp32/esp-idf/make/project.mk:386:bootloader_support-build] 错误 2
make: *** [/c/esp32/esp-idf/components/bootloader/Makefile.projbuild:31:/c/esp32/myapp/build/bootloader/bootloader.bin] 错误 2

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

Re: msys2 in win10(32bit) compiler normal, but in win10(64bit ) compile error

Postby ESP_Angus » Thu Jun 08, 2017 1:52 am

Hi Bill,

Can you please run "make V=1" for the failed build and post the output?

Angus

billminux
Posts: 6
Joined: Wed Jun 07, 2017 2:32 pm

Re: msys2 in win10(32bit) compiler normal, but in win10(64bit ) compile error

Postby billminux » Thu Jun 08, 2017 2:14 am

Code: Select all

$ make V=1
including /c/esp32/esp-idf/components/bootloader/Makefile.projbuild...
including /c/esp32/esp-idf/components/bootloader_support/Makefile.projbuild...
including /c/esp32/esp-idf/components/coap/Makefile.projbuild...
including /c/esp32/esp-idf/components/esp32/Makefile.projbuild...
including /c/esp32/esp-idf/components/esptool_py/Makefile.projbuild...
including /c/esp32/esp-idf/components/mbedtls/Makefile.projbuild...
including /c/esp32/esp-idf/components/nghttp/Makefile.projbuild...
including /c/esp32/esp-idf/components/partition_table/Makefile.projbuild...
including /c/esp32/esp-idf/components/ulp/Makefile.projbuild...
make -C /c/esp32/esp-idf/components/bootloader/src V=1 BUILD_DIR_BASE=/c/esp32/m                                                                                                                yapp/build/bootloader TEST_COMPONENTS= TESTS_ALL= /c/esp32/myapp/build/bootloade                                                                                                                r/bootloader.bin
make[1]: 进入目录“/c/esp32/esp-idf/components/bootloader/src”
including /c/esp32/esp-idf/components/esptool_py/Makefile.projbuild...
including /c/esp32/esp-idf/components/bootloader/Makefile.projbuild...
including /c/esp32/esp-idf/components/bootloader_support/Makefile.projbuild...
including /c/esp32/esp-idf/components/bootloader/src/main/Makefile.projbuild...
make -C /c/esp32/myapp/build/bootloader/bootloader_support -f /c/esp32/esp-idf/m                                                                                                                ake/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/bootload                                                                                                                er_support/component.mk COMPONENT_NAME=bootloader_support build
make[2]: 进入目录“/c/esp32/myapp/build/bootloader/bootloader_support”
xtensa-esp32-elf-gcc -std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -f                                                                                                                strict-volatile-bitfields -mlongcalls -nostdlib -Wall -Werror=all -Wno-error=unu                                                                                                                sed-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-                                                                                                                error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -W                                                                                                                no-old-style-declaration -std=gnu99 -Og -ggdb -ffunction-sections -fdata-section                                                                                                                s -fstrict-volatile-bitfields -mlongcalls -nostdlib -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-compar                                                                                                                e -Wno-old-style-declaration -DWITH_POSIX -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_co                                                                                                                nfig.h"' -DHAVE_CONFIG_H -I/c/esp32/myapp/build/bootloader/../include -D BOOTLOA                                                                                                                DER_BUILD=1 -I /c/esp32/esp-idf/components/esp32/include -DESP_PLATFORM -D IDF_V                                                                                                                ER=\"v2.0-rc1-928-g99d5959d\" -MMD -MP -DESP_PLATFORM -D IDF_VER=\"v2.0-rc1-928-                                                                                                                g99d5959d\" -MMD -MP    -I /c/esp32/esp-idf/components/bootloader_support/includ                                                                                                                e -I /c/esp32/esp-idf/components/bootloader_support/include_priv -I /c/esp32/esp                                                                                                                -idf/components/bootloader_support/include_priv -I /c/esp32/esp-idf/components/l                                                                                                                og/include -I /c/esp32/esp-idf/components/spi_flash/include -I /c/esp32/esp-idf/                                                                                                                components/micro-ecc/micro-ecc -I /c/esp32/esp-idf/components/soc/esp32/include                                                                                                                 -I /c/esp32/esp-idf/components/bootloader/src/main/include -I /c/esp32/myapp/bui                                                                                                                ld/bootloader/include  -Isrc -c /c/esp32/esp-idf/components/bootloader_support/s                                                                                                                rc/flash_encrypt.c -o src/flash_encrypt.o
C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c: In function                                                                                                                 'initialise_flash_encryption':
C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c:88:9: error:                                                                                                                 implicit declaration of function 'bzero' [-Werror=implicit-function-declaration]
         bzero(buf, sizeof(buf));
         ^
C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c:88:9: warning                                                                                                                : incompatible implicit declaration of built-in function 'bzero'
cc1.exe: some warnings being treated as errors
make[2]: *** [/c/esp32/esp-idf/make/component_wrapper.mk:211:src/flash_encrypt.                                                                                                                o] 错误 1
make[2]: 离开目录“/c/esp32/myapp/build/bootloader/bootloader_support”
make[1]: *** [/c/esp32/esp-idf/make/project.mk:386:bootloader_support-build] 错                                                                                                                误 2
make[1]: 离开目录“/c/esp32/esp-idf/components/bootloader/src”
make: *** [/c/esp32/esp-idf/components/bootloader/Makefile.projbuild:31:/c/esp3                                                                                                                2/myapp/build/bootloader/bootloader.bin] 错误 2

billminux
Posts: 6
Joined: Wed Jun 07, 2017 2:32 pm

Re: msys2 in win10(32bit) compiler normal, but in win10(64bit ) compile error

Postby billminux » Thu Jun 08, 2017 5:26 am

Code: Select all

$ make V=1
including /c/esp32/esp-idf/components/bootloader/Makefile.projbuild...
including /c/esp32/esp-idf/components/bootloader_support/Makefile.projbuild...
including /c/esp32/esp-idf/components/coap/Makefile.projbuild...
including /c/esp32/esp-idf/components/esp32/Makefile.projbuild...
including /c/esp32/esp-idf/components/esptool_py/Makefile.projbuild...
including /c/esp32/esp-idf/components/mbedtls/Makefile.projbuild...
including /c/esp32/esp-idf/components/nghttp/Makefile.projbuild...
including /c/esp32/esp-idf/components/partition_table/Makefile.projbuild...
including /c/esp32/esp-idf/components/ulp/Makefile.projbuild...
MAKEFLAGS= CC=cc LD=ld \
make -C /c/esp32/esp-idf/tools/kconfig
make[1]: 进入目录“/c/esp32/esp-idf/tools/kconfig”
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o mconf.o mconf.c
flex -L -P zconf -o zconf.lex.c zconf.l
zconf.l:256: warning, -s 选项已给定但是可以吻合缺省规则
bison -t -l -p zconf -o zconf.tab.c zconf.y
sed -E "s/\\x0D$//" zconf.gperf | gperf -t --output-file zconf.hash.c -a -C -E -g -k '1,3,$' -p -t
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o zconf.tab.o zconf.tab.c
lxdialog/check-lxdialog.sh -check cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE -lncursesw -lintl
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o lxdialog/checklist.o lxdialog/checklist.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o lxdialog/util.o lxdialog/util.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o lxdialog/inputbox.o lxdialog/inputbox.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o lxdialog/textbox.o lxdialog/textbox.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o lxdialog/yesno.o lxdialog/yesno.c
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o lxdialog/menubox.o lxdialog/menubox.c
cc -o mconf mconf.o zconf.tab.o lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o -lncursesw -lintl
cc  -I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"  -DNCURSES_WIDECHAR=1 -DLOCALE   -c -o conf.o conf.c
cc -o conf conf.o  zconf.tab.o -lncursesw -lintl
make[1]: 离开目录“/c/esp32/esp-idf/tools/kconfig”
mkdir -p /c/esp32/myapp/build/include/config
cd /c/esp32/myapp/build; KCONFIG_AUTOHEADER=/c/esp32/myapp/build/include/sdkconfig.h COMPONENT_KCONFIGS=" /c/esp32/esp-idf/components/aws_iot/Kconfig   /c/esp32/esp-idf/components/bt/Kconfig    /c/esp32/esp-idf/components/esp32/Kconfig   /c/esp32/esp-idf/components/ethernet/Kconfig  /c/esp32/esp-idf/components/fatfs/Kconfig /c/esp32/esp-idf/components/freertos/Kconfig    /c/esp32/esp-idf/components/log/Kconfig /c/esp32/esp-idf/components/lwip/Kconfig /c/esp32/esp-idf/components/mbedtls/Kconfig      /c/esp32/esp-idf/components/openssl/Kconfig    /c/esp32/esp-idf/components/spi_flash/Kconfig       " KCONFIG_CONFIG=/c/esp32/myapp/sdkconfig COMPONENT_KCONFIGS_PROJBUILD="  /c/esp32/esp-idf/components/bootloader/Kconfig.projbuild        /c/esp32/esp-idf/components/esptool_py/Kconfig.projbuild                 /c/esp32/esp-idf/components/partition_table/Kconfig.projbuild          " /c/esp32/esp-idf/tools/kconfig/conf --silentoldconfig /c/esp32/esp-idf/Kconfig
touch /c/esp32/myapp/build/include/config/auto.conf /c/esp32/myapp/build/include/sdkconfig.h  # ensure newer than sdkconfig
make -C /c/esp32/myapp/build/main -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/myapp/main/component.mk COMPONENT_NAME=main component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/main”
Building component project variables list /c/esp32/myapp/build/main/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/main”
make -C /c/esp32/myapp/build/xtensa-debug-module -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/xtensa-debug-module/component.mk COMPONENT_NAME=xtensa-debug-module component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/xtensa-debug-module”
Building component project variables list /c/esp32/myapp/build/xtensa-debug-module/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/xtensa-debug-module”
make -C /c/esp32/myapp/build/wpa_supplicant -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/wpa_supplicant/component.mk COMPONENT_NAME=wpa_supplicant component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/wpa_supplicant”
Building component project variables list /c/esp32/myapp/build/wpa_supplicant/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/wpa_supplicant”
make -C /c/esp32/myapp/build/wear_levelling -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/wear_levelling/component.mk COMPONENT_NAME=wear_levelling component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/wear_levelling”
Building component project variables list /c/esp32/myapp/build/wear_levelling/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/wear_levelling”
make -C /c/esp32/myapp/build/vfs -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/vfs/component.mk COMPONENT_NAME=vfs component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/vfs”
Building component project variables list /c/esp32/myapp/build/vfs/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/vfs”
make -C /c/esp32/myapp/build/ulp -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/ulp/component.mk COMPONENT_NAME=ulp component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/ulp”
Building component project variables list /c/esp32/myapp/build/ulp/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/ulp”
make -C /c/esp32/myapp/build/tcpip_adapter -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/tcpip_adapter/component.mk COMPONENT_NAME=tcpip_adapter component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/tcpip_adapter”
Building component project variables list /c/esp32/myapp/build/tcpip_adapter/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/tcpip_adapter”
make -C /c/esp32/myapp/build/spi_flash -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/spi_flash/component.mk COMPONENT_NAME=spi_flash component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/spi_flash”
Building component project variables list /c/esp32/myapp/build/spi_flash/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/spi_flash”
make -C /c/esp32/myapp/build/soc -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/soc/component.mk COMPONENT_NAME=soc component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/soc”
Building component project variables list /c/esp32/myapp/build/soc/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/soc”
make -C /c/esp32/myapp/build/sdmmc -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/sdmmc/component.mk COMPONENT_NAME=sdmmc component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/sdmmc”
Building component project variables list /c/esp32/myapp/build/sdmmc/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/sdmmc”
make -C /c/esp32/myapp/build/openssl -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/openssl/component.mk COMPONENT_NAME=openssl component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/openssl”
Building component project variables list /c/esp32/myapp/build/openssl/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/openssl”
make -C /c/esp32/myapp/build/nvs_flash -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/nvs_flash/component.mk COMPONENT_NAME=nvs_flash component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/nvs_flash”
Building component project variables list /c/esp32/myapp/build/nvs_flash/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/nvs_flash”
make -C /c/esp32/myapp/build/nghttp -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/nghttp/component.mk COMPONENT_NAME=nghttp component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/nghttp”
Building component project variables list /c/esp32/myapp/build/nghttp/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/nghttp”
make -C /c/esp32/myapp/build/newlib -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/newlib/component.mk COMPONENT_NAME=newlib component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/newlib”
Building component project variables list /c/esp32/myapp/build/newlib/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/newlib”
make -C /c/esp32/myapp/build/micro-ecc -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/micro-ecc/component.mk COMPONENT_NAME=micro-ecc component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/micro-ecc”
Building component project variables list /c/esp32/myapp/build/micro-ecc/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/micro-ecc”
make -C /c/esp32/myapp/build/mdns -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/mdns/component.mk COMPONENT_NAME=mdns component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/mdns”
Building component project variables list /c/esp32/myapp/build/mdns/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/mdns”
make -C /c/esp32/myapp/build/mbedtls -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/mbedtls/component.mk COMPONENT_NAME=mbedtls component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/mbedtls”
Building component project variables list /c/esp32/myapp/build/mbedtls/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/mbedtls”
make -C /c/esp32/myapp/build/lwip -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/lwip/component.mk COMPONENT_NAME=lwip component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/lwip”
Building component project variables list /c/esp32/myapp/build/lwip/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/lwip”
make -C /c/esp32/myapp/build/log -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/log/component.mk COMPONENT_NAME=log component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/log”
Building component project variables list /c/esp32/myapp/build/log/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/log”
make -C /c/esp32/myapp/build/json -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/json/component.mk COMPONENT_NAME=json component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/json”
Building component project variables list /c/esp32/myapp/build/json/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/json”
make -C /c/esp32/myapp/build/jsmn -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/jsmn/component.mk COMPONENT_NAME=jsmn component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/jsmn”
Building component project variables list /c/esp32/myapp/build/jsmn/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/jsmn”
make -C /c/esp32/myapp/build/freertos -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/freertos/component.mk COMPONENT_NAME=freertos component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/freertos”
Building component project variables list /c/esp32/myapp/build/freertos/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/freertos”
make -C /c/esp32/myapp/build/fatfs -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/fatfs/component.mk COMPONENT_NAME=fatfs component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/fatfs”
Building component project variables list /c/esp32/myapp/build/fatfs/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/fatfs”
make -C /c/esp32/myapp/build/expat -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/expat/component.mk COMPONENT_NAME=expat component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/expat”
Building component project variables list /c/esp32/myapp/build/expat/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/expat”
make -C /c/esp32/myapp/build/ethernet -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/ethernet/component.mk COMPONENT_NAME=ethernet component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/ethernet”
Building component project variables list /c/esp32/myapp/build/ethernet/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/ethernet”
make -C /c/esp32/myapp/build/esp32 -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/esp32/component.mk COMPONENT_NAME=esp32 component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/esp32”
Building component project variables list /c/esp32/myapp/build/esp32/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/esp32”
make -C /c/esp32/myapp/build/driver -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/driver/component.mk COMPONENT_NAME=driver component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/driver”
Building component project variables list /c/esp32/myapp/build/driver/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/driver”
make -C /c/esp32/myapp/build/cxx -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/cxx/component.mk COMPONENT_NAME=cxx component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/cxx”
Building component project variables list /c/esp32/myapp/build/cxx/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/cxx”
make -C /c/esp32/myapp/build/coap -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/coap/component.mk COMPONENT_NAME=coap component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/coap”
Building component project variables list /c/esp32/myapp/build/coap/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/coap”
make -C /c/esp32/myapp/build/bt -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/bt/component.mk COMPONENT_NAME=bt component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/bt”
Building component project variables list /c/esp32/myapp/build/bt/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/bt”
make -C /c/esp32/myapp/build/bootloader_support -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/bootloader_support/component.mk COMPONENT_NAME=bootloader_support component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/bootloader_support”
Building component project variables list /c/esp32/myapp/build/bootloader_support/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/bootloader_support”
make -C /c/esp32/myapp/build/aws_iot -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/aws_iot/component.mk COMPONENT_NAME=aws_iot component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/aws_iot”
Building component project variables list /c/esp32/myapp/build/aws_iot/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/aws_iot”
make -C /c/esp32/myapp/build/app_update -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/app_update/component.mk COMPONENT_NAME=app_update component_project_vars.mk
make[1]: 进入目录“/c/esp32/myapp/build/app_update”
Building component project variables list /c/esp32/myapp/build/app_update/component_project_vars.mk
make[1]: 离开目录“/c/esp32/myapp/build/app_update”
including /c/esp32/esp-idf/components/bootloader/Makefile.projbuild...
including /c/esp32/esp-idf/components/bootloader_support/Makefile.projbuild...
including /c/esp32/esp-idf/components/coap/Makefile.projbuild...
including /c/esp32/esp-idf/components/esp32/Makefile.projbuild...
including /c/esp32/esp-idf/components/esptool_py/Makefile.projbuild...
including /c/esp32/esp-idf/components/mbedtls/Makefile.projbuild...
including /c/esp32/esp-idf/components/nghttp/Makefile.projbuild...
including /c/esp32/esp-idf/components/partition_table/Makefile.projbuild...
including /c/esp32/esp-idf/components/ulp/Makefile.projbuild...
make -C /c/esp32/esp-idf/components/bootloader/src V=1 BUILD_DIR_BASE=/c/esp32/myapp/build/bootloader TEST_COMPONENTS= TESTS_ALL= /c/esp32/myapp/build/bootloader/bootloader.bin
make[1]: 进入目录“/c/esp32/esp-idf/components/bootloader/src”
including /c/esp32/esp-idf/components/esptool_py/Makefile.projbuild...
including /c/esp32/esp-idf/components/bootloader/Makefile.projbuild...
including /c/esp32/esp-idf/components/bootloader_support/Makefile.projbuild...
including /c/esp32/esp-idf/components/bootloader/src/main/Makefile.projbuild...
make -C /c/esp32/myapp/build/bootloader/main -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/bootloader/src/main/component.mk COMPONENT_NAME=main component_project_vars.mk
make[2]: 进入目录“/c/esp32/myapp/build/bootloader/main”
Building component project variables list /c/esp32/myapp/build/bootloader/main/component_project_vars.mk
make[2]: 离开目录“/c/esp32/myapp/build/bootloader/main”
make -C /c/esp32/myapp/build/bootloader/soc -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/soc/component.mk COMPONENT_NAME=soc component_project_vars.mk
make[2]: 进入目录“/c/esp32/myapp/build/bootloader/soc”
Building component project variables list /c/esp32/myapp/build/bootloader/soc/component_project_vars.mk
make[2]: 离开目录“/c/esp32/myapp/build/bootloader/soc”
make -C /c/esp32/myapp/build/bootloader/micro-ecc -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/micro-ecc/component.mk COMPONENT_NAME=micro-ecc component_project_vars.mk
make[2]: 进入目录“/c/esp32/myapp/build/bootloader/micro-ecc”
Building component project variables list /c/esp32/myapp/build/bootloader/micro-ecc/component_project_vars.mk
make[2]: 离开目录“/c/esp32/myapp/build/bootloader/micro-ecc”
make -C /c/esp32/myapp/build/bootloader/spi_flash -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/spi_flash/component.mk COMPONENT_NAME=spi_flash component_project_vars.mk
make[2]: 进入目录“/c/esp32/myapp/build/bootloader/spi_flash”
Building component project variables list /c/esp32/myapp/build/bootloader/spi_flash/component_project_vars.mk
make[2]: 离开目录“/c/esp32/myapp/build/bootloader/spi_flash”
make -C /c/esp32/myapp/build/bootloader/log -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/log/component.mk COMPONENT_NAME=log component_project_vars.mk
make[2]: 进入目录“/c/esp32/myapp/build/bootloader/log”
Building component project variables list /c/esp32/myapp/build/bootloader/log/component_project_vars.mk
make[2]: 离开目录“/c/esp32/myapp/build/bootloader/log”
make -C /c/esp32/myapp/build/bootloader/bootloader_support -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/bootloader_support/component.mk COMPONENT_NAME=bootloader_support component_project_vars.mk
make[2]: 进入目录“/c/esp32/myapp/build/bootloader/bootloader_support”
Building component project variables list /c/esp32/myapp/build/bootloader/bootloader_support/component_project_vars.mk
make[2]: 离开目录“/c/esp32/myapp/build/bootloader/bootloader_support”
including /c/esp32/esp-idf/components/esptool_py/Makefile.projbuild...
including /c/esp32/esp-idf/components/bootloader/Makefile.projbuild...
including /c/esp32/esp-idf/components/bootloader_support/Makefile.projbuild...
including /c/esp32/esp-idf/components/bootloader/src/main/Makefile.projbuild...
make -C /c/esp32/myapp/build/bootloader/bootloader_support -f /c/esp32/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=/c/esp32/esp-idf/components/bootloader_support/component.mk COMPONENT_NAME=bootloader_support build
make[2]: 进入目录“/c/esp32/myapp/build/bootloader/bootloader_support”
xtensa-esp32-elf-gcc -std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -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 -Wno-old-style-declaration -std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -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 -Wno-old-style-declaration -DWITH_POSIX -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -I/c/esp32/myapp/build/bootloader/../include -D BOOTLOADER_BUILD=1 -I /c/esp32/esp-idf/components/esp32/include -DESP_PLATFORM -D IDF_VER=\"v2.0-rc1-928-g99d5959d\" -MMD -MP -DESP_PLATFORM -D IDF_VER=\"v2.0-rc1-928-g99d5959d\" -MMD -MP    -I /c/esp32/esp-idf/components/bootloader_support/include -I /c/esp32/esp-idf/components/bootloader_support/include_priv -I /c/esp32/esp-idf/components/bootloader_support/include_priv -I /c/esp32/esp-idf/components/log/include -I /c/esp32/esp-idf/components/spi_flash/include -I /c/esp32/esp-idf/components/micro-ecc/micro-ecc -I /c/esp32/esp-idf/components/soc/esp32/include -I /c/esp32/esp-idf/components/bootloader/src/main/include -I /c/esp32/myapp/build/bootloader/include  -Isrc -c /c/esp32/esp-idf/components/bootloader_support/src/bootloader_random.c -o src/bootloader_random.o
xtensa-esp32-elf-gcc -std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -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 -Wno-old-style-declaration -std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -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 -Wno-old-style-declaration -DWITH_POSIX -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -I/c/esp32/myapp/build/bootloader/../include -D BOOTLOADER_BUILD=1 -I /c/esp32/esp-idf/components/esp32/include -DESP_PLATFORM -D IDF_VER=\"v2.0-rc1-928-g99d5959d\" -MMD -MP -DESP_PLATFORM -D IDF_VER=\"v2.0-rc1-928-g99d5959d\" -MMD -MP    -I /c/esp32/esp-idf/components/bootloader_support/include -I /c/esp32/esp-idf/components/bootloader_support/include_priv -I /c/esp32/esp-idf/components/bootloader_support/include_priv -I /c/esp32/esp-idf/components/log/include -I /c/esp32/esp-idf/components/spi_flash/include -I /c/esp32/esp-idf/components/micro-ecc/micro-ecc -I /c/esp32/esp-idf/components/soc/esp32/include -I /c/esp32/esp-idf/components/bootloader/src/main/include -I /c/esp32/myapp/build/bootloader/include  -Isrc -c /c/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c -o src/flash_encrypt.o
C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c: In function 'initialise_flash_encryption':
C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c:88:9: error: implicit declaration of function 'bzero' [-Werror=implicit-function-declaration]
         bzero(buf, sizeof(buf));
         ^
C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c:88:9: warning: incompatible implicit declaration of built-in function 'bzero'
cc1.exe: some warnings being treated as errors
make[2]: *** [/c/esp32/esp-idf/make/component_wrapper.mk:211:src/flash_encrypt.o] 错误 1
make[2]: 离开目录“/c/esp32/myapp/build/bootloader/bootloader_support”
make[1]: *** [/c/esp32/esp-idf/make/project.mk:386:bootloader_support-build] 错误 2
make[1]: 离开目录“/c/esp32/esp-idf/components/bootloader/src”
make: *** [/c/esp32/esp-idf/components/bootloader/Makefile.projbuild:31:/c/esp32/myapp/build/bootloader/bootloader.bin] 错误 2


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

Re: msys2 in win10(32bit) compiler normal, but in win10(64bit ) compile error

Postby ESP_Angus » Thu Jun 08, 2017 7:20 am

Is it possible you've created a file called "strings.h" somewhere in the C:/esp32 directory?

Can you please copy-paste the output of this command?

Code: Select all

xtensa-esp32-elf-gcc -std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -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 -Wno-old-style-declaration -std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -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 -Wno-old-style-declaration -DWITH_POSIX -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -I/c/esp32/myapp/build/bootloader/../include -D BOOTLOADER_BUILD=1 -I /c/esp32/esp-idf/components/esp32/include -DESP_PLATFORM -D IDF_VER=\"v2.0-rc1-928-g99d5959d\" -MMD -MP -DESP_PLATFORM -D IDF_VER=\"v2.0-rc1-928-g99d5959d\" -MMD -MP    -I /c/esp32/esp-idf/components/bootloader_support/include -I /c/esp32/esp-idf/components/bootloader_support/include_priv -I /c/esp32/esp-idf/components/bootloader_support/include_priv -I /c/esp32/esp-idf/components/log/include -I /c/esp32/esp-idf/components/spi_flash/include -I /c/esp32/esp-idf/components/micro-ecc/micro-ecc -I /c/esp32/esp-idf/components/soc/esp32/include -I /c/esp32/esp-idf/components/bootloader/src/main/include -I /c/esp32/myapp/build/bootloader/include  -Isrc -c /c/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c -E
(This is the failing compilation step with "-o xxx/flash_encrypt.o" removed from the end and "-E" added so it will output the full preprocessed C code.)

billminux
Posts: 6
Joined: Wed Jun 07, 2017 2:32 pm

Re: msys2 in win10(32bit) compiler normal, but in win10(64bit ) compile error

Postby billminux » Thu Jun 08, 2017 11:08 am

one

Code: Select all

$ xtensa-esp32-elf-gcc -std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -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 -Wno-old-style-declaration -std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -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 -Wno-old-style-declaration -DWITH_POSIX -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -I/c/esp32/myapp/build/bootloader/../include -D BOOTLOADER_BUILD=1 -I /c/esp32/esp-idf/components/esp32/include -DESP_PLATFORM -D IDF_VER=\"v2.0-rc1-928-g99d5959d\" -MMD -MP -DESP_PLATFORM -D IDF_VER=\"v2.0-rc1-928-g99d5959d\" -MMD -MP    -I /c/esp32/esp-idf/components/bootloader_support/include -I /c/esp32/esp-idf/components/bootloader_support/include_priv -I /c/esp32/esp-idf/components/bootloader_support/include_priv -I /c/esp32/esp-idf/components/log/include -I /c/esp32/esp-idf/components/spi_flash/include -I /c/esp32/esp-idf/components/micro-ecc/micro-ecc -I /c/esp32/esp-idf/components/soc/esp32/include -I /c/esp32/esp-idf/components/bootloader/src/main/include -I /c/esp32/myapp/build/bootloader/include  -Isrc -c /c/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c -E
# 1 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
# 1 "D:\\SPB_Data//"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
# 15 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
# 1 "D:\\mingw\\include/strings.h" 1 3
# 11 "D:\\mingw\\include/strings.h" 3
# 1 "D:\\mingw\\include/string.h" 1 3
# 15 "D:\\mingw\\include/string.h" 3
# 1 "D:\\mingw\\include/_mingw.h" 1 3
# 32 "D:\\mingw\\include/_mingw.h" 3

# 33 "D:\\mingw\\include/_mingw.h" 3
# 16 "D:\\mingw\\include/string.h" 2 3
# 24 "D:\\mingw\\include/string.h" 3
# 1 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stddef.h" 1 3 4
# 216 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stddef.h" 3 4

# 216 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stddef.h" 3 4
typedef unsigned int size_t;
# 328 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stddef.h" 3 4
typedef short unsigned int wchar_t;
# 25 "D:\\mingw\\include/string.h" 2 3
# 36 "D:\\mingw\\include/string.h" 3
 void* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) memchr (const void*, int, size_t) __attribute__ ((__pure__));
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) memcmp (const void*, const void*, size_t) __attribute__ ((__pure__));
 void* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) memcpy (void*, const void*, size_t);
 void* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) memmove (void*, const void*, size_t);
 void* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) memset (void*, int, size_t);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strcat (char*, const char*);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strchr (const char*, int) __attribute__ ((__pure__));
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strcmp (const char*, const char*) __attribute__ ((__pure__));
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strcoll (const char*, const char*);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strcpy (char*, const char*);
 size_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strcspn (const char*, const char*) __attribute__ ((__pure__));
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strerror (int);

 size_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strlen (const char*) __attribute__ ((__pure__));
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strncat (char*, const char*, size_t);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strncmp (const char*, const char*, size_t) __attribute__ ((__pure__));
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strncpy (char*, const char*, size_t);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strpbrk (const char*, const char*) __attribute__ ((__pure__));
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strrchr (const char*, int) __attribute__ ((__pure__));
 size_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strspn (const char*, const char*) __attribute__ ((__pure__));
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strstr (const char*, const char*) __attribute__ ((__pure__));
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strtok (char*, const char*);
 size_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strxfrm (char*, const char*, size_t);





 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _strerror (const char *);
 void* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _memccpy (void*, const void*, int, size_t);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _memicmp (const void*, const void*, size_t);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _strdup (const char*) __attribute__ ((__malloc__));
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _strcmpi (const char*, const char*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _stricmp (const char*, const char*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _stricoll (const char*, const char*);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _strlwr (char*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _strnicmp (const char*, const char*, size_t);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _strnset (char*, int, size_t);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _strrev (char*);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _strset (char*, int);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _strupr (char*);
 void __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _swab (const char*, char*, size_t);
# 90 "D:\\mingw\\include/string.h" 3
 void* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) memccpy (void*, const void*, int, size_t);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) memicmp (const void*, const void*, size_t);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strdup (const char*) __attribute__ ((__malloc__));
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strcmpi (const char*, const char*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) stricmp (const char*, const char*);
int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strcasecmp (const char*, const char *);

extern inline __attribute__((__gnu_inline__)) int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__))
strcasecmp (const char * __sz1, const char * __sz2)
  {return _stricmp (__sz1, __sz2);}

 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) stricoll (const char*, const char*);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strlwr (char*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strnicmp (const char*, const char*, size_t);
int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strncasecmp (const char *, const char *, size_t);

extern inline __attribute__((__gnu_inline__)) int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__))
strncasecmp (const char * __sz1, const char * __sz2, size_t __sizeMaxCompare)
  {return _strnicmp (__sz1, __sz2, __sizeMaxCompare);}

 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strnset (char*, int, size_t);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strrev (char*);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strset (char*, int);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) strupr (char*);

 void __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) swab (const char*, char*, size_t);
# 126 "D:\\mingw\\include/string.h" 3
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcscat (wchar_t*, const wchar_t*);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcschr (const wchar_t*, wchar_t);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcscmp (const wchar_t*, const wchar_t*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcscoll (const wchar_t*, const wchar_t*);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcscpy (wchar_t*, const wchar_t*);
 size_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcscspn (const wchar_t*, const wchar_t*);

 size_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcslen (const wchar_t*);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsncat (wchar_t*, const wchar_t*, size_t);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsncmp(const wchar_t*, const wchar_t*, size_t);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsncpy(wchar_t*, const wchar_t*, size_t);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcspbrk(const wchar_t*, const wchar_t*);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsrchr(const wchar_t*, wchar_t);
 size_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsspn(const wchar_t*, const wchar_t*);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsstr(const wchar_t*, const wchar_t*);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcstok(wchar_t*, const wchar_t*);
 size_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsxfrm(wchar_t*, const wchar_t*, size_t);
# 152 "D:\\mingw\\include/string.h" 3
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _wcsdup (const wchar_t*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _wcsicmp (const wchar_t*, const wchar_t*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _wcsicoll (const wchar_t*, const wchar_t*);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _wcslwr (wchar_t*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _wcsnset (wchar_t*, wchar_t, size_t);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _wcsrev (wchar_t*);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _wcsset (wchar_t*, wchar_t);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _wcsupr (wchar_t*);
# 173 "D:\\mingw\\include/string.h" 3
int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2);

extern inline __attribute__((__gnu_inline__)) int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__))
wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
  {return _wcsicmp (__ws1, __ws2);}

 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsdup (const wchar_t*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsicmp (const wchar_t*, const wchar_t*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsicoll (const wchar_t*, const wchar_t*);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcslwr (wchar_t*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsnicmp (const wchar_t*, const wchar_t*, size_t);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsnset (wchar_t*, wchar_t, size_t);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsrev (wchar_t*);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsset (wchar_t*, wchar_t);
 wchar_t* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wcsupr (wchar_t*);
# 12 "D:\\mingw\\include/strings.h" 2 3
# 16 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 2

# 1 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h" 1
# 17 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h"
# 1 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stddef.h" 1 3 4
# 149 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stddef.h" 3 4
typedef int ptrdiff_t;
# 18 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h" 2
# 1 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stdbool.h" 1 3 4
# 19 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h" 2
# 1 "D:\\mingw\\include/stdint.h" 1 3
# 24 "D:\\mingw\\include/stdint.h" 3
# 1 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stddef.h" 1 3 4
# 357 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stddef.h" 3 4
typedef unsigned int wint_t;
# 25 "D:\\mingw\\include/stdint.h" 2 3


typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;


typedef signed char int_least8_t;
typedef unsigned char uint_least8_t;
typedef short int_least16_t;
typedef unsigned short uint_least16_t;
typedef int int_least32_t;
typedef unsigned uint_least32_t;
typedef long long int_least64_t;
typedef unsigned long long uint_least64_t;





typedef signed char int_fast8_t;
typedef unsigned char uint_fast8_t;
typedef short int_fast16_t;
typedef unsigned short uint_fast16_t;
typedef int int_fast32_t;
typedef unsigned int uint_fast32_t;
typedef long long int_fast64_t;
typedef unsigned long long uint_fast64_t;
# 66 "D:\\mingw\\include/stdint.h" 3
  typedef int intptr_t;
# 75 "D:\\mingw\\include/stdint.h" 3
  typedef unsigned int uintptr_t;




typedef long long intmax_t;
typedef unsigned long long uintmax_t;
# 20 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h" 2
# 1 "C:/esp32/esp-idf/components/esp32/include/esp_err.h" 1
# 14 "C:/esp32/esp-idf/components/esp32/include/esp_err.h"



# 1 "D:\\mingw\\include/stdio.h" 1 3
# 26 "D:\\mingw\\include/stdio.h" 3
# 1 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stddef.h" 1 3 4
# 27 "D:\\mingw\\include/stdio.h" 2 3

# 1 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stdarg.h" 1 3 4
# 40 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 29 "D:\\mingw\\include/stdio.h" 2 3
# 129 "D:\\mingw\\include/stdio.h" 3
typedef struct _iobuf
{
 char* _ptr;
 int _cnt;
 char* _base;
 int _flag;
 int _file;
 int _charbuf;
 int _bufsiz;
 char* _tmpfname;
} FILE;
# 148 "D:\\mingw\\include/stdio.h" 3
extern FILE (*_imp___iob)[];
# 169 "D:\\mingw\\include/stdio.h" 3
 FILE* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fopen (const char*, const char*);
 FILE* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) freopen (const char*, const char*, FILE*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fflush (FILE*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fclose (FILE*);

 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) remove (const char*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) rename (const char*, const char*);
 FILE* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) tmpfile (void);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) tmpnam (char*);


 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _tempnam (const char*, const char*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _rmtmp(void);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _unlink (const char*);


 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) tempnam (const char*, const char*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) rmtmp(void);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) unlink (const char*);



 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) setvbuf (FILE*, char*, int, size_t);

 void __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) setbuf (FILE*, char*);
# 204 "D:\\mingw\\include/stdio.h" 3
extern int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_fprintf(FILE*, const char*, ...);
extern int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_printf(const char*, ...);
extern int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_sprintf(char*, const char*, ...);
extern int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_snprintf(char*, size_t, const char*, ...);
extern int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_vfprintf(FILE*, const char*, __gnuc_va_list);
extern int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_vprintf(const char*, __gnuc_va_list);
extern int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_vsprintf(char*, const char*, __gnuc_va_list);
extern int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) __mingw_vsnprintf(char*, size_t, const char*, __gnuc_va_list);
# 293 "D:\\mingw\\include/stdio.h" 3
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fprintf (FILE*, const char*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) printf (const char*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) sprintf (char*, const char*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) vfprintf (FILE*, const char*, __gnuc_va_list);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) vprintf (const char*, __gnuc_va_list);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) vsprintf (char*, const char*, __gnuc_va_list);
# 308 "D:\\mingw\\include/stdio.h" 3
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_fprintf(FILE*, const char*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_printf(const char*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_sprintf(char*, const char*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_vfprintf(FILE*, const char*, __gnuc_va_list);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_vprintf(const char*, __gnuc_va_list);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) __msvcrt_vsprintf(char*, const char*, __gnuc_va_list);





 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _snprintf (char*, size_t, const char*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _vsnprintf (char*, size_t, const char*, __gnuc_va_list);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _vscprintf (const char*, __gnuc_va_list);
# 331 "D:\\mingw\\include/stdio.h" 3
int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) snprintf (char *, size_t, const char *, ...);
int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) vsnprintf (char *, size_t, const char *, __gnuc_va_list);

int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) vscanf (const char * __restrict__, __gnuc_va_list);
int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) vfscanf (FILE * __restrict__, const char * __restrict__,
       __gnuc_va_list);
int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) vsscanf (const char * __restrict__,
       const char * __restrict__, __gnuc_va_list);







 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fscanf (FILE*, const char*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) scanf (const char*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) sscanf (const char*, const char*, ...);




 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fgetc (FILE*);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fgets (char*, int, FILE*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fputc (int, FILE*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fputs (const char*, FILE*);
 char* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) gets (char*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) puts (const char*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) ungetc (int, FILE*);







 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _filbuf (FILE*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _flsbuf (int, FILE*);



extern inline __attribute__((__gnu_inline__)) int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) getc (FILE* __F)
{
  return (--__F->_cnt >= 0)
    ? (int) (unsigned char) *__F->_ptr++
    : _filbuf (__F);
}

extern inline __attribute__((__gnu_inline__)) int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) putc (int __c, FILE* __F)
{
  return (--__F->_cnt >= 0)
    ? (int) (unsigned char) (*__F->_ptr++ = (char)__c)
    : _flsbuf (__c, __F);
}

extern inline __attribute__((__gnu_inline__)) int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) getchar (void)
{
  return (--(&(*_imp___iob)[0])->_cnt >= 0)
    ? (int) (unsigned char) *(&(*_imp___iob)[0])->_ptr++
    : _filbuf ((&(*_imp___iob)[0]));
}

extern inline __attribute__((__gnu_inline__)) int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) putchar(int __c)
{
  return (--(&(*_imp___iob)[1])->_cnt >= 0)
    ? (int) (unsigned char) (*(&(*_imp___iob)[1])->_ptr++ = (char)__c)
    : _flsbuf (__c, (&(*_imp___iob)[1]));}
# 412 "D:\\mingw\\include/stdio.h" 3
 size_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fread (void*, size_t, size_t, FILE*);
 size_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fwrite (const void*, size_t, size_t, FILE*);





 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fseek (FILE*, long, int);
 long __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) ftell (FILE*);
 void __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) rewind (FILE*);
# 457 "D:\\mingw\\include/stdio.h" 3
typedef long fpos_t;


 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fgetpos (FILE*, fpos_t*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fsetpos (FILE*, const fpos_t*);





 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) feof (FILE*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) ferror (FILE*);
# 480 "D:\\mingw\\include/stdio.h" 3
 void __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) clearerr (FILE*);
 void __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) perror (const char*);






 FILE* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _popen (const char*, const char*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _pclose (FILE*);


 FILE* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) popen (const char*, const char*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) pclose (FILE*);





 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _flushall (void);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _fgetchar (void);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _fputchar (int);
 FILE* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _fdopen (int, const char*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _fileno (FILE*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _fcloseall (void);
 FILE* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _fsopen (const char*, const char*, int);
# 522 "D:\\mingw\\include/stdio.h" 3
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fgetchar (void);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fputchar (int);
 FILE* __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fdopen (int, const char*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fileno (FILE*);
# 563 "D:\\mingw\\include/stdio.h" 3
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fwprintf (FILE*, const wchar_t*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wprintf (const wchar_t*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) vfwprintf (FILE*, const wchar_t*, __gnuc_va_list);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) vwprintf (const wchar_t*, __gnuc_va_list);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _vsnwprintf (wchar_t*, size_t, const wchar_t*, __gnuc_va_list);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _vscwprintf (const wchar_t*, __gnuc_va_list);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fwscanf (FILE*, const wchar_t*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) wscanf (const wchar_t*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) swscanf (const wchar_t*, const wchar_t*, ...);
 wint_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fgetwc (FILE*);
 wint_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fputwc (wchar_t, FILE*);
 wint_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) ungetwc (wchar_t, FILE*);



 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) swprintf (wchar_t*, const wchar_t*, ...);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) vswprintf (wchar_t*, const wchar_t*, __gnuc_va_list);
# 605 "D:\\mingw\\include/stdio.h" 3
int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...);
int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __gnuc_va_list arg);

extern inline __attribute__((__gnu_inline__)) int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__))
vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __gnuc_va_list arg)
  { return _vsnwprintf ( s, n, format, arg);}

int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) vwscanf (const wchar_t * __restrict__, __gnuc_va_list);
int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) vfwscanf (FILE * __restrict__,
         const wchar_t * __restrict__, __gnuc_va_list);
int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) vswscanf (const wchar_t * __restrict__,
         const wchar_t * __restrict__, __gnuc_va_list);
# 632 "D:\\mingw\\include/stdio.h" 3
 wint_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _fgetwchar (void);
 wint_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _fputwchar (wint_t);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _getw (FILE*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _putw (int, FILE*);


 wint_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fgetwchar (void);
 wint_t __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) fputwchar (wint_t);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) getw (FILE*);
 int __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) putw (int, FILE*);
# 18 "C:/esp32/esp-idf/components/esp32/include/esp_err.h" 2
# 1 "D:\\mingw\\include/assert.h" 1 3
# 38 "D:\\mingw\\include/assert.h" 3
 void __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _assert (const char*, const char*, int) __attribute__ ((__noreturn__));
# 19 "C:/esp32/esp-idf/components/esp32/include/esp_err.h" 2






# 24 "C:/esp32/esp-idf/components/esp32/include/esp_err.h"
typedef int32_t esp_err_t;
# 45 "C:/esp32/esp-idf/components/esp32/include/esp_err.h"
void _esp_error_check_failed(esp_err_t rc, const char *file, int line, const char *function, const char *expression) __attribute__((noreturn));
# 21 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h" 2
# 1 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h" 1
# 20 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
# 1 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stddef.h" 1 3 4
# 21 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h" 2

# 1 "c:\\esp32\\myapp\\build\\include\\sdkconfig.h" 1
# 23 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h" 2
# 45 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
void spi_flash_init();
# 54 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
size_t spi_flash_get_chip_size();
# 63 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
esp_err_t spi_flash_erase_sector(size_t sector);
# 74 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
esp_err_t spi_flash_erase_range(size_t start_address, size_t size);
# 89 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
esp_err_t spi_flash_write(size_t dest_addr, const void *src, size_t size);
# 112 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
esp_err_t spi_flash_write_encrypted(size_t dest_addr, const void *src, size_t size);
# 123 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
esp_err_t spi_flash_read(size_t src_addr, void *dest, size_t size);
# 140 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
esp_err_t spi_flash_read_encrypted(size_t src, void *dest, size_t size);




typedef enum {
    SPI_FLASH_MMAP_DATA,
    SPI_FLASH_MMAP_INST,
} spi_flash_mmap_memory_t;




typedef uint32_t spi_flash_mmap_handle_t;
# 176 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
esp_err_t spi_flash_mmap(size_t src_addr, size_t size, spi_flash_mmap_memory_t memory,
                         const void** out_ptr, spi_flash_mmap_handle_t* out_handle);
# 189 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
void spi_flash_munmap(spi_flash_mmap_handle_t handle);
# 198 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
void spi_flash_mmap_dump();
# 214 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
size_t spi_flash_cache2phys(const void *cached);
# 234 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
const void *spi_flash_phys2cache(size_t phys_offs, spi_flash_mmap_memory_t memory);






# 240 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h" 3 4
_Bool
# 240 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
    spi_flash_cache_enabled();




typedef void (*spi_flash_guard_start_func_t)(void);



typedef void (*spi_flash_guard_end_func_t)(void);



typedef void (*spi_flash_op_lock_func_t)(void);



typedef void (*spi_flash_op_unlock_func_t)(void);
# 283 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
typedef struct {
    spi_flash_guard_start_func_t start;
    spi_flash_guard_end_func_t end;
    spi_flash_op_lock_func_t op_lock;
    spi_flash_op_unlock_func_t op_unlock;
} spi_flash_guard_funcs_t;
# 298 "C:/esp32/esp-idf/components/spi_flash/include/esp_spi_flash.h"
void spi_flash_guard_set(const spi_flash_guard_funcs_t* funcs);




extern const spi_flash_guard_funcs_t g_flash_guard_default_ops;







extern const spi_flash_guard_funcs_t g_flash_guard_no_os_ops;
# 22 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h" 2
# 49 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h"
const void *bootloader_mmap(uint32_t src_addr, uint32_t size);







void bootloader_munmap(const void *mapping);
# 74 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h"
esp_err_t bootloader_flash_read(size_t src_addr, void *dest, size_t size,
# 74 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h" 3 4
                                                                         _Bool
# 74 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h"
                                                                              allow_decrypt);
# 92 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h"
esp_err_t bootloader_flash_write(size_t dest_addr, void *src, size_t size,
# 92 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h" 3 4
                                                                          _Bool
# 92 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h"
                                                                               write_encrypted);
# 101 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_flash.h"
esp_err_t bootloader_flash_erase_sector(size_t sector);
# 18 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 2
# 1 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_random.h" 1
# 15 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_random.h"


# 1 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stddef.h" 1 3 4
# 18 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_random.h" 2
# 33 "C:/esp32/esp-idf/components/bootloader_support/include_priv/bootloader_random.h"
void bootloader_random_enable(void);







void bootloader_random_disable(void);







void bootloader_fill_random(void *buffer, size_t length);
# 19 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 2
# 1 "C:/esp32/esp-idf/components/bootloader_support/include/esp_image_format.h" 1
# 29 "C:/esp32/esp-idf/components/bootloader_support/include/esp_image_format.h"
typedef enum {
    ESP_IMAGE_SPI_MODE_QIO,
    ESP_IMAGE_SPI_MODE_QOUT,
    ESP_IMAGE_SPI_MODE_DIO,
    ESP_IMAGE_SPI_MODE_DOUT,
    ESP_IMAGE_SPI_MODE_FAST_READ,
    ESP_IMAGE_SPI_MODE_SLOW_READ
} esp_image_spi_mode_t;


enum {
    ESP_IMAGE_SPI_SPEED_40M,
    ESP_IMAGE_SPI_SPEED_26M,
    ESP_IMAGE_SPI_SPEED_20M,
    ESP_IMAGE_SPI_SPEED_80M = 0xF
} esp_image_spi_freq_t;


typedef enum {
    ESP_IMAGE_FLASH_SIZE_1MB = 0,
    ESP_IMAGE_FLASH_SIZE_2MB,
    ESP_IMAGE_FLASH_SIZE_4MB,
    ESP_IMAGE_FLASH_SIZE_8MB,
    ESP_IMAGE_FLASH_SIZE_16MB,
    ESP_IMAGE_FLASH_SIZE_MAX
} esp_image_flash_size_t;

typedef struct {
    uint8_t magic;
    uint8_t segment_count;
    uint8_t spi_mode;
    uint8_t spi_speed: 4;
    uint8_t spi_size: 4;
    uint32_t entry_addr;
    uint8_t encrypt_flag;
    uint8_t extra_header[15];
} esp_image_header_t;


typedef struct {
    uint32_t load_addr;
    uint32_t data_len;
} esp_image_segment_header_t;
# 90 "C:/esp32/esp-idf/components/bootloader_support/include/esp_image_format.h"
esp_err_t esp_image_load_header(uint32_t src_addr,
# 90 "C:/esp32/esp-idf/components/bootloader_support/include/esp_image_format.h" 3 4
                                                  _Bool
# 90 "C:/esp32/esp-idf/components/bootloader_support/include/esp_image_format.h"
                                                       log_errors, esp_image_header_t *image_header);
# 106 "C:/esp32/esp-idf/components/bootloader_support/include/esp_image_format.h"
esp_err_t esp_image_load_segment_header(uint8_t index, uint32_t src_addr, const esp_image_header_t *image_header,
# 106 "C:/esp32/esp-idf/components/bootloader_support/include/esp_image_format.h" 3 4
                                                                                                                 _Bool
# 106 "C:/esp32/esp-idf/components/bootloader_support/include/esp_image_format.h"
                                                                                                                      log_errors, esp_image_segment_header_t *segment_header, uint32_t *segment_data_offset);
# 131 "C:/esp32/esp-idf/components/bootloader_support/include/esp_image_format.h"
esp_err_t esp_image_basic_verify(uint32_t src_addr,
# 131 "C:/esp32/esp-idf/components/bootloader_support/include/esp_image_format.h" 3 4
                                                   _Bool
# 131 "C:/esp32/esp-idf/components/bootloader_support/include/esp_image_format.h"
                                                        log_errors, uint32_t *length);

billminux
Posts: 6
Joined: Wed Jun 07, 2017 2:32 pm

Re: msys2 in win10(32bit) compiler normal, but in win10(64bit ) compile error

Postby billminux » Thu Jun 08, 2017 11:09 am

two

Code: Select all

typedef struct {
    uint32_t drom_addr;
    uint32_t drom_load_addr;
    uint32_t drom_size;
    uint32_t irom_addr;
    uint32_t irom_load_addr;
    uint32_t irom_size;
} esp_image_flash_mapping_t;
# 20 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 2
# 1 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_encrypt.h" 1
# 18 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_encrypt.h"
# 1 "C:/esp32/esp-idf/components/esp32/include/esp_attr.h" 1
# 19 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_encrypt.h" 2


# 1 "C:/esp32/esp-idf/components/soc/esp32/include/soc/efuse_reg.h" 1
# 18 "C:/esp32/esp-idf/components/soc/esp32/include/soc/efuse_reg.h"
# 1 "C:/esp32/esp-idf/components/soc/esp32/include/soc/soc.h" 1
# 20 "C:/esp32/esp-idf/components/soc/esp32/include/soc/soc.h"
# 1 "C:/esp32/esp-idf/components/esp32/include/esp_assert.h" 1
# 17 "C:/esp32/esp-idf/components/esp32/include/esp_assert.h"
# 1 "D:\\mingw\\include/assert.h" 1 3
# 38 "D:\\mingw\\include/assert.h" 3

# 38 "D:\\mingw\\include/assert.h" 3
       void __attribute__ ((__cdecl__)) __attribute__ ((__nothrow__)) _assert (const char*, const char*, int) __attribute__ ((__noreturn__));
# 18 "C:/esp32/esp-idf/components/esp32/include/esp_assert.h" 2
# 21 "C:/esp32/esp-idf/components/soc/esp32/include/soc/soc.h" 2
# 19 "C:/esp32/esp-idf/components/soc/esp32/include/soc/efuse_reg.h" 2
# 22 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_encrypt.h" 2
# 36 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_encrypt.h"

# 36 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_encrypt.h"
static inline __attribute__((section(".iram1")))
# 36 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_encrypt.h" 3 4
                                                    _Bool
# 36 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_encrypt.h"
                                                         esp_flash_encryption_enabled(void) {
    uint32_t flash_crypt_cnt = ({ ; ((({ ; (*(volatile uint32_t *)(0x3ff5A000 + 0x000)); }) >> (20)) & (0xFF)); });


# 39 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_encrypt.h" 3 4
   _Bool
# 39 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_encrypt.h"
        enabled =
# 39 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_encrypt.h" 3 4
                  0
# 39 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_encrypt.h"
                       ;
    while(flash_crypt_cnt) {
        if (flash_crypt_cnt & 1) {
            enabled = !enabled;
        }
        flash_crypt_cnt >>= 1;
    }
    return enabled;
}
# 89 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_encrypt.h"
esp_err_t esp_flash_encrypt_check_and_update(void);
# 100 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_encrypt.h"
esp_err_t esp_flash_encrypt_region(uint32_t src_addr, size_t data_length);
# 21 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 2
# 1 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_partitions.h" 1
# 18 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_partitions.h"
# 1 "C:/esp32/esp-idf/components/esp32/include/esp_flash_data_types.h" 1
# 29 "C:/esp32/esp-idf/components/esp32/include/esp_flash_data_types.h"
typedef struct {
    uint32_t ota_seq;
    uint8_t seq_label[24];
    uint32_t crc;
} esp_ota_select_entry_t;


typedef struct {
    uint32_t offset;
    uint32_t size;
} esp_partition_pos_t;




typedef struct {
 uint16_t magic;
 uint8_t type;
    uint8_t subtype;
    esp_partition_pos_t pos;
 uint8_t label[16];
    uint32_t flags;
} esp_partition_info_t;
# 19 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_partitions.h" 2
# 37 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_partitions.h"
esp_err_t esp_partition_table_basic_verify(const esp_partition_info_t *partition_table,
# 37 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_partitions.h" 3 4
                                                                                       _Bool
# 37 "C:/esp32/esp-idf/components/bootloader_support/include/esp_flash_partitions.h"
                                                                                            log_errors, int *num_partitions);
# 22 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 2

# 1 "C:/esp32/esp-idf/components/bootloader_support/include/esp_secure_boot.h" 1
# 34 "C:/esp32/esp-idf/components/bootloader_support/include/esp_secure_boot.h"
static inline
# 34 "C:/esp32/esp-idf/components/bootloader_support/include/esp_secure_boot.h" 3 4
             _Bool
# 34 "C:/esp32/esp-idf/components/bootloader_support/include/esp_secure_boot.h"
                  esp_secure_boot_enabled(void) {
    return ({ ; (*(volatile uint32_t *)(0x3ff5A000 + 0x018)); }) & ((1UL << (4)));
}
# 61 "C:/esp32/esp-idf/components/bootloader_support/include/esp_secure_boot.h"
esp_err_t esp_secure_boot_permanently_enable(void);
# 75 "C:/esp32/esp-idf/components/bootloader_support/include/esp_secure_boot.h"
esp_err_t esp_secure_boot_verify_signature(uint32_t src_addr, uint32_t length);


typedef struct {
    uint32_t version;
    uint8_t signature[64];
} esp_secure_boot_sig_block_t;




typedef struct {
    uint8_t iv[128];
    uint8_t digest[64];
} esp_secure_boot_iv_digest_t;
# 24 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 2
# 1 "C:/esp32/esp-idf/components/bootloader_support/include/esp_efuse.h" 1
# 42 "C:/esp32/esp-idf/components/bootloader_support/include/esp_efuse.h"
void esp_efuse_burn_new_values(void);






void esp_efuse_reset(void);
# 25 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 2
# 1 "C:/esp32/esp-idf/components/log/include/esp_log.h" 1
# 19 "C:/esp32/esp-idf/components/log/include/esp_log.h"
# 1 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stdarg.h" 1 3 4
# 98 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stdarg.h" 3 4

# 98 "c:\\msys32\\opt\\xtensa-esp32-elf\\lib\\gcc\\xtensa-esp32-elf\\5.2.0\\include\\stdarg.h" 3 4
typedef __gnuc_va_list va_list;
# 20 "C:/esp32/esp-idf/components/log/include/esp_log.h" 2
# 1 "c:\\esp32\\myapp\\build\\include\\sdkconfig.h" 1
# 21 "C:/esp32/esp-idf/components/log/include/esp_log.h" 2
# 1 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h" 1
# 21 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
# 1 "C:/esp32/esp-idf/components/soc/esp32/include/soc/soc.h" 1
# 22 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h" 2
# 54 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"

# 54 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
typedef enum {
    ETS_OK = 0,
    ETS_FAILED = 1
} ETS_STATUS;

typedef uint32_t ETSSignal;
typedef uint32_t ETSParam;

typedef struct ETSEventTag ETSEvent;

struct ETSEventTag {
    ETSSignal sig;
    ETSParam par;
};

typedef void (*ETSTask)(ETSEvent *e);
typedef void (* ets_idle_cb_t)(void *arg);
# 79 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_run(void);
# 90 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_set_idle_cb(ets_idle_cb_t func, void *arg);
# 105 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_task(ETSTask task, uint8_t prio, ETSEvent *queue, uint8_t qlen);
# 119 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
ETS_STATUS ets_post(uint8_t prio, ETSSignal sig, ETSParam par);
# 133 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
extern const char *const exc_cause_table[40];
# 143 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_set_user_start(uint32_t start);
# 153 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_set_startup_callback(uint32_t callback);
# 163 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_set_appcpu_boot_addr(uint32_t start);
# 179 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
ETS_STATUS ets_unpack_flash_code_legacy(uint32_t pos, uint32_t *entry_addr,
# 179 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h" 3 4
                                                                           _Bool
# 179 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
                                                                                jump,
# 179 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h" 3 4
                                                                                      _Bool
# 179 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
                                                                                           config);
# 197 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
ETS_STATUS ets_unpack_flash_code(uint32_t pos, uint32_t *entry_addr,
# 197 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h" 3 4
                                                                    _Bool
# 197 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
                                                                         jump,
# 197 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h" 3 4
                                                                               _Bool
# 197 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
                                                                                    sb_need_check,
# 197 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h" 3 4
                                                                                                   _Bool
# 197 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
                                                                                                        config);
# 222 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
int ets_printf(const char *fmt, ...);
# 232 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_write_char_uart(char c);
# 242 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_install_putc1(void (*p)(char c));
# 252 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_install_putc2(void (*p)(char c));
# 262 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_install_uart_printf(void);
# 284 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
typedef void ETSTimerFunc(void *timer_arg);

typedef struct _ETSTIMER_ {
    struct _ETSTIMER_ *timer_next;
    uint32_t timer_expire;
    uint32_t timer_period;
    ETSTimerFunc *timer_func;
    void *timer_arg;
} ETSTimer;
# 302 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_timer_init(void);
# 316 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_timer_arm(ETSTimer *timer, uint32_t tmout,
# 316 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h" 3 4
                                                   _Bool
# 316 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
                                                        repeat);
# 330 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_timer_arm_us(ETSTimer *ptimer, uint32_t us,
# 330 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h" 3 4
                                                    _Bool
# 330 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
                                                         repeat);
# 340 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_timer_disarm(ETSTimer *timer);
# 354 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_timer_setfn(ETSTimer *ptimer, ETSTimerFunc *pfunction, void *parg);
# 364 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_timer_done(ETSTimer *ptimer);
# 374 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_delay_us(uint32_t us);
# 384 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_update_cpu_frequency(uint32_t ticks_per_us);
# 396 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_update_cpu_frequency_rom(uint32_t ticks_per_us);
# 406 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
uint32_t ets_get_cpu_frequency(void);
# 415 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
uint32_t ets_get_xtal_scale(void);
# 428 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
uint32_t ets_get_detected_xtal_freq(void);
# 442 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
typedef void (* ets_isr_t)(void *);
# 457 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_isr_attach(int i, ets_isr_t func, void *arg);
# 468 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_isr_mask(uint32_t mask);
# 479 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_isr_unmask(uint32_t unmask);
# 490 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_intr_lock(void);
# 501 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_intr_unlock(void);
# 512 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void ets_waiti0(void);
# 530 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
void intr_matrix_set(int cpu_no, uint32_t model_num, uint32_t intr_num);
# 620 "C:/esp32/esp-idf/components/esp32/include/rom/ets_sys.h"
typedef enum {
    OK = 0,
    FAIL,
    PENDING,
    BUSY,
    CANCEL,
} STATUS;
# 22 "C:/esp32/esp-idf/components/log/include/esp_log.h" 2
# 31 "C:/esp32/esp-idf/components/log/include/esp_log.h"
typedef enum {
    ESP_LOG_NONE,
    ESP_LOG_ERROR,
    ESP_LOG_WARN,
    ESP_LOG_INFO,
    ESP_LOG_DEBUG,
    ESP_LOG_VERBOSE
} esp_log_level_t;

typedef int (*vprintf_like_t)(const char *, va_list);
# 52 "C:/esp32/esp-idf/components/log/include/esp_log.h"
void esp_log_level_set(const char* tag, esp_log_level_t level);
# 62 "C:/esp32/esp-idf/components/log/include/esp_log.h"
void esp_log_set_vprintf(vprintf_like_t func);
# 76 "C:/esp32/esp-idf/components/log/include/esp_log.h"
uint32_t esp_log_timestamp(void);
# 86 "C:/esp32/esp-idf/components/log/include/esp_log.h"
uint32_t esp_log_early_timestamp(void);
# 96 "C:/esp32/esp-idf/components/log/include/esp_log.h"
void esp_log_write(esp_log_level_t level, const char* tag, const char* format, ...) __attribute__ ((format (printf, 3, 4)));
# 108 "C:/esp32/esp-idf/components/log/include/esp_log.h"
void esp_log_buffer_hex(const char *tag, const char *buffer, uint16_t buff_len);
# 120 "C:/esp32/esp-idf/components/log/include/esp_log.h"
void esp_log_buffer_char(const char *tag, const char *buffer, uint16_t buff_len);
# 26 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 2
# 1 "C:/esp32/esp-idf/components/esp32/include/rom/secure_boot.h" 1
# 24 "C:/esp32/esp-idf/components/esp32/include/rom/secure_boot.h"
void ets_secure_boot_start(void);

void ets_secure_boot_finish(void);

void ets_secure_boot_hash(const uint32_t *buf);

void ets_secure_boot_obtain(void);

int ets_secure_boot_check(uint32_t *buf);

void ets_secure_boot_rd_iv(uint32_t *buf);

void ets_secure_boot_rd_abstract(uint32_t *buf);


# 38 "C:/esp32/esp-idf/components/esp32/include/rom/secure_boot.h" 3 4
_Bool
# 38 "C:/esp32/esp-idf/components/esp32/include/rom/secure_boot.h"
    ets_secure_boot_check_start(uint8_t abs_index, uint32_t iv_addr);

int ets_secure_boot_check_finish(uint32_t *abstract);
# 27 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 2

# 1 "C:/esp32/esp-idf/components/esp32/include/rom/cache.h" 1
# 18 "C:/esp32/esp-idf/components/esp32/include/rom/cache.h"
# 1 "C:/esp32/esp-idf/components/soc/esp32/include/soc/dport_access.h" 1
# 20 "C:/esp32/esp-idf/components/soc/esp32/include/soc/dport_access.h"
# 1 "C:/esp32/esp-idf/components/esp32/include/esp_dport_access.h" 1
# 18 "C:/esp32/esp-idf/components/esp32/include/esp_dport_access.h"
void esp_dport_access_stall_other_cpu_start(void);
void esp_dport_access_stall_other_cpu_end(void);
void esp_dport_access_int_init(void);
# 21 "C:/esp32/esp-idf/components/soc/esp32/include/soc/dport_access.h" 2
# 32 "C:/esp32/esp-idf/components/soc/esp32/include/soc/dport_access.h"
static inline uint32_t __attribute__((section(".iram1"))) DPORT_REG_READ(uint32_t reg)
{
    uint32_t val;

    ;
    val = (*(volatile uint32_t *)(reg));
    ;

    return val;
}
# 84 "C:/esp32/esp-idf/components/soc/esp32/include/soc/dport_access.h"
static inline uint32_t __attribute__((section(".iram1"))) DPORT_READ_PERI_REG(uint32_t addr)
{
    uint32_t val;

    ;
    val = (*((volatile uint32_t *)(addr)));
    ;

    return val;
}
# 19 "C:/esp32/esp-idf/components/esp32/include/rom/cache.h" 2
# 40 "C:/esp32/esp-idf/components/esp32/include/rom/cache.h"
void mmu_init(int cpu_no);
# 69 "C:/esp32/esp-idf/components/esp32/include/rom/cache.h"
static inline unsigned int __attribute__((section(".iram1"))) cache_flash_mmu_set(int cpu_no, int pid, unsigned int vaddr, unsigned int paddr, int psize, int num)
{
    extern unsigned int cache_flash_mmu_set_rom(int cpu_no, int pid, unsigned int vaddr, unsigned int paddr, int psize, int num);

    unsigned int ret;

    ;
    ret = cache_flash_mmu_set_rom(cpu_no, pid, vaddr, paddr, psize, num);
    ;

    return ret;
}
# 109 "C:/esp32/esp-idf/components/esp32/include/rom/cache.h"
static inline unsigned int __attribute__((section(".iram1"))) cache_sram_mmu_set(int cpu_no, int pid, unsigned int vaddr, unsigned int paddr, int psize, int num)
{
    extern unsigned int cache_sram_mmu_set_rom(int cpu_no, int pid, unsigned int vaddr, unsigned int paddr, int psize, int num);

    unsigned int ret;

    ;
    ret = cache_sram_mmu_set_rom(cpu_no, pid, vaddr, paddr, psize, num);
    ;

    return ret;
}
# 130 "C:/esp32/esp-idf/components/esp32/include/rom/cache.h"
static inline void __attribute__((section(".iram1"))) Cache_Read_Init(int cpu_no)
{
    extern void Cache_Read_Init_rom(int cpu_no);
    ;
    Cache_Read_Init_rom(cpu_no);
    ;
}
# 146 "C:/esp32/esp-idf/components/esp32/include/rom/cache.h"
static inline void __attribute__((section(".iram1"))) Cache_Flush(int cpu_no)
{
    extern void Cache_Flush_rom(int cpu_no);
    ;
    Cache_Flush_rom(cpu_no);
    ;
}
# 162 "C:/esp32/esp-idf/components/esp32/include/rom/cache.h"
static inline void __attribute__((section(".iram1"))) Cache_Read_Disable(int cpu_no)
{
    extern void Cache_Read_Disable_rom(int cpu_no);
    ;
    Cache_Read_Disable_rom(cpu_no);
    ;
}
# 178 "C:/esp32/esp-idf/components/esp32/include/rom/cache.h"
static inline void __attribute__((section(".iram1"))) Cache_Read_Enable(int cpu_no)
{
    extern void Cache_Read_Enable_rom(int cpu_no);
    ;
    Cache_Read_Enable_rom(cpu_no);
    ;
}
# 29 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 2
# 1 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h" 1
# 23 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
# 1 "C:/esp32/esp-idf/components/soc/esp32/include/soc/spi_reg.h" 1
# 24 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h" 2
# 120 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
typedef enum {
    ESP_ROM_SPIFLASH_QIO_MODE = 0,
    ESP_ROM_SPIFLASH_QOUT_MODE,
    ESP_ROM_SPIFLASH_DIO_MODE,
    ESP_ROM_SPIFLASH_DOUT_MODE,
    ESP_ROM_SPIFLASH_FASTRD_MODE,
    ESP_ROM_SPIFLASH_SLOWRD_MODE
} esp_rom_spiflash_read_mode_t;

typedef enum {
    ESP_ROM_SPIFLASH_RESULT_OK,
    ESP_ROM_SPIFLASH_RESULT_ERR,
    ESP_ROM_SPIFLASH_RESULT_TIMEOUT
} esp_rom_spiflash_result_t;

typedef struct {
    uint32_t device_id;
    uint32_t chip_size;
    uint32_t block_size;
    uint32_t sector_size;
    uint32_t page_size;
    uint32_t status_mask;
} esp_rom_spiflash_chip_t;

typedef struct {
    uint8_t data_length;
    uint8_t read_cmd0;
    uint8_t read_cmd1;
    uint8_t write_cmd;
    uint16_t data_mask;
    uint16_t data;
} esp_rom_spiflash_common_cmd_t;
# 163 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
void esp_rom_spiflash_fix_dummylen(uint8_t spi, uint8_t freqdiv);
# 176 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
void esp_rom_spiflash_select_qiomode(uint8_t wp_gpio_num, uint32_t ishspi);
# 194 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
void esp_rom_spiflash_set_drvs(uint8_t wp_gpio_num, uint32_t ishspi, uint8_t *drvs);
# 205 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
void esp_rom_spiflash_select_padsfunc(uint32_t ishspi);
# 218 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
void esp_rom_spiflash_attach(uint32_t ishspi,
# 218 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h" 3 4
                                             _Bool
# 218 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
                                                  legacy);
# 232 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_read_status(esp_rom_spiflash_chip_t *spi, uint32_t *status);
# 246 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_read_statushigh(esp_rom_spiflash_chip_t *spi, uint32_t *status);
# 260 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_write_status(esp_rom_spiflash_chip_t *spi, uint32_t status_value);
# 274 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_read_user_cmd(uint32_t *status, uint8_t cmd);
# 288 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_config_readmode(esp_rom_spiflash_read_mode_t mode);
# 302 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_config_clk(uint8_t freqdiv, uint8_t spi);
# 314 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
uint16_t esp_rom_spiflash_common_cmd(esp_rom_spiflash_common_cmd_t *cmd);
# 326 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_unlock(void);
# 338 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_lock(void);
# 360 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_config_param(uint32_t deviceId, uint32_t chip_size, uint32_t block_size,
                                                        uint32_t sector_size, uint32_t page_size, uint32_t status_mask);
# 373 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_erase_chip(void);
# 386 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_erase_block(uint32_t block_num);
# 399 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_erase_sector(uint32_t sector_num);
# 413 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_erase_area(uint32_t start_addr, uint32_t area_len);
# 429 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_write(uint32_t dest_addr, const uint32_t *src, int32_t len);
# 445 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_read(uint32_t src_addr, uint32_t *dest, int32_t len);
# 455 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
void esp_rom_spiflash_write_encrypted_enable(void);
# 469 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_prepare_encrypted_data(uint32_t flash_addr, uint32_t *data);
# 479 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
void esp_rom_spiflash_write_encrypted_disable(void);
# 499 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_write_encrypted(uint32_t flash_addr, uint32_t *data, uint32_t len);
# 512 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
esp_rom_spiflash_result_t esp_rom_spiflash_wait_idle(esp_rom_spiflash_chip_t *spi);
# 531 "C:/esp32/esp-idf/components/esp32/include/rom/spi_flash.h"
void esp_rom_spiflash_select_qio_pins(uint8_t wp_gpio_num, uint32_t spiconfig);




extern esp_rom_spiflash_chip_t g_rom_flashchip;
# 30 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 2

static const char *TAG = "flash_encrypt";


static esp_err_t initialise_flash_encryption(void);
static esp_err_t encrypt_flash_contents(uint32_t flash_crypt_cnt,
# 35 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
                                                                 _Bool
# 35 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
                                                                      flash_crypt_wr_dis);
static esp_err_t encrypt_bootloader();
static esp_err_t encrypt_and_load_partition_table(esp_partition_info_t *partition_table, int *num_partitions);
static esp_err_t encrypt_partition(int index, const esp_partition_info_t *partition);

esp_err_t esp_flash_encrypt_check_and_update(void)
{
    uint32_t efuse_blk0 = ({ ; (*(volatile uint32_t *)(0x3ff5A000 + 0x000)); });
    if (((esp_log_level_t) 3) >= ESP_LOG_VERBOSE) { ets_printf( "V" " (%d) %s: " "efuse_blk0 raw value %08x" "\033[0m" "\n", esp_log_timestamp(), TAG, efuse_blk0); };
    uint32_t flash_crypt_cnt = (efuse_blk0 & ((0xFF)<<(20))) >> 20;

# 45 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
   _Bool
# 45 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
        flash_crypt_wr_dis = efuse_blk0 & (1<<2);
    if (((esp_log_level_t) 3) >= ESP_LOG_VERBOSE) { ets_printf( "V" " (%d) %s: " "efuse FLASH_CRYPT_CNT 0x%x WR_DIS_FLASH_CRYPT_CNT 0x%x" "\033[0m" "\n", esp_log_timestamp(), TAG, flash_crypt_cnt, flash_crypt_wr_dis); };

    if (__builtin_parity(flash_crypt_cnt) == 1) {

        int left = (7 - __builtin_popcount(flash_crypt_cnt)) / 2;
        if (flash_crypt_wr_dis) {
            left = 0;
        }
        if (((esp_log_level_t) 3) >= ESP_LOG_INFO) { ets_printf("\033[0;" "32" "m" "I" " (%d) %s: " "flash encryption is enabled (%d plaintext flashes left)" "\033[0m" "\n", esp_log_timestamp(), TAG, left); };
        return 0;
    }
    else {

        return encrypt_flash_contents(flash_crypt_cnt, flash_crypt_wr_dis);
    }
}

static esp_err_t initialise_flash_encryption(void)
{



    uint32_t dis_reg = ({ ; (*(volatile uint32_t *)(0x3ff5A000 + 0x000)); });

# 69 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
   _Bool
# 69 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
        efuse_key_read_protected = dis_reg & (1<<16);

# 70 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
   _Bool
# 70 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
        efuse_key_write_protected = dis_reg & (1<<7);
    if (efuse_key_read_protected ==
# 71 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
                                   0

# 72 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
       && efuse_key_write_protected ==
# 72 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
                                       0

# 73 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
       && ({ ; (*(volatile uint32_t *)(0x3ff5A000 + 0x038)); }) == 0
        && ({ ; (*(volatile uint32_t *)(0x3ff5A000 + 0x03c)); }) == 0
        && ({ ; (*(volatile uint32_t *)(0x3ff5A000 + 0x040)); }) == 0
        && ({ ; (*(volatile uint32_t *)(0x3ff5A000 + 0x044)); }) == 0
        && ({ ; (*(volatile uint32_t *)(0x3ff5A000 + 0x048)); }) == 0
        && ({ ; (*(volatile uint32_t *)(0x3ff5A000 + 0x04c)); }) == 0
        && ({ ; (*(volatile uint32_t *)(0x3ff5A000 + 0x050)); }) == 0
        && ({ ; (*(volatile uint32_t *)(0x3ff5A000 + 0x054)); }) == 0) {
        if (((esp_log_level_t) 3) >= ESP_LOG_INFO) { ets_printf("\033[0;" "32" "m" "I" " (%d) %s: " "Generating new flash encryption key..." "\033[0m" "\n", esp_log_timestamp(), TAG); };
        uint32_t buf[8];
        bootloader_fill_random(buf, sizeof(buf));
        for (int i = 0; i < 8; i++) {
            if (((esp_log_level_t) 3) >= ESP_LOG_VERBOSE) { ets_printf( "V" " (%d) %s: " "EFUSE_BLK1_WDATA%d_REG = 0x%08x" "\033[0m" "\n", esp_log_timestamp(), TAG, i, buf[i]); };
            ({ ; (*(volatile uint32_t *)((0x3ff5A000 + 0x098) + 4*i)) = (buf[i]); });
        }
        bzero(buf, sizeof(buf));
        esp_efuse_burn_new_values();

        if (((esp_log_level_t) 3) >= ESP_LOG_INFO) { ets_printf("\033[0;" "32" "m" "I" " (%d) %s: " "Read & write protecting new key..." "\033[0m" "\n", esp_log_timestamp(), TAG); };
        ({ ; (*(volatile uint32_t *)((0x3ff5A000 + 0x01c))) = ((1<<7) | (1<<16)); });
        esp_efuse_burn_new_values();
    } else {

        if(!(efuse_key_read_protected && efuse_key_write_protected)) {
            if (((esp_log_level_t) 3) >= ESP_LOG_ERROR) { ets_printf("\033[0;" "31" "m" "E" " (%d) %s: " "Flash encryption key has to be either unset or both read and write protected" "\033[0m" "\n", esp_log_timestamp(), TAG); };
            return 0x103;
        }
        if (((esp_log_level_t) 3) >= ESP_LOG_WARN) { ets_printf("\033[0;" "33" "m" "W" " (%d) %s: " "Using pre-loaded flash encryption key in EFUSE block 1" "\033[0m" "\n", esp_log_timestamp(), TAG); };
    }
# 113 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
    if (((esp_log_level_t) 3) >= ESP_LOG_INFO) { ets_printf("\033[0;" "32" "m" "I" " (%d) %s: " "Setting CRYPT_CONFIG efuse to 0xF" "\033[0m" "\n", esp_log_timestamp(), TAG); };
    ({ ; (*(volatile uint32_t *)((0x3ff5A000 + 0x030))) = (((0xF)<<(28))); });
    esp_efuse_burn_new_values();

    uint32_t new_wdata6 = 0;

    if (((esp_log_level_t) 3) >= ESP_LOG_INFO) { ets_printf("\033[0;" "32" "m" "I" " (%d) %s: " "Disable UART bootloader encryption..." "\033[0m" "\n", esp_log_timestamp(), TAG); };
    new_wdata6 |= ((1UL << (7)));




    if (((esp_log_level_t) 3) >= ESP_LOG_INFO) { ets_printf("\033[0;" "32" "m" "I" " (%d) %s: " "Disable UART bootloader decryption..." "\033[0m" "\n", esp_log_timestamp(), TAG); };
    new_wdata6 |= ((1UL << (8)));




    if (((esp_log_level_t) 3) >= ESP_LOG_INFO) { ets_printf("\033[0;" "32" "m" "I" " (%d) %s: " "Disable UART bootloader MMU cache..." "\033[0m" "\n", esp_log_timestamp(), TAG); };
    new_wdata6 |= ((1UL << (9)));




    if (((esp_log_level_t) 3) >= ESP_LOG_INFO) { ets_printf("\033[0;" "32" "m" "I" " (%d) %s: " "Disable JTAG..." "\033[0m" "\n", esp_log_timestamp(), TAG); };
    new_wdata6 |= ((1UL << (6)));




    if (new_wdata6 != 0) {
        ({ ; (*(volatile uint32_t *)((0x3ff5A000 + 0x034))) = (new_wdata6); });
        esp_efuse_burn_new_values();
    }

    return 0;
}


static esp_err_t encrypt_flash_contents(uint32_t flash_crypt_cnt,
# 152 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
                                                                 _Bool
# 152 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
                                                                      flash_crypt_wr_dis)
{
    esp_err_t err;
    esp_partition_info_t partition_table[(0xC00 / sizeof(esp_partition_info_t))];
    int num_partitions;



    if (flash_crypt_wr_dis || flash_crypt_cnt == 0xFF) {
        if (((esp_log_level_t) 3) >= ESP_LOG_ERROR) { ets_printf("\033[0;" "31" "m" "E" " (%d) %s: " "Cannot re-encrypt data (FLASH_CRYPT_CNT 0x%02x write disabled %d" "\033[0m" "\n", esp_log_timestamp(), TAG, flash_crypt_cnt, flash_crypt_wr_dis); };
        return -1;
    }

    if (flash_crypt_cnt == 0) {

        err = initialise_flash_encryption();
        if (err != 0) {
            return err;
        }
    }

    err = encrypt_bootloader();
    if (err != 0) {
        return err;
    }

    err = encrypt_and_load_partition_table(partition_table, &num_partitions);
    if (err != 0) {
        return err;
    }





    for (int i = 0; i < num_partitions; i++) {
        err = encrypt_partition(i, &partition_table[i]);
        if (err != 0) {
            return err;
        }
    }

    if (((esp_log_level_t) 3) >= ESP_LOG_DEBUG) { ets_printf( "D" " (%d) %s: " "All flash regions checked for encryption pass" "\033[0m" "\n", esp_log_timestamp(), TAG); };


    int ffs_inv = __builtin_ffs((~flash_crypt_cnt) & 0xFF);

    uint32_t new_flash_crypt_cnt = flash_crypt_cnt + (1 << (ffs_inv - 1));
    if (((esp_log_level_t) 3) >= ESP_LOG_DEBUG) { ets_printf( "D" " (%d) %s: " "FLASH_CRYPT_CNT 0x%x -> 0x%x" "\033[0m" "\n", esp_log_timestamp(), TAG, flash_crypt_cnt, new_flash_crypt_cnt); };
    ({ ; (({ ; (*(volatile uint32_t *)(((0x3ff5A000 + 0x01c)))) = (((({ ; (*(volatile uint32_t *)(0x3ff5A000 + 0x01c)); }) & ~((0xFF) << (20)))|(((new_flash_crypt_cnt) & (0xFF))<<(20)))); })); });
    esp_efuse_burn_new_values();

    if (((esp_log_level_t) 3) >= ESP_LOG_INFO) { ets_printf("\033[0;" "32" "m" "I" " (%d) %s: " "Flash encryption completed" "\033[0m" "\n", esp_log_timestamp(), TAG); };

    return 0;
}

static esp_err_t encrypt_bootloader()
{
    esp_err_t err;
    uint32_t image_length;

    if (esp_image_basic_verify(0x1000,
# 214 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
                                                     0
# 214 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
                                                          , &image_length) == 0) {
        if (((esp_log_level_t) 3) >= ESP_LOG_DEBUG) { ets_printf( "D" " (%d) %s: " "bootloader is plaintext. Encrypting..." "\033[0m" "\n", esp_log_timestamp(), TAG); };
        err = esp_flash_encrypt_region(0x1000, image_length);
        if (err != 0) {
            if (((esp_log_level_t) 3) >= ESP_LOG_ERROR) { ets_printf("\033[0;" "31" "m" "E" " (%d) %s: " "Failed to encrypt bootloader in place: 0x%x" "\033[0m" "\n", esp_log_timestamp(), TAG, err); };
            return err;
        }

        if (esp_secure_boot_enabled()) {



            if (((esp_log_level_t) 3) >= ESP_LOG_DEBUG) { ets_printf( "D" " (%d) %s: " "Encrypting secure bootloader IV & digest..." "\033[0m" "\n", esp_log_timestamp(), TAG); };
            err = esp_flash_encrypt_region(0,
                                           0x1000);
            if (err != 0) {
                if (((esp_log_level_t) 3) >= ESP_LOG_ERROR) { ets_printf("\033[0;" "31" "m" "E" " (%d) %s: " "Failed to encrypt bootloader IV & digest in place: 0x%x" "\033[0m" "\n", esp_log_timestamp(), TAG, err); };
                return err;
            }
        }
    }
    else {
        if (((esp_log_level_t) 3) >= ESP_LOG_WARN) { ets_printf("\033[0;" "33" "m" "W" " (%d) %s: " "no valid bootloader was found" "\033[0m" "\n", esp_log_timestamp(), TAG); };
    }

    return 0;
}

static esp_err_t encrypt_and_load_partition_table(esp_partition_info_t *partition_table, int *num_partitions)
{
    esp_err_t err;

    err = bootloader_flash_read(0x8000, partition_table, 0xC00,
# 246 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
                                                                                                         0
# 246 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
                                                                                                              );
    if (err != 0) {
        if (((esp_log_level_t) 3) >= ESP_LOG_ERROR) { ets_printf("\033[0;" "31" "m" "E" " (%d) %s: " "Failed to read partition table data" "\033[0m" "\n", esp_log_timestamp(), TAG); };
        return err;
    }
    if (esp_partition_table_basic_verify(partition_table,
# 251 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
                                                         0
# 251 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
                                                              , num_partitions) == 0) {
        if (((esp_log_level_t) 3) >= ESP_LOG_DEBUG) { ets_printf( "D" " (%d) %s: " "partition table is plaintext. Encrypting..." "\033[0m" "\n", esp_log_timestamp(), TAG); };
        esp_err_t err = esp_flash_encrypt_region(0x8000,
                                                 0x1000);
        if (err != 0) {
            if (((esp_log_level_t) 3) >= ESP_LOG_ERROR) { ets_printf("\033[0;" "31" "m" "E" " (%d) %s: " "Failed to encrypt partition table in place. %x" "\033[0m" "\n", esp_log_timestamp(), TAG, err); };
            return err;
        }
    }
    else {
        if (((esp_log_level_t) 3) >= ESP_LOG_ERROR) { ets_printf("\033[0;" "31" "m" "E" " (%d) %s: " "Failed to read partition table data - not plaintext?" "\033[0m" "\n", esp_log_timestamp(), TAG); };
        return 0x103;
    }


    return 0;
}


static esp_err_t encrypt_partition(int index, const esp_partition_info_t *partition)
{
    esp_err_t err;
    uint32_t image_len = partition->pos.size;

# 274 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
   _Bool
# 274 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
        should_encrypt = (partition->flags & (1<<0));

    if (partition->type == 0x00) {

        if (esp_image_basic_verify(partition->pos.offset,
# 278 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
                                                         0
# 278 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
                                                              , &image_len) == 0) {
            if(image_len > partition->pos.size) {
                if (((esp_log_level_t) 3) >= ESP_LOG_ERROR) { ets_printf("\033[0;" "31" "m" "E" " (%d) %s: " "partition entry %d has image longer than partition (%d vs %d)" "\033[0m" "\n", esp_log_timestamp(), TAG, index, image_len, partition->pos.size); };
                should_encrypt =
# 281 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
                                0
# 281 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
                                     ;
            } else {
                should_encrypt =
# 283 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
                                1
# 283 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
                                    ;
            }
        } else {
            should_encrypt =
# 286 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
                            0
# 286 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
                                 ;
        }
    } else if (partition->type == 0x01 && partition->subtype == 0x00) {

        should_encrypt =
# 290 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
                        1
# 290 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
                            ;
    }

    if (!should_encrypt) {
        return 0;
    }
    else {

        if (((esp_log_level_t) 3) >= ESP_LOG_INFO) { ets_printf("\033[0;" "32" "m" "I" " (%d) %s: " "Encrypting partition %d at offset 0x%x..." "\033[0m" "\n", esp_log_timestamp(), TAG, index, partition->pos.offset); };

        err = esp_flash_encrypt_region(partition->pos.offset, partition->pos.size);
        if (err != 0) {
            if (((esp_log_level_t) 3) >= ESP_LOG_ERROR) { ets_printf("\033[0;" "31" "m" "E" " (%d) %s: " "Failed to encrypt partition %d" "\033[0m" "\n", esp_log_timestamp(), TAG, index); };
        }
        return err;
    }
}


esp_err_t esp_flash_encrypt_region(uint32_t src_addr, size_t data_length)
{
    esp_err_t err;
    uint32_t buf[0x1000 / sizeof(uint32_t)];

    if (src_addr % 0x1000 != 0) {
        if (((esp_log_level_t) 3) >= ESP_LOG_ERROR) { ets_printf("\033[0;" "31" "m" "E" " (%d) %s: " "esp_flash_encrypt_region bad src_addr 0x%x" "\033[0m" "\n", esp_log_timestamp(), TAG,src_addr); };
        return -1;
    }

    for (size_t i = 0; i < data_length; i += 0x1000) {
        uint32_t sec_start = i + src_addr;
        err = bootloader_flash_read(sec_start, buf, 0x1000,
# 321 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
                                                                      0
# 321 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
                                                                           );
        if (err != 0) {
            goto flash_failed;
        }
        err = bootloader_flash_erase_sector(sec_start / 0x1000);
        if (err != 0) {
            goto flash_failed;
        }
        err = bootloader_flash_write(sec_start, buf, 0x1000,
# 329 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c" 3 4
                                                                       1
# 329 "C:/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c"
                                                                           );
        if (err != 0) {
            goto flash_failed;
        }
    }
    return 0;

 flash_failed:
    if (((esp_log_level_t) 3) >= ESP_LOG_ERROR) { ets_printf("\033[0;" "31" "m" "E" " (%d) %s: " "flash operation failed: 0x%x" "\033[0m" "\n", esp_log_timestamp(), TAG, err); };
    return err;
}

billminux
Posts: 6
Joined: Wed Jun 07, 2017 2:32 pm

Re: msys2 in win10(32bit) compiler normal, but in win10(64bit ) compile error

Postby billminux » Thu Jun 08, 2017 11:23 am

Think you!
Because I installed the mingw before, the environment variable was created. C_INCLUDE_PATH
D:\mingw\include。I deleted this variable, okay!

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

Re: msys2 in win10(32bit) compiler normal, but in win10(64bit ) compile error

Postby ESP_Angus » Fri Jun 09, 2017 2:04 am

Thanks Bill. Glad you got that figured out.

Who is online

Users browsing this forum: No registered users and 62 guests