[1/9] Performing build step for 'bootloader' [1/1] cmd.exe /C "cd /D E:\Espressif\frameworks\esp-idf-v5.0.4\app\esp32_shock\build\bootloader\esp-idf\esptool_py && E:\Espressif\python_env\idf5.0_py3.11_env\Scripts\python.exe E:/Espressif/frameworks/esp-idf-v5.0.4/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x0 E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/build/bootloader/bootloader.bin" Bootloader binary size 0x5080 bytes. 0x2f80 bytes (37%) free. [2/7] Building C object esp-idf/lis3dsh/CMakeFiles/__idf_lis3dsh.dir/shake_detect.c.obj FAILED: esp-idf/lis3dsh/CMakeFiles/__idf_lis3dsh.dir/shake_detect.c.obj ccache E:\Espressif\tools\xtensa-esp32s3-elf\esp-2022r1-11.2.0\xtensa-esp32s3-elf\bin\xtensa-esp32s3-elf-gcc.exe -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -IE:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/build/config -IE:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/newlib/platform_include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/freertos/FreeRTOS-Kernel/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/freertos/esp_additions/include/freertos -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/freertos/esp_additions/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_hw_support/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_hw_support/include/soc -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_hw_support/include/soc/esp32s3 -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_hw_support/port/esp32s3/. -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_hw_support/port/esp32s3/private_include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/heap/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/log/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/soc/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/soc/esp32s3/. -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/soc/esp32s3/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/hal/esp32s3/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/hal/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/hal/platform_port/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_rom/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_rom/include/esp32s3 -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_rom/esp32s3 -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_common/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_system/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_system/port/soc -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_system/port/include/private -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/xtensa/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/xtensa/esp32s3/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/lwip/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/lwip/include/apps -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/lwip/include/apps/sntp -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/lwip/lwip/src/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/lwip/port/esp32/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/lwip/port/esp32/include/arch -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/driver/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/driver/deprecated -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/driver/esp32s3/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_pm/include -IE:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_ringbuf/include -mlongcalls -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fmacro-prefix-map=E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock=. -fmacro-prefix-map=E:/Espressif/frameworks/esp-idf-v5.0.4=/IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu17 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v5.0.4-dirty\" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -MD -MT esp-idf/lis3dsh/CMakeFiles/__idf_lis3dsh.dir/shake_detect.c.obj -MF esp-idf\lis3dsh\CMakeFiles\__idf_lis3dsh.dir\shake_detect.c.obj.d -o esp-idf/lis3dsh/CMakeFiles/__idf_lis3dsh.dir/shake_detect.c.obj -c E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c In file included from E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:12: E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/lis3dsh_lib/lis3dsh_reg.h:594:3: error: conflicting types for 'lis3dsh_data_t'; have 'struct ' 594 | } lis3dsh_data_t; | ^~~~~~~~~~~~~~ In file included from E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:11: E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.h:24:3: note: previous declaration of 'lis3dsh_data_t' with type 'lis3dsh_data_t' 24 | } lis3dsh_data_t; | ^~~~~~~~~~~~~~ E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c: In function 'lis3dsh_drdy_int_init': E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:68:30: error: 'ESP_INTR_FLAG_DEFAULT' undeclared (first use in this function); did you mean 'ESP_INTR_FLAG_LEVEL3'? 68 | gpio_install_isr_service(ESP_INTR_FLAG_DEFAULT); | ^~~~~~~~~~~~~~~~~~~~~ | ESP_INTR_FLAG_LEVEL3 E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:68:30: note: each undeclared identifier is reported only once for each function it appears in E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:69:43: error: 'drdy_isr_handler' undeclared (first use in this function); did you mean 'gpio_isr_handler'? 69 | gpio_isr_handler_add(LIS3DSH_DRDY_IO, drdy_isr_handler, (void*) LIS3DSH_DRDY_IO); | ^~~~~~~~~~~~~~~~ | gpio_isr_handler In file included from E:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_hw_support/include/esp_intr_alloc.h:11, from E:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_hw_support/include/esp_cpu.h:20, from E:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_hw_support/include/spinlock.h:11, from E:/Espressif/frameworks/esp-idf-v5.0.4/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:74, from E:/Espressif/frameworks/esp-idf-v5.0.4/components/freertos/FreeRTOS-Kernel/include/freertos/portable.h:58, from E:/Espressif/frameworks/esp-idf-v5.0.4/components/freertos/FreeRTOS-Kernel/include/freertos/FreeRTOS.h:70, from E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:4: E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c: In function 'platform_init': E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:74:21: error: implicit declaration of function 'i2c_master_init'; did you mean 'i2c_master_write'? [-Werror=implicit-function-declaration] 74 | ESP_ERROR_CHECK(i2c_master_init()); | ^~~~~~~~~~~~~~~ E:/Espressif/frameworks/esp-idf-v5.0.4/components/esp_common/include/esp_err.h:117:30: note: in definition of macro 'ESP_ERROR_CHECK' 117 | esp_err_t err_rc_ = (x); \ | ^ E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c: In function 'platform_write': E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:85:69: error: 'ACK_CHECK_EN' undeclared (first use in this function) 85 | i2c_master_write_byte(cmd, (LIS3DSH_I2C_SALVE_ADDR_L << 1) | 0, ACK_CHECK_EN); | ^~~~~~~~~~~~ E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:89:93: error: 'portTICK_RATE_MS' undeclared (first use in this function); did you mean 'portTICK_PERIOD_MS'? 89 | ret = i2c_master_cmd_begin(LIS3DSH_I2C_MASTER_NUM, cmd, LIS3DSH_I2C_MASTER_TIMEOUT_MS / portTICK_RATE_MS); | ^~~~~~~~~~~~~~~~ | portTICK_PERIOD_MS E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c: In function 'platform_read': E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:99:69: error: 'ACK_CHECK_EN' undeclared (first use in this function) 99 | i2c_master_write_byte(cmd, (LIS3DSH_I2C_SALVE_ADDR_L << 1) | 1, ACK_CHECK_EN); | ^~~~~~~~~~~~ E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:101:37: error: 'ACK_VAL' undeclared (first use in this function) 101 | i2c_master_read(cmd, bufp, len, ACK_VAL); | ^~~~~~~ E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:103:93: error: 'portTICK_RATE_MS' undeclared (first use in this function); did you mean 'portTICK_PERIOD_MS'? 103 | ret = i2c_master_cmd_begin(LIS3DSH_I2C_MASTER_NUM, cmd, LIS3DSH_I2C_MASTER_TIMEOUT_MS / portTICK_RATE_MS); | ^~~~~~~~~~~~~~~~ | portTICK_PERIOD_MS E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c: In function 'lis3dsh_init': E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:125:5: error: 'dev_ctx' undeclared (first use in this function); did you mean 'dev_t'? 125 | dev_ctx.handle = (void *)platform_init(); | ^~~~~~~ | dev_t E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:116:27: warning: unused variable 'all_sources' [-Wunused-variable] 116 | lis3dsh_all_sources_t all_sources; | ^~~~~~~~~~~ E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c: In function 'lis3dsh_read_task': E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:204:31: error: 'dev_ctx' undeclared (first use in this function); did you mean 'dev_t'? 204 | lis3dsh_read_reg(&dev_ctx, LIS3DSH_FIFO_SRC, ®.byte, 1); | ^~~~~~~ | dev_t E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:212:36: error: 'lis3dsh_data_t' has no member named 'a' 212 | lis3dsh_data[buf_r].a[0] = (int16_t)(rx_buffer[0] | (rx_buffer[1] << 8)) * 2.0 / 0x7fff; | ^ E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:213:36: error: 'lis3dsh_data_t' has no member named 'a' 213 | lis3dsh_data[buf_r].a[1] = (int16_t)(rx_buffer[2] | (rx_buffer[3] << 8)) * 2.0 / 0x7fff; // y 有重力加速度分量,计算fft的时候需要去掉 | ^ E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:214:36: error: 'lis3dsh_data_t' has no member named 'a' 214 | lis3dsh_data[buf_r].a[2] = (int16_t)(rx_buffer[4] | (rx_buffer[5] << 8)) * 2.0 / 0x7fff; | ^ E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:231:5: error: implicit declaration of function 'ql_rtos_task_delete' [-Werror=implicit-function-declaration] 231 | ql_rtos_task_delete(NULL); | ^~~~~~~~~~~~~~~~~~~ E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c: In function 'fft_calculate_task': E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:284:67: error: 'lis3dsh_data_t' has no member named 'a' 284 | fft_data.y_cf[i * 2 + 0] = lis3dsh_data[fft_h + i].a[ch1 - 1] * fft_data.wind[i]; | ^ E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:285:67: error: 'lis3dsh_data_t' has no member named 'a' 285 | fft_data.y_cf[i * 2 + 1] = lis3dsh_data[fft_h + i].a[ch2 - 1] * fft_data.wind[i]; | ^ E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c: In function 'shake_detect_init': E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:343:29: warning: passing argument 1 of 'xTaskCreatePinnedToCore' from incompatible pointer type [-Wincompatible-pointer-types] 343 | xTaskCreatePinnedToCore(lis3dsh_read_task, "lis3dsh_read_task", 4096, NULL, 9, NULL, tskNO_AFFINITY); | ^~~~~~~~~~~~~~~~~ | | | void (*)(void) In file included from E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:5: E:/Espressif/frameworks/esp-idf-v5.0.4/components/freertos/FreeRTOS-Kernel/include/freertos/task.h:345:56: note: expected 'TaskFunction_t' {aka 'void (*)(void *)'} but argument is of type 'void (*)(void)' 345 | BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pvTaskCode, | ~~~~~~~~~~~~~~~^~~~~~~~~~ E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:344:29: warning: passing argument 1 of 'xTaskCreatePinnedToCore' from incompatible pointer type [-Wincompatible-pointer-types] 344 | xTaskCreatePinnedToCore(fft_calculate_task, "fft_calculate_task", 4096, NULL, 9, NULL, tskNO_AFFINITY); | ^~~~~~~~~~~~~~~~~~ | | | void (*)(void) In file included from E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:5: E:/Espressif/frameworks/esp-idf-v5.0.4/components/freertos/FreeRTOS-Kernel/include/freertos/task.h:345:56: note: expected 'TaskFunction_t' {aka 'void (*)(void *)'} but argument is of type 'void (*)(void)' 345 | BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pvTaskCode, | ~~~~~~~~~~~~~~~^~~~~~~~~~ At top level: E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:50:23: warning: 'gpio_isr_handler' defined but not used [-Wunused-function] 50 | static void IRAM_ATTR gpio_isr_handler(void* arg) | ^~~~~~~~~~~~~~~~ E:/Espressif/frameworks/esp-idf-v5.0.4/app/esp32_shock/components/lis3dsh/shake_detect.c:21:18: warning: 'lis3dsh_i2c_master_init' defined but not used [-Wunused-function] 21 | static esp_err_t lis3dsh_i2c_master_init(void) | ^~~~~~~~~~~~~~~~~~~~~~~ cc1.exe: some warnings being treated as errors ninja: build stopped: subcommand failed.