The problem with code and libraries

michal88
Posts: 5
Joined: Fri Jun 16, 2023 6:09 pm

The problem with code and libraries

Postby michal88 » Fri Jul 28, 2023 2:31 pm

I am using VScode with edp-idf and I have a problem with the code and I guess the libraries I want to connect an 868 mhz modem to the esp32c6 and connect a wireless PIR sensor. The 868mhz module is an RS485 transcelver eletechsup RT18A01.
  1. #include <RadioLib.h>
  2.  
  3. // Motion sensor pin
  4. const int motionSensorPin = 2;
  5. // Door sensor pin
  6. const int doorSensorPin = 3;
  7.  
  8. // 868MHz radio module pins
  9. const int radioModuleSSPin = 5;
  10. const int radioModuleRSTPin = 4;
  11.  
  12. // Radio module frequency and data rate
  13. const uint32_t frequency = 868000000; // 868MHz
  14. const uint32_t dataRate = 9600;
  15.  
  16. // Radio module object
  17. SX1278 radio = new Module(RADIO_CS_PIN, RADIO_IRQ_PIN, RADIO_RST_PIN, RADIO_DATAREADY_PIN, RADIO_DIO0_PIN);
  18.  
  19. void setup() {
  20.   Serial.begin(9600);
  21.  
  22.   pinMode(motionSensorPin, INPUT);
  23.   pinMode(doorSensorPin, INPUT);
  24.  
  25.   radio.init();
  26.   radio.setFrequency(frequency);
  27.   radio.setDatarate(dataRate);
  28.  
  29.   radio.setRxConfig(RadioModemFSK);
  30.   radio.setTxConfig(RadioModemFSK, 10);
  31. }
  32.  
  33. void loop() {
  34.   int motionSensorStatus = digitalRead(motionSensorPin);
  35.   int doorSensorStatus = digitalRead(doorSensorPin);
  36.  
  37.   if (motionSensorStatus == HIGH) {
  38.     sendMessage("Motion detected!");
  39.     delay(1000); // Delay to avoid multiple triggers
  40.   }
  41.  
  42.   if (doorSensorStatus == HIGH) {
  43.     sendMessage("Door opened!");
  44.     delay(1000); // Delay to avoid multiple triggers
  45.   }
  46. }
  47.  
  48. void sendMessage(const char* message) {
  49.   Serial.println(message);
  50.   radio.startTransmit();
  51.   radio.writeFIFO((byte*)message, strlen(message));
  52.   radio.transmit();
  53. }
  1.  *  Executing task: /home/michal/.espressif/python_env/idf5.1_py3.10_env/bin/python /home/michal/esp/esp-idf/tools/idf_size.py /home/michal/project-name/build/project-name.map
  2.  
  3. Total sizes:
  4. Used stat D/IRAM:   44876 bytes ( 407236 remain, 9.9% used)
  5.       .data size:    4188 bytes
  6.       .bss  size:    3720 bytes
  7.       .text size:   36968 bytes
  8. Used Flash size :   82358 bytes
  9.            .text:   53030 bytes
  10.          .rodata:   29072 bytes
  11. Total image size:  123514 bytes (.bin may be padded larger)
  1.  *  Executing task: ninja  
  2.  
  3. [4/904] Generating ../../partition_table/partition-table.bin
  4. Partition table binary generated. Contents:
  5. *******************************************************************************
  6. # ESP-IDF Partition Table
  7. # Name, Type, SubType, Offset, Size, Flags
  8. nvs,data,nvs,0x9000,24K,
  9. phy_init,data,phy,0xf000,4K,
  10. factory,app,factory,0x10000,1M,
  11. *******************************************************************************
  12. [209/904] Performing configure step for 'bootloader'
  13. -- Found Git: /usr/bin/git (found version "2.40.1")
  14. -- The C compiler identification is GNU 12.2.0
  15. -- The CXX compiler identification is GNU 12.2.0
  16. -- The ASM compiler identification is GNU
  17. -- Found assembler: /home/michal/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/riscv32-esp-elf-gcc
  18. -- Detecting C compiler ABI info
  19. -- Detecting C compiler ABI info - done
  20. -- Check for working C compiler: /home/michal/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/riscv32-esp-elf-gcc - skipped
  21. -- Detecting C compile features
  22. -- Detecting C compile features - done
  23. -- Detecting CXX compiler ABI info
  24. -- Detecting CXX compiler ABI info - done
  25. -- Check for working CXX compiler: /home/michal/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/riscv32-esp-elf-g++ - skipped
  26. -- Detecting CXX compile features
  27. -- Detecting CXX compile features - done
  28. -- Building ESP-IDF components for target esp32c6
  29. -- Project sdkconfig file /home/michal/project-name/sdkconfig
  30. -- Looking for sys/types.h
  31. -- Looking for sys/types.h - found
  32. -- Looking for stdint.h
  33. -- Looking for stdint.h - found
  34. -- Looking for stddef.h
  35. -- Looking for stddef.h - found
  36. -- Check size of time_t
  37. -- Check size of time_t - done
  38. -- Adding linker script /home/michal/esp/esp-idf/components/soc/esp32c6/ld/esp32c6.peripherals.ld
  39. -- App "bootloader" version: v5.1-dirty
  40. -- Adding linker script /home/michal/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.ld
  41. -- Adding linker script /home/michal/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.api.ld
  42. -- Adding linker script /home/michal/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.rvfp.ld
  43. -- Adding linker script /home/michal/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.newlib.ld
  44. -- Adding linker script /home/michal/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.phy.ld
  45. -- Adding linker script /home/michal/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.wdt.ld
  46. -- Adding linker script /home/michal/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.version.ld
  47. -- Adding linker script /home/michal/esp/esp-idf/components/bootloader/subproject/main/ld/esp32c6/bootloader.ld
  48. -- Adding linker script /home/michal/esp/esp-idf/components/bootloader/subproject/main/ld/esp32c6/bootloader.rom.ld
  49. -- Components: bootloader bootloader_support efuse esp_app_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table riscv soc spi_flash
  50. -- Component paths: /home/michal/esp/esp-idf/components/bootloader /home/michal/esp/esp-idf/components/bootloader_support /home/michal/esp/esp-idf/components/efuse /home/michal/esp/esp-idf/components/esp_app_format /home/michal/esp/esp-idf/components/esp_common /home/michal/esp/esp-idf/components/esp_hw_support /home/michal/esp/esp-idf/components/esp_rom /home/michal/esp/esp-idf/components/esp_system /home/michal/esp/esp-idf/components/esptool_py /home/michal/esp/esp-idf/components/freertos /home/michal/esp/esp-idf/components/hal /home/michal/esp/esp-idf/components/log /home/michal/esp/esp-idf/components/bootloader/subproject/main /home/michal/esp/esp-idf/components/bootloader/subproject/components/micro-ecc /home/michal/esp/esp-idf/components/newlib /home/michal/esp/esp-idf/components/partition_table /home/michal/esp/esp-idf/components/riscv /home/michal/esp/esp-idf/components/soc /home/michal/esp/esp-idf/components/spi_flash
  51. -- Configuring done
  52. -- Generating done
  53. -- Build files have been written to: /home/michal/project-name/build/bootloader
  54. [302/904] Performing build step for 'bootloader'
  55. [1/106] Generating project_elf_src_esp32c6.c
  56. [2/106] Building C object CMakeFiles/bootloader.elf.dir/project_elf_src_esp32c6.c.obj
  57. [3/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/interrupts.c.obj
  58. [4/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/dport_access_common.c.obj
  59. [5/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/gpio_periph.c.obj
  60. [6/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/lldesc.c.obj
  61. [7/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/uart_periph.c.obj
  62. [8/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/gdma_periph.c.obj
  63. [9/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/dedic_gpio_periph.c.obj
  64. [10/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/adc_periph.c.obj
  65. [11/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/ledc_periph.c.obj
  66. [12/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/rmt_periph.c.obj
  67. [13/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/sdm_periph.c.obj
  68. [14/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/pcnt_periph.c.obj
  69. [15/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/spi_periph.c.obj
  70. [16/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/i2s_periph.c.obj
  71. [17/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/temperature_sensor_periph.c.obj
  72. [18/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/timer_periph.c.obj
  73. [19/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/i2c_periph.c.obj
  74. [20/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/mcpwm_periph.c.obj
  75. [21/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/parlio_periph.c.obj
  76. [22/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/twai_periph.c.obj
  77. [23/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/ieee802154_periph.c.obj
  78. [24/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/rtc_io_periph.c.obj
  79. [25/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/sdio_slave_periph.c.obj
  80. [26/106] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/mpu_hal.c.obj
  81. [27/106] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/efuse_hal.c.obj
  82. [28/106] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/esp32c6/efuse_hal.c.obj
  83. [29/106] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/cache_hal.c.obj
  84. [30/106] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/esp32c6/lp_timer_hal.c.obj
  85. [31/106] Building C object esp-idf/micro-ecc/CMakeFiles/__idf_micro-ecc.dir/uECC_verify_antifault.c.obj
  86. [32/106] Building C object esp-idf/spi_flash/CMakeFiles/__idf_spi_flash.dir/spi_flash_wrap.c.obj
  87. [33/106] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/mmu_hal.c.obj
  88. [34/106] Building C object esp-idf/esp_app_format/CMakeFiles/__idf_esp_app_format.dir/esp_app_desc.c.obj
  89. [35/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock_init.c.obj
  90. [36/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random_esp32c6.c.obj
  91. [37/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_mem.c.obj
  92. [38/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common.c.obj
  93. [39/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random.c.obj
  94. [40/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common_loader.c.obj
  95. [41/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_efuse.c.obj
  96. [42/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/secure_boot.c.obj
  97. [43/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/bootloader_flash/src/bootloader_flash.c.obj
  98. [44/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/bootloader_flash/src/flash_qio_mode.c.obj
  99. [45/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock_loader.c.obj
  100. [46/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_encrypt.c.obj
  101. [47/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/bootloader_flash/src/bootloader_flash_config_esp32c6.c.obj
  102. [48/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_partitions.c.obj
  103. [49/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_utility.c.obj
  104. [50/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_console_loader.c.obj
  105. [51/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_init.c.obj
  106. [52/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp_image_format.c.obj
  107. [53/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_console.c.obj
  108. [54/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32c6/bootloader_soc.c.obj
  109. [55/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32c6/bootloader_sha.c.obj
  110. [56/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32c6/bootloader_ecdsa.c.obj
  111. [57/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32c6/bootloader_esp32c6.c.obj
  112. [58/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_panic.c.obj
  113. [59/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32c6/esp_efuse_table.c.obj
  114. [60/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_api.c.obj
  115. [61/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32c6/esp_efuse_fields.c.obj
  116. [62/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32c6/esp_efuse_rtc_calib.c.obj
  117. [63/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/efuse_controller/keys/with_key_purposes/esp_efuse_api_key.c.obj
  118. [64/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32c6/esp_efuse_utility.c.obj
  119. [65/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_fields.c.obj
  120. [66/106] Building C object esp-idf/esp_system/CMakeFiles/__idf_esp_system.dir/esp_err.c.obj
  121. [67/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/cpu_region_protect.c.obj
  122. [68/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/esp_memory_utils.c.obj
  123. [69/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/cpu.c.obj
  124. [70/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/rtc_clk_init.c.obj
  125. [71/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_utility.c.obj
  126. [72/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/pmu_param.c.obj
  127. [73/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/rtc_clk.c.obj
  128. [74/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/pmu_sleep.c.obj
  129. [75/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/chip_info.c.obj
  130. [76/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/rtc_time.c.obj
  131. [77/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/pmu_init.c.obj
  132. [78/106] Building C object esp-idf/esp_common/CMakeFiles/__idf_esp_common.dir/src/esp_err_to_name.c.obj
  133. [79/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_crc.c.obj
  134. [80/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_regi2c_esp32c6.c.obj
  135. [81/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_sys.c.obj
  136. [82/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_spiflash.c.obj
  137. [83/106] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log.c.obj
  138. [84/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_efuse.c.obj
  139. [85/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_uart.c.obj
  140. [86/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_systimer.c.obj
  141. [87/106] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_noos.c.obj
  142. [88/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_wdt.c.obj
  143. [89/106] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_buffers.c.obj
  144. [90/106] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/bootloader_start.c.obj
  145. [91/106] Linking C static library esp-idf/log/liblog.a
  146. [92/106] Linking C static library esp-idf/esp_rom/libesp_rom.a
  147. [93/106] Linking C static library esp-idf/esp_common/libesp_common.a
  148. [94/106] Linking C static library esp-idf/esp_hw_support/libesp_hw_support.a
  149. [95/106] Linking C static library esp-idf/esp_system/libesp_system.a
  150. [96/106] Linking C static library esp-idf/efuse/libefuse.a
  151. [97/106] Linking C static library esp-idf/bootloader_support/libbootloader_support.a
  152. [98/106] Linking C static library esp-idf/esp_app_format/libesp_app_format.a
  153. [99/106] Linking C static library esp-idf/spi_flash/libspi_flash.a
  154. [100/106] Linking C static library esp-idf/hal/libhal.a
  155. [101/106] Linking C static library esp-idf/micro-ecc/libmicro-ecc.a
  156. [102/106] Linking C static library esp-idf/soc/libsoc.a
  157. [103/106] Linking C static library esp-idf/main/libmain.a
  158. [104/106] Linking C executable bootloader.elf
  159. [105/106] Generating binary image from built executable
  160. esptool.py v4.6.2
  161. Creating esp32c6 image...
  162. Merged 2 ELF sections
  163. Successfully created esp32c6 image.
  164. Generated /home/michal/project-name/build/bootloader/bootloader.bin
  165. [106/106] cd /home/michal/project-name/build/bootloader/esp-idf/esptool_py && /home/michal/.espressif/python_env/idf5.1_py3.10_env/bin/python /home/michal/esp/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x0 /home/michal/project-name/build/bootloader/bootloader.bin
  166. Bootloader binary size 0x52f0 bytes. 0x2d10 bytes (35%) free.
  167. [903/904] Generating binary image from built executable
  168. esptool.py v4.6.2
  169. Creating esp32c6 image...
  170. Merged 1 ELF section
  171. Successfully created esp32c6 image.
  172. Generated /home/michal/project-name/build/project-name.bin
  173. [904/904] cd /home/michal/project-name/build/esp-idf/esptoo...-table.bin /home/michal/project-name/build/project-name.bin
  174. project-name.bin binary size 0x1e2e0 bytes. Smallest app partition is 0x100000 bytes. 0xe1d20 bytes (88%) free.

Code: Select all

[{
	"resource": "/home/michal/868idf/main/main.c",
	"owner": "C/C++: IntelliSense",
	"code": "1696",
	"severity": 8,
	"message": "#include errors detected. Consider updating your compile_commands.json or includePath. Squiggles are disabled for this translation unit (/home/michal/868idf/main/main.c).",
	"source": "C/C++",
	"startLineNumber": 1,
	"startColumn": 1,
	"endLineNumber": 1,
	"endColumn": 22
}]

[{
	"resource": "/home/michal/868idf/main/main.c",
	"owner": "C/C++: IntelliSense",
	"code": "1696",
	"severity": 8,
	"message": "cannot open source file \"RadioLib.h\"",
	"source": "C/C++",
	"startLineNumber": 1,
	"startColumn": 1,
	"endLineNumber": 1,
	"endColumn": 22
}]
Zigbee pir sensor problem
  1. #include "esp_log.h"
  2. #include "freertos/FreeRTOS.h"
  3. #include "freertos/task.h"
  4. #include "esp_netif.h"
  5. #include "esp_vfs_eventfd.h"
  6. #include "esp_wifi.h"
  7. #include "nvs_flash.h"
  8. #include "protocol_examples_common.h"
  9. #include "esp_coexist_internal.h"
  10. #include "esp_zigbee_gateway.h"
  11.  
  12. #if (!defined ZB_MACSPLIT_HOST && defined ZB_MACSPLIT_DEVICE)
  13. #error Only Zigbee gateway host device should be defined
  14. #endif
  15.  
  16. static const char *TAG = "ESP_ZB_GATEWAY";
  17.  
  18. /********************* Define functions **************************/
  19. static void bdb_start_top_level_commissioning_cb(uint8_t mode_mask)
  20. {
  21.     ESP_ERROR_CHECK(esp_zb_bdb_start_top_level_commissioning(mode_mask));
  22. }
  23.  
  24. void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct)
  25. {
  26.     uint32_t *p_sg_p       = signal_struct->p_app_signal;
  27.     esp_err_t err_status = signal_struct->esp_err_status;
  28.     esp_zb_app_signal_type_t sig_type = *p_sg_p;
  29.     esp_zb_zdo_signal_device_annce_params_t *dev_annce_params = NULL;
  30.     esp_zb_zdo_signal_macsplit_dev_boot_params_t *rcp_version = NULL;
  31.  
  32.     switch (sig_type) {
  33.     case ESP_ZB_ZDO_SIGNAL_SKIP_STARTUP:
  34.         ESP_LOGI(TAG, "Zigbee stack initialized");
  35.         esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_INITIALIZATION);
  36.         break;
  37.     case ESP_ZB_MACSPLIT_DEVICE_BOOT:
  38.         ESP_LOGI(TAG, "Zigbee rcp device booted");
  39.         rcp_version = (esp_zb_zdo_signal_macsplit_dev_boot_params_t*)esp_zb_app_signal_get_params(p_sg_p);
  40.         ESP_LOGI(TAG, "Running RCP Version:%s", rcp_version->version_str);
  41.         break;
  42.     case ESP_ZB_BDB_SIGNAL_DEVICE_FIRST_START:
  43.     case ESP_ZB_BDB_SIGNAL_DEVICE_REBOOT:
  44.         if (err_status == ESP_OK) {
  45.             ESP_LOGI(TAG, "Start network formation");
  46.             esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_FORMATION);
  47.         } else {
  48.             ESP_LOGE(TAG, "Failed to initialize Zigbee stack (status: %d)", err_status);
  49.         }
  50.         break;
  51.     case ESP_ZB_BDB_SIGNAL_FORMATION:
  52.         if (err_status == ESP_OK) {
  53.             esp_zb_ieee_addr_t ieee_address;
  54.             esp_zb_get_long_address(ieee_address);
  55.             ESP_LOGI(TAG, "Formed network successfully (ieee_address: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x, PAN ID: 0x%04hx, Channel:%d)",
  56.                      ieee_address[7], ieee_address[6], ieee_address[5], ieee_address[4],
  57.                      ieee_address[3], ieee_address[2], ieee_address[1], ieee_address[0],
  58.                      esp_zb_get_pan_id(), esp_zb_get_current_channel());
  59.             esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_STEERING);
  60.         } else {
  61.             ESP_LOGI(TAG, "Restart network formation (status: %d)", err_status);
  62.             esp_zb_scheduler_alarm((esp_zb_callback_t)bdb_start_top_level_commissioning_cb, ESP_ZB_BDB_MODE_NETWORK_FORMATION, 1000);
  63.         }
  64.         break;
  65.     case ESP_ZB_BDB_SIGNAL_STEERING:
  66.         if (err_status == ESP_OK) {
  67.             ESP_LOGI(TAG, "Network steering started");
  68.         }
  69.         break;
  70.     case ESP_ZB_ZDO_SIGNAL_DEVICE_ANNCE:
  71.         dev_annce_params = (esp_zb_zdo_signal_device_annce_params_t *)esp_zb_app_signal_get_params(p_sg_p);
  72.         ESP_LOGI(TAG, "New device commissioned or rejoined (short: 0x%04hx)", dev_annce_params->device_short_addr);
  73.         break;
  74.     default:
  75.         ESP_LOGI(TAG, "ZDO signal: %d, status: %d", sig_type, err_status);
  76.         break;
  77.     }
  78. }
  79.  
  80. static void esp_zb_task(void *pvParameters)
  81. {
  82.     /* initialize Zigbee stack with Zigbee coordinator config */
  83.     esp_zb_cfg_t zb_nwk_cfg = ESP_ZB_ZC_CONFIG();
  84.     esp_zb_init(&zb_nwk_cfg);
  85.     /* initiate Zigbee Stack start without zb_send_no_autostart_signal auto-start */
  86.     esp_zb_set_primary_network_channel_set(ESP_ZB_PRIMARY_CHANNEL_MASK);
  87.     ESP_ERROR_CHECK(esp_zb_start(false));
  88.     esp_zb_main_loop_iteration();
  89. }
  90.  
  91. void app_main(void)
  92. {
  93.     esp_zb_platform_config_t config = {
  94.         .radio_config = ESP_ZB_DEFAULT_RADIO_CONFIG(),
  95.         .host_config = ESP_ZB_DEFAULT_HOST_CONFIG(),
  96.     };
  97.     /* load Zigbee gateway platform config to initialization */
  98.     ESP_ERROR_CHECK(esp_zb_platform_config(&config));
  99.     ESP_ERROR_CHECK(nvs_flash_init());
  100.     ESP_ERROR_CHECK(esp_netif_init());
  101.     ESP_ERROR_CHECK(esp_event_loop_create_default());
  102. #if CONFIG_EXAMPLE_CONNECT_WIFI
  103.     ESP_ERROR_CHECK(example_connect());
  104. #if CONFIG_ESP_COEX_SW_COEXIST_ENABLE
  105.     ESP_ERROR_CHECK(esp_wifi_set_ps(WIFI_PS_MIN_MODEM));
  106.     coex_enable();
  107.     coex_schm_status_bit_set(1, 1);
  108. #else
  109.     ESP_ERROR_CHECK(esp_wifi_set_ps(WIFI_PS_NONE));
  110. #endif
  111. #endif
  112.     xTaskCreate(esp_zb_task, "Zigbee_main", 4096, NULL, 5, NULL);
  113. }
  1.  *  Executing task: /home/michal/.espressif/python_env/idf5.1_py3.10_env/bin/python /home/michal/esp/esp-idf/tools/idf_size.py /home/michal/project-name/build/project-name.map
  2.  
  3. Total sizes:
  4. Used stat D/IRAM:   44876 bytes ( 407236 remain, 9.9% used)
  5.       .data size:    4188 bytes
  6.       .bss  size:    3720 bytes
  7.       .text size:   36968 bytes
  8. Used Flash size :   82358 bytes
  9.            .text:   53030 bytes
  10.          .rodata:   29072 bytes
  11. Total image size:  123514 bytes (.bin may be padded larger)
  1.  *  Executing task: ninja  
  2.  
  3. [5/904] Generating ../../partition_table/partition-table.bin
  4. Partition table binary generated. Contents:
  5. *******************************************************************************
  6. # ESP-IDF Partition Table
  7. # Name, Type, SubType, Offset, Size, Flags
  8. nvs,data,nvs,0x9000,24K,
  9. phy_init,data,phy,0xf000,4K,
  10. factory,app,factory,0x10000,1M,
  11. *******************************************************************************
  12. [203/904] Performing configure step for 'bootloader'
  13. -- Found Git: /usr/bin/git (found version "2.40.1")
  14. -- The C compiler identification is GNU 12.2.0
  15. -- The CXX compiler identification is GNU 12.2.0
  16. -- The ASM compiler identification is GNU
  17. -- Found assembler: /home/michal/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/riscv32-esp-elf-gcc
  18. -- Detecting C compiler ABI info
  19. -- Detecting C compiler ABI info - done
  20. -- Check for working C compiler: /home/michal/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/riscv32-esp-elf-gcc - skipped
  21. -- Detecting C compile features
  22. -- Detecting C compile features - done
  23. -- Detecting CXX compiler ABI info
  24. -- Detecting CXX compiler ABI info - done
  25. -- Check for working CXX compiler: /home/michal/.espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/riscv32-esp-elf-g++ - skipped
  26. -- Detecting CXX compile features
  27. -- Detecting CXX compile features - done
  28. -- Building ESP-IDF components for target esp32c6
  29. -- Project sdkconfig file /home/michal/project-name/sdkconfig
  30. -- Looking for sys/types.h
  31. -- Looking for sys/types.h - found
  32. -- Looking for stdint.h
  33. -- Looking for stdint.h - found
  34. -- Looking for stddef.h
  35. -- Looking for stddef.h - found
  36. -- Check size of time_t
  37. -- Check size of time_t - done
  38. -- Adding linker script /home/michal/esp/esp-idf/components/soc/esp32c6/ld/esp32c6.peripherals.ld
  39. -- App "bootloader" version: v5.1-dirty
  40. -- Adding linker script /home/michal/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.ld
  41. -- Adding linker script /home/michal/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.api.ld
  42. -- Adding linker script /home/michal/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.rvfp.ld
  43. -- Adding linker script /home/michal/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.newlib.ld
  44. -- Adding linker script /home/michal/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.phy.ld
  45. -- Adding linker script /home/michal/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.wdt.ld
  46. -- Adding linker script /home/michal/esp/esp-idf/components/esp_rom/esp32c6/ld/esp32c6.rom.version.ld
  47. -- Adding linker script /home/michal/esp/esp-idf/components/bootloader/subproject/main/ld/esp32c6/bootloader.ld
  48. -- Adding linker script /home/michal/esp/esp-idf/components/bootloader/subproject/main/ld/esp32c6/bootloader.rom.ld
  49. -- Components: bootloader bootloader_support efuse esp_app_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table riscv soc spi_flash
  50. -- Component paths: /home/michal/esp/esp-idf/components/bootloader /home/michal/esp/esp-idf/components/bootloader_support /home/michal/esp/esp-idf/components/efuse /home/michal/esp/esp-idf/components/esp_app_format /home/michal/esp/esp-idf/components/esp_common /home/michal/esp/esp-idf/components/esp_hw_support /home/michal/esp/esp-idf/components/esp_rom /home/michal/esp/esp-idf/components/esp_system /home/michal/esp/esp-idf/components/esptool_py /home/michal/esp/esp-idf/components/freertos /home/michal/esp/esp-idf/components/hal /home/michal/esp/esp-idf/components/log /home/michal/esp/esp-idf/components/bootloader/subproject/main /home/michal/esp/esp-idf/components/bootloader/subproject/components/micro-ecc /home/michal/esp/esp-idf/components/newlib /home/michal/esp/esp-idf/components/partition_table /home/michal/esp/esp-idf/components/riscv /home/michal/esp/esp-idf/components/soc /home/michal/esp/esp-idf/components/spi_flash
  51. -- Configuring done
  52. -- Generating done
  53. -- Build files have been written to: /home/michal/project-name/build/bootloader
  54. [277/904] Performing build step for 'bootloader'
  55. [1/106] Generating project_elf_src_esp32c6.c
  56. [2/106] Building C object CMakeFiles/bootloader.elf.dir/project_elf_src_esp32c6.c.obj
  57. [3/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/dport_access_common.c.obj
  58. [4/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/interrupts.c.obj
  59. [5/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/lldesc.c.obj
  60. [6/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/gpio_periph.c.obj
  61. [7/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/adc_periph.c.obj
  62. [8/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/uart_periph.c.obj
  63. [9/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/gdma_periph.c.obj
  64. [10/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/dedic_gpio_periph.c.obj
  65. [11/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/ledc_periph.c.obj
  66. [12/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/spi_periph.c.obj
  67. [13/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/pcnt_periph.c.obj
  68. [14/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/rmt_periph.c.obj
  69. [15/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/sdm_periph.c.obj
  70. [16/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/i2s_periph.c.obj
  71. [17/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/i2c_periph.c.obj
  72. [18/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/timer_periph.c.obj
  73. [19/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/mcpwm_periph.c.obj
  74. [20/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/temperature_sensor_periph.c.obj
  75. [21/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/twai_periph.c.obj
  76. [22/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/ieee802154_periph.c.obj
  77. [23/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/parlio_periph.c.obj
  78. [24/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/rtc_io_periph.c.obj
  79. [25/106] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/esp32c6/sdio_slave_periph.c.obj
  80. [26/106] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/mpu_hal.c.obj
  81. [27/106] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/efuse_hal.c.obj
  82. [28/106] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/esp32c6/efuse_hal.c.obj
  83. [29/106] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/mmu_hal.c.obj
  84. [30/106] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/esp32c6/lp_timer_hal.c.obj
  85. [31/106] Building C object esp-idf/hal/CMakeFiles/__idf_hal.dir/cache_hal.c.obj
  86. [32/106] Building C object esp-idf/spi_flash/CMakeFiles/__idf_spi_flash.dir/spi_flash_wrap.c.obj
  87. [33/106] Building C object esp-idf/esp_app_format/CMakeFiles/__idf_esp_app_format.dir/esp_app_desc.c.obj
  88. [34/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common_loader.c.obj
  89. [35/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock_init.c.obj
  90. [36/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random_esp32c6.c.obj
  91. [37/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common.c.obj
  92. [38/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random.c.obj
  93. [39/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_mem.c.obj
  94. [40/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_efuse.c.obj
  95. [41/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/bootloader_flash/src/bootloader_flash.c.obj
  96. [42/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_encrypt.c.obj
  97. [43/106] Building C object esp-idf/micro-ecc/CMakeFiles/__idf_micro-ecc.dir/uECC_verify_antifault.c.obj
  98. [44/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/secure_boot.c.obj
  99. [45/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock_loader.c.obj
  100. [46/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/bootloader_flash/src/flash_qio_mode.c.obj
  101. [47/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/bootloader_flash/src/bootloader_flash_config_esp32c6.c.obj
  102. [48/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_partitions.c.obj
  103. [49/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_init.c.obj
  104. [50/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_console_loader.c.obj
  105. [51/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_utility.c.obj
  106. [52/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32c6/bootloader_sha.c.obj
  107. [53/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_console.c.obj
  108. [54/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32c6/bootloader_soc.c.obj
  109. [55/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32c6/bootloader_ecdsa.c.obj
  110. [56/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp_image_format.c.obj
  111. [57/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_panic.c.obj
  112. [58/106] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32c6/bootloader_esp32c6.c.obj
  113. [59/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32c6/esp_efuse_table.c.obj
  114. [60/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32c6/esp_efuse_fields.c.obj
  115. [61/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32c6/esp_efuse_rtc_calib.c.obj
  116. [62/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32c6/esp_efuse_utility.c.obj
  117. [63/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_api.c.obj
  118. [64/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_fields.c.obj
  119. [65/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/efuse_controller/keys/with_key_purposes/esp_efuse_api_key.c.obj
  120. [66/106] Building C object esp-idf/esp_system/CMakeFiles/__idf_esp_system.dir/esp_err.c.obj
  121. [67/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/cpu_region_protect.c.obj
  122. [68/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/cpu.c.obj
  123. [69/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/esp_memory_utils.c.obj
  124. [70/106] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_utility.c.obj
  125. [71/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/rtc_clk_init.c.obj
  126. [72/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/pmu_param.c.obj
  127. [73/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/rtc_clk.c.obj
  128. [74/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/pmu_init.c.obj
  129. [75/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/chip_info.c.obj
  130. [76/106] Building C object esp-idf/esp_common/CMakeFiles/__idf_esp_common.dir/src/esp_err_to_name.c.obj
  131. [77/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/rtc_time.c.obj
  132. [78/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_regi2c_esp32c6.c.obj
  133. [79/106] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log.c.obj
  134. [80/106] Building C object esp-idf/esp_hw_support/CMakeFiles/__idf_esp_hw_support.dir/port/esp32c6/pmu_sleep.c.obj
  135. [81/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_crc.c.obj
  136. [82/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_sys.c.obj
  137. [83/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_efuse.c.obj
  138. [84/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_spiflash.c.obj
  139. [85/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_systimer.c.obj
  140. [86/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_uart.c.obj
  141. [87/106] Building C object esp-idf/esp_rom/CMakeFiles/__idf_esp_rom.dir/patches/esp_rom_wdt.c.obj
  142. [88/106] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_buffers.c.obj
  143. [89/106] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_noos.c.obj
  144. [90/106] Linking C static library esp-idf/log/liblog.a
  145. [91/106] Linking C static library esp-idf/esp_rom/libesp_rom.a
  146. [92/106] Linking C static library esp-idf/esp_common/libesp_common.a
  147. [93/106] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/bootloader_start.c.obj
  148. [94/106] Linking C static library esp-idf/esp_hw_support/libesp_hw_support.a
  149. [95/106] Linking C static library esp-idf/esp_system/libesp_system.a
  150. [96/106] Linking C static library esp-idf/efuse/libefuse.a
  151. [97/106] Linking C static library esp-idf/bootloader_support/libbootloader_support.a
  152. [98/106] Linking C static library esp-idf/esp_app_format/libesp_app_format.a
  153. [99/106] Linking C static library esp-idf/spi_flash/libspi_flash.a
  154. [100/106] Linking C static library esp-idf/hal/libhal.a
  155. [101/106] Linking C static library esp-idf/micro-ecc/libmicro-ecc.a
  156. [102/106] Linking C static library esp-idf/soc/libsoc.a
  157. [103/106] Linking C static library esp-idf/main/libmain.a
  158. [104/106] Linking C executable bootloader.elf
  159. [105/106] Generating binary image from built executable
  160. esptool.py v4.6.2
  161. Creating esp32c6 image...
  162. Merged 2 ELF sections
  163. Successfully created esp32c6 image.
  164. Generated /home/michal/project-name/build/bootloader/bootloader.bin
  165. [106/106] cd /home/michal/project-name/build/bootloader/esp-idf/esptool_py && /home/michal/.espressif/python_env/idf5.1_py3.10_env/bin/python /home/michal/esp/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x0 /home/michal/project-name/build/bootloader/bootloader.bin
  166. Bootloader binary size 0x52f0 bytes. 0x2d10 bytes (35%) free.
  167. [903/904] Generating binary image from built executable
  168. esptool.py v4.6.2
  169. Creating esp32c6 image...
  170. Merged 1 ELF section
  171. Successfully created esp32c6 image.
  172. Generated /home/michal/project-name/build/project-name.bin
  173. [904/904] cd /home/michal/project-name/build/esp-id...in /home/michal/project-name/build/project-name.bin
  174. project-name.bin binary size 0x1e2e0 bytes. Smallest app partition is 0x100000 bytes. 0xe1d20 bytes (88%) free.

Code: Select all

[{
	"resource": "/home/michal/project-nam/main/esp_zigbee_gateway.c",
	"owner": "C/C++: IntelliSense",
	"code": "1696",
	"severity": 8,
	"message": "cannot open source file \"protocol_examples_common.h\"",
	"source": "C/C++",
	"startLineNumber": 45,
	"startColumn": 1,
	"endLineNumber": 45,
	"endColumn": 38
}]

[{
	"resource": "/home/michal/project-nam/main/esp_zigbee_gateway.c",
	"owner": "C/C++: IntelliSense",
	"code": "1696",
	"severity": 8,
	"message": "#include errors detected. Consider updating your compile_commands.json or includePath. Squiggles are disabled for this translation unit (/home/michal/project-nam/main/esp_zigbee_gateway.c).",
	"source": "C/C++",
	"startLineNumber": 47,
	"startColumn": 1,
	"endLineNumber": 47,
	"endColumn": 32
}]

[{
	"resource": "/home/michal/project-nam/main/esp_zigbee_gateway.c",
	"owner": "C/C++: IntelliSense",
	"code": "1696",
	"severity": 8,
	"message": "cannot open source file \"esp_zigbee_core.h\" (dependency of \"esp_zigbee_gateway.h\")",
	"source": "C/C++",
	"startLineNumber": 47,
	"startColumn": 1,
	"endLineNumber": 47,
	"endColumn": 32
}]

Who is online

Users browsing this forum: Baidu [Spider] and 56 guests