Modbus RTU - Multi Devices

This commit is contained in:
2026-04-14 15:19:00 -05:00
commit fe8acfbc2c
1482 changed files with 182833 additions and 0 deletions

View File

@@ -0,0 +1 @@
Command: ninja flash

View File

@@ -0,0 +1 @@
Command: ninja all

View File

@@ -0,0 +1 @@
Command: ninja all

View File

@@ -0,0 +1,8 @@
Command: C:\Espressif\tools\python\v6.0\venv\Scripts\python.exe C:\esp\v6.0\esp-idf\tools/idf_monitor.py -p COM6 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 --revision 0 C:\Users\e.adame\Documents\ESP32_Modbus_RTU_to_PICS_MULTI\build\modbus_tcp_esp32.elf C:\Users\e.adame\Documents\ESP32_Modbus_RTU_to_PICS_MULTI\build\bootloader\bootloader.elf --force-color -m 'C:\Espressif\tools\python\v6.0\venv\Scripts\python.exe' 'C:\esp\v6.0\esp-idf\tools\idf.py' '-p' 'COM6'
--- Warning: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM6 instead...
--- esp-idf-monitor 1.9.0 on \\.\COM6 115200
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
--- 0x40080400: _invalid_pc_placeholder at C:/esp/v6.0/esp-idf/components/xtensa/xtensa_vectors.S:2235
--- 0x40080644: call_start_cpu0 at C:/esp/v6.0/esp-idf/components/bootloader/subproject/main/bootloader_start.c:27


View File

@@ -0,0 +1,9 @@
Command: cmake -G Ninja -B C:\Users\e.adame\Documents\ESP32_Modbus_RTU_to_PICS_MULTI\build -DPYTHON_DEPS_CHECKED=1 -DPYTHON=C:\Espressif\tools\python\v6.0\venv\Scripts\python.exe -DESP_PLATFORM=1 -DCCACHE_ENABLE=False C:\Users\e.adame\Documents\ESP32_Modbus_RTU_to_PICS_MULTI
Configuration Report
+---------------------------------+
| Parser Version: 1 |
| Verbosity: default |
| Defaults policy: sdkconfig |
| Status: Finished successfully |
| |
+---------------------------------+

View File

@@ -0,0 +1,67 @@
Command: ninja flash
[1/6] C:\Windows\system32\cmd.exe /C "cd /D C:\Users\e.adame\Documents\ESP32_Modbus_RTU_to_PICS_MULTI\build\esp-idf\main && C:\Espressif\tools\python\v6.0\venv\Scripts\python.exe C:/esp/v6.0/esp-idf/components/spiffs/spiffsgen.py 0xf0000 C:/Users/e.adame/Documents/ESP32_Modbus_RTU_to_PICS_MULTI/spiffs C:/Users/e.adame/Documents/ESP32_Modbus_RTU_to_PICS_MULTI/build/spiffs.bin --page-size=256 --obj-name-len=32 --meta-len=4 --use-magic --use-magic-len"
[2/6] C:\Windows\system32\cmd.exe /C "cd /D C:\Users\e.adame\Documents\ESP32_Modbus_RTU_to_PICS_MULTI\build && C:\Espressif\tools\python\v6.0\venv\Scripts\python.exe C:/esp/v6.0/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/Users/e.adame/Documents/ESP32_Modbus_RTU_to_PICS_MULTI/build/partition_table/partition-table.bin C:/Users/e.adame/Documents/ESP32_Modbus_RTU_to_PICS_MULTI/build/modbus_tcp_esp32.bin"
modbus_tcp_esp32.bin binary size 0x37830 bytes. Smallest app partition is 0x100000 bytes. 0xc87d0 bytes (78%) free.
[3/6] Performing build step for 'bootloader'
[1/1] C:\Windows\system32\cmd.exe /C "cd /D C:\Users\e.adame\Documents\ESP32_Modbus_RTU_to_PICS_MULTI\build\bootloader && C:\Espressif\tools\python\v6.0\venv\Scripts\python.exe C:/esp/v6.0/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Users/e.adame/Documents/ESP32_Modbus_RTU_to_PICS_MULTI/build/bootloader/bootloader.bin"
Bootloader binary size 0x6610 bytes. 0x9f0 bytes (9%) free.
[4/6] No install step for 'bootloader'
[5/6] Completed 'bootloader'
[5/6] Running utility command for flash
esptool --chip esp32 -p COM6 -b 460800 --before=default-reset --after=hard-reset write-flash --flash-mode dio --flash-freq 40m --flash-size 2MB 0x1000 bootloader/bootloader.bin 0x8000 partition_table/partition-table.bin 0x110000 spiffs.bin 0x10000 modbus_tcp_esp32.bin
esptool v5.2.0
Serial port COM6:
Connecting....
Connected to ESP32 on COM6:
Chip type: ESP32-D0WD-V3 (revision v3.1)
Features: Wi-Fi, BT, Dual Core + LP Core, 240MHz, Vref calibration in eFuse, Coding Scheme None
Crystal frequency: 40MHz
MAC: cc:7b:5c:bb:cf:7c
Uploading stub flasher...
Running stub flasher...
Stub flasher running.
Changing baud rate to 460800...
Changed.
Configuring flash size...
SHA digest in image updated.
Flash will be erased from 0x00001000 to 0x00007fff...
Compressed 26128 bytes to 16571...
Writing at 0x00001000 [ ] 0.0% 0/16571 bytes...
Writing at 0x0000751c [============================> ] 98.9% 16384/16571 bytes...
Writing at 0x00007610 [==============================] 100.0% 16571/16571 bytes...
Wrote 26128 bytes (16571 compressed) at 0x00001000 in 0.9 seconds (234.6 kbit/s).
Verifying written data...
Hash of data verified.
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 3072 bytes to 118...
Writing at 0x00008000 [ ] 0.0% 0/118 bytes...
Writing at 0x00008c00 [==============================] 100.0% 118/118 bytes...
Wrote 3072 bytes (118 compressed) at 0x00008000 in 0.1 seconds (317.3 kbit/s).
Verifying written data...
Hash of data verified.
Flash will be erased from 0x00110000 to 0x001fffff...
Compressed 983040 bytes to 2709...
Writing at 0x00110000 [ ] 0.0% 0/2709 bytes...
Writing at 0x00200000 [==============================] 100.0% 2709/2709 bytes...
Wrote 983040 bytes (2709 compressed) at 0x00110000 in 5.9 seconds (1343.5 kbit/s).
Verifying written data...
Hash of data verified.
Flash will be erased from 0x00010000 to 0x00047fff...
Compressed 227376 bytes to 132896...
Writing at 0x00010000 [ ] 0.0% 0/132896 bytes...
Writing at 0x0001bccc [==> ] 12.3% 16384/132896 bytes...

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
Command: ninja all
[1/5] C:\Windows\system32\cmd.exe /C "cd /D C:\Users\e.adame\Documents\ESP32_Modbus_RTU_to_PICS_MULTI\build && C:\Espressif\tools\python\v6.0\venv\Scripts\python.exe C:/esp/v6.0/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/Users/e.adame/Documents/ESP32_Modbus_RTU_to_PICS_MULTI/build/partition_table/partition-table.bin C:/Users/e.adame/Documents/ESP32_Modbus_RTU_to_PICS_MULTI/build/modbus_tcp_esp32.bin"
modbus_tcp_esp32.bin binary size 0x37830 bytes. Smallest app partition is 0x100000 bytes. 0xc87d0 bytes (78%) free.
[2/5] C:\Windows\system32\cmd.exe /C "cd /D C:\Users\e.adame\Documents\ESP32_Modbus_RTU_to_PICS_MULTI\build\esp-idf\main && C:\Espressif\tools\python\v6.0\venv\Scripts\python.exe C:/esp/v6.0/esp-idf/components/spiffs/spiffsgen.py 0xf0000 C:/Users/e.adame/Documents/ESP32_Modbus_RTU_to_PICS_MULTI/spiffs C:/Users/e.adame/Documents/ESP32_Modbus_RTU_to_PICS_MULTI/build/spiffs.bin --page-size=256 --obj-name-len=32 --meta-len=4 --use-magic --use-magic-len"
[3/5] Performing build step for 'bootloader'
[1/1] C:\Windows\system32\cmd.exe /C "cd /D C:\Users\e.adame\Documents\ESP32_Modbus_RTU_to_PICS_MULTI\build\bootloader && C:\Espressif\tools\python\v6.0\venv\Scripts\python.exe C:/esp/v6.0/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Users/e.adame/Documents/ESP32_Modbus_RTU_to_PICS_MULTI/build/bootloader/bootloader.bin"
Bootloader binary size 0x6610 bytes. 0x9f0 bytes (9%) free.

View File

@@ -0,0 +1,138 @@
Command: C:\Espressif\tools\python\v6.0\venv\Scripts\python.exe C:\esp\v6.0\esp-idf\tools/idf_monitor.py -p COM6 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 --revision 0 C:\Users\e.adame\Documents\ESP32_Modbus_RTU_to_PICS_MULTI\build\modbus_tcp_esp32.elf C:\Users\e.adame\Documents\ESP32_Modbus_RTU_to_PICS_MULTI\build\bootloader\bootloader.elf --force-color -m 'C:\Espressif\tools\python\v6.0\venv\Scripts\python.exe' 'C:\esp\v6.0\esp-idf\tools\idf.py' '-p' 'COM6'
I<EFBFBD>ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0040,len:6272
load:0x40078000,len:15848
load:0x40080400,len:3920
entry 0x40080644
I (27) boot: ESP-IDF v6.0 2nd stage bootloader
I (27) boot: compile time Apr 8 2026 15:08:00
I (28) boot: Multicore bootloader
I (29) boot: chip revision: v3.1
I (31) boot.esp32: SPI Speed : 40MHz
I (35) boot.esp32: SPI Mode : DIO
I (39) boot.esp32: SPI Flash Size : 2MB
I (42) boot: Enabling RNG early entropy source...
I (47) boot: Partition Table:
I (49) boot: ## Label Usage Type ST Offset Length
I (56) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (62) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (69) boot: 2 factory factory app 00 00 00010000 00100000
I (75) boot: 3 spiffs Unknown data 01 82 00110000 000f0000
I (82) boot: End of partition table
I (85) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=0c030h ( 49200) map
I (110) esp_image: segment 1: paddr=0001c058 vaddr=3ffb0000 size=02b0ch ( 11020) load
I (115) esp_image: segment 2: paddr=0001eb6c vaddr=40080000 size=014ach ( 5292) load
I (117) esp_image: segment 3: paddr=00020020 vaddr=400d0020 size=1cb7ch (117628) map
I (163) esp_image: segment 4: paddr=0003cba4 vaddr=400814ac size=0ac38h ( 44088) load
I (182) esp_image: segment 5: paddr=000477e4 vaddr=50000000 size=00028h ( 40) load
I (188) boot: Loaded app from partition at offset 0x10000
I (188) boot: Disabling RNG early entropy source...
I (200) cpu_start: Multicore app
I (208) cpu_start: GPIO 3 and 1 are used as console UART I/O pins
I (208) cpu_start: Pro cpu start user code
I (208) cpu_start: cpu freq: 160000000 Hz
I (210) app_init: Application information:
I (214) app_init: Project name: modbus_tcp_esp32
I (219) app_init: App version: 1
I (222) app_init: Compile time: Apr 8 2026 15:07:39
I (227) app_init: ELF file SHA256: 41e80fc3a...
I (231) app_init: ESP-IDF: v6.0
I (235) efuse_init: Min chip rev: v0.0
I (239) efuse_init: Max chip rev: v3.99 
I (243) efuse_init: Chip rev: v3.1
I (247) heap_init: Initializing. RAM available for dynamic allocation:
I (253) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (258) heap_init: At 3FFB3700 len 0002C900 (178 KiB): DRAM
I (263) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (269) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (274) heap_init: At 4008C0E4 len 00013F1C (79 KiB): IRAM
I (281) spi_flash: detected chip: generic
I (283) spi_flash: flash io: dio
W (286) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (299) main_task: Started on CPU0
I (309) main_task: Calling app_main()
I (309) MODBUS_MAIN: Starting Modbus RTU device
I (409) MODBUS_MAIN: SPIFFS mounted: total=896321 used=4267
I (409) MODBUS_MAIN: ----- SPIFFS file list -----
I (409) MODBUS_MAIN: SPIFFS file: device_1.csv
I (409) MODBUS_MAIN: SPIFFS file: device_2.csv
I (419) MODBUS_MAIN: SPIFFS file: device_3.csv
I (419) MODBUS_MAIN: SPIFFS file: device_config.ini
I (469) MODBUS_MAIN: ----------------------------
I (469) MODBUS_MAIN: RTU config: uart=1 baud=9600 parity=0 stop_bits=1 tx=16 rx=17 de=4
I (469) MODBUS_MAIN: Configured device_count = 3
I (469) MODBUS_MAIN: CFG device[0]: enabled=1 unit_id=1 name=Device_1 csv=/spiffs/device_1.csv
I (479) MODBUS_MAIN: CFG device[1]: enabled=1 unit_id=2 name=Device_2 csv=/spiffs/device_2.csv
I (489) MODBUS_MAIN: CFG device[2]: enabled=1 unit_id=3 name=Device_3 csv=/spiffs/device_3.csv
I (499) uart: ALREADY NULL
I (499) MODBUS_MAIN: UART normal mode enabled (manual DE control)
I (499) MODBUS_MAIN: RTU UART configured: uart=1 baud=9600 parity=0 stop_bits=1 tx=16 rx=17 de=4
I (509) MODBUS_MAIN: Manual DE initialized on GPIO4, idle level=0
I (519) MODBUS_MAIN: UART driver installed: uart=1 tx=16 rx=17 de=4 baud=9600
I (519) MODBUS_MAIN: Preparing device[0]: unit_id=1 name=Device_1 csv=/spiffs/device_1.csv
I (579) MODBUS_RTU: Registered RTU device unit_id=1 name=Device_1
I (579) MODBUS_MAIN: Device 1 (Device_1) loaded 15 Modbus points from /spiffs/device_1.csv
I (579) MODBUS_MAIN: Preparing device[1]: unit_id=2 name=Device_2 csv=/spiffs/device_2.csv
I (599) MODBUS_RTU: Registered RTU device unit_id=2 name=Device_2
I (599) MODBUS_MAIN: Device 2 (Device_2) loaded 15 Modbus points from /spiffs/device_2.csv
I (599) MODBUS_MAIN: Preparing device[2]: unit_id=3 name=Device_3 csv=/spiffs/device_3.csv
I (609) MODBUS_RTU: Registered RTU device unit_id=3 name=Device_3
I (619) MODBUS_MAIN: Device 3 (Device_3) loaded 0 Modbus points from /spiffs/device_3.csv
I (629) MODBUS_MAIN: ----- Runtime Modbus Device Table -----
I (629) MODBUS_MAIN: RUNTIME device[0]: unit_id=1 name=Device_1 csv=/spiffs/device_1.csv points=15
I (639) MODBUS_MAIN: RUNTIME device[1]: unit_id=2 name=Device_2 csv=/spiffs/device_2.csv points=15
I (649) MODBUS_MAIN: RUNTIME device[2]: unit_id=3 name=Device_3 csv=/spiffs/device_3.csv points=0
I (659) MODBUS_MAIN: ---------------------------------------
I (659) MODBUS_MAIN: ----- Modbus Point Capacity -----
I (669) MODBUS_MAIN: Device 1 (Device_1): used=15 / max=384, remaining=369 (3.9% used)
I (669) MODBUS_MAIN: Device 2 (Device_2): used=15 / max=384, remaining=369 (3.9% used)
I (679) MODBUS_MAIN: Device 3 (Device_3): used=0 / max=384, remaining=384 (0.0% used)
I (689) MODBUS_MAIN: Configured capacity: used=30 / max=1152, remaining=1122
I (699) MODBUS_MAIN: Free heap: 110044 bytes, largest block: 51200 bytes, point size: 160 bytes
I (699) MODBUS_MAIN: Heap-equivalent points available (informational only): 687
I (709) MODBUS_MAIN: ---------------------------------
I (719) MODBUS_MAIN: ----- Point Cost Guide -----
I (719) MODBUS_MAIN: Internal point usage (counts against MODBUS_MAX_POINTS):
I (729) MODBUS_MAIN: data_type=bool -> 1 point
I (729) MODBUS_MAIN: data_type=uint16 -> 1 point
I (739) MODBUS_MAIN: data_type=uint32 -> 2 points
I (739) MODBUS_MAIN: data_type=float -> 2 points
I (749) MODBUS_MAIN: data_type=double -> 4 points
I (749) MODBUS_MAIN: PICS staging usage (for pics_address spacing only):
I (759) MODBUS_MAIN: pics_data_type=Boolean -> 1 register
I (759) MODBUS_MAIN: pics_data_type=Integer -> 2 registers
I (769) MODBUS_MAIN: pics_data_type=Float -> 4 registers
I (769) MODBUS_MAIN: pics_data_type=None -> 0 registers
I (779) MODBUS_MAIN: Planning examples:
I (779) MODBUS_MAIN: 100 uint16 CSV rows -> about 100 internal points
I (789) MODBUS_MAIN: 100 float CSV rows -> about 200 internal points
I (789) MODBUS_MAIN: 100 double CSV rows -> about 400 internal points
I (799) MODBUS_MAIN: --------------------------------
I (809) MODBUS_MAIN: ----- Device Type Mix -----
I (809) MODBUS_MAIN: Device 1 (Device_1) type mix: base_rows=15 internal_points=15 pics_regs=10
I (819) MODBUS_MAIN: data_type counts: bool=6 uint16=9 uint32=0 float=0 double=0
I (829) MODBUS_MAIN: pics_data_type counts: none=10 Boolean=0 Integer=5 Float=0
I (829) MODBUS_MAIN: Device 2 (Device_2) type mix: base_rows=15 internal_points=15 pics_regs=10
I (839) MODBUS_MAIN: data_type counts: bool=6 uint16=9 uint32=0 float=0 double=0
I (849) MODBUS_MAIN: pics_data_type counts: none=10 Boolean=0 Integer=5 Float=0
I (859) MODBUS_MAIN: Device 3 (Device_3) type mix: base_rows=0 internal_points=0 pics_regs=0
I (859) MODBUS_MAIN: data_type counts: bool=0 uint16=0 uint32=0 float=0 double=0
I (869) MODBUS_MAIN: pics_data_type counts: none=0 Boolean=0 Integer=0 Float=0
I (879) MODBUS_MAIN: ---------------------------
I (879) MODBUS_MAIN: ----- Modbus Memory Usage -----
I (889) MODBUS_MAIN: Device 1 (Device_1): 15 / 384 points used (3.9%)
I (889) MODBUS_MAIN: Device 2 (Device_2): 15 / 384 points used (3.9%)
I (899) MODBUS_MAIN: Device 3 (Device_3): 0 / 384 points used (0.0%)
I (909) MODBUS_MAIN: TOTAL POINTS LOADED: 30
I (909) MODBUS_MAIN: --------------------------------
I (909) MODBUS_MAIN: Creating modbus_rtu_task
I (919) MODBUS_MAIN: modbus_rtu_task started
I (919) MODBUS_MAIN: modbus_rtu_task create rc=1
I (929) MODBUS_MAIN: Creating modbus_override_task
I (929) MODBUS_MAIN: modbus_override_task create rc=1
I (939) main_task: Returned from app_main()

File diff suppressed because one or more lines are too long