Error while compiling Amazon FreeRTOS for ESP32 DevkitC

lesudu wrote on June 01, 2018:

Hello,

I am trying to run FreeRTOS on ESP32 DevkitC. I am following the steps of Getting Started guide.
I am using the latest version of esp-idf and amazon freertos. After configuring everything as mentioned, when I compile the demo using make, I get the following error:


$ make flash
CC build/driver/sdio_slave.o
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:138:16: error: 'PERIPHS_IO_MUX_SD_CLK_U' undeclared here (not in                                                                               a function)
         .clk = PERIPHS_IO_MUX_SD_CLK_U,
                ^
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:139:16: error: 'PERIPHS_IO_MUX_SD_CMD_U' undeclared here (not in                                                                               a function)
         .cmd = PERIPHS_IO_MUX_SD_CMD_U,
                ^
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:140:15: error: 'PERIPHS_IO_MUX_SD_DATA0_U' undeclared here (not i                                                                              n a function)
         .d0 = PERIPHS_IO_MUX_SD_DATA0_U,
               ^
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:141:15: error: 'PERIPHS_IO_MUX_SD_DATA1_U' undeclared here (not i                                                                              n a function)
         .d1 = PERIPHS_IO_MUX_SD_DATA1_U,
               ^
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:142:15: error: 'PERIPHS_IO_MUX_SD_DATA2_U' undeclared here (not i                                                                              n a function)
         .d2 = PERIPHS_IO_MUX_SD_DATA2_U,
               ^
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:143:15: error: 'PERIPHS_IO_MUX_SD_DATA3_U' undeclared here (not i                                                                              n a function)
         .d3 = PERIPHS_IO_MUX_SD_DATA3_U,
               ^
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:146:16: error: 'PERIPHS_IO_MUX_MTMS_U' undeclared here (not in a                                                                               function)
         .clk = PERIPHS_IO_MUX_MTMS_U,
                ^
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:147:16: error: 'PERIPHS_IO_MUX_MTDO_U' undeclared here (not in a                                                                               function)
         .cmd = PERIPHS_IO_MUX_MTDO_U,
                ^
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:148:15: error: 'PERIPHS_IO_MUX_GPIO2_U' undeclared here (not in a                                                                               function)
         .d0 = PERIPHS_IO_MUX_GPIO2_U,
               ^
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:149:15: error: 'PERIPHS_IO_MUX_GPIO4_U' undeclared here (not in a                                                                               function)
         .d1 = PERIPHS_IO_MUX_GPIO4_U,
               ^
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:150:15: error: 'PERIPHS_IO_MUX_MTDI_U' undeclared here (not in a                                                                               function)
         .d2 = PERIPHS_IO_MUX_MTDI_U,
               ^
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:151:15: error: 'PERIPHS_IO_MUX_MTCK_U' undeclared here (not in a                                                                               function)
         .d3 = PERIPHS_IO_MUX_MTCK_U,
               ^
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c: In function 'configure_pin':
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:505:5: error: implicit declaration of function 'PIN_INPUT_ENABLE'                                                                               [-Werror=implicit-function-declaration]
     PIN_INPUT_ENABLE(io_mux_reg);
     ^
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:506:5: error: implicit declaration of function 'PIN_FUNC_SELECT'                                                                               [-Werror=implicit-function-declaration]
     PIN_FUNC_SELECT(io_mux_reg, sdmmc_func);
     ^
C:/msys32/home/abtz0fgy/esp/esp-idf/components/driver/sdio_slave.c:507:5: error: implicit declaration of function 'PIN_SET_DRV' [-We                                                                              rror=implicit-function-declaration]
     PIN_SET_DRV(io_mux_reg, drive_strength);
     ^
cc1.exe: some warnings being treated as errors
make[1]: *** [/home/abtz0fgy/esp/esp-idf/make/component_wrapper.mk:286: sdio_slave.o] Error 1
make: *** [C:/msys32/home/abtz0fgy/esp/esp-idf/make/project.mk:467: component-driver-build] Error 2

It was supposed to run according to the guide. Help me about the driver errors.
Thanks in advance.

Best Regards,
Sudarshan

lesudu wrote on June 01, 2018:

Hello,

I found answer to this myself. I set up the IDF_PATH to esp-idf while setting up the toolchain which was apparently not needed.

After removing the IDF_PATH and restarting the mingw32, the problem is solved!

Regards,
Sudarshan

SarenaAtAws wrote on June 04, 2018:

Thanks for raising the issue and providing a solution!