my system is Windows 2004 and I use msys32 as environment. The version of the idf is v4.0.2.
I compiled this program, and these two errors occured. I tried to redownload and set the environment, problem still exsist.
$ make flash monitor
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: esp-2020r3
Compiler version: 8.4.0
Python requirements from C:/msys32/home/hp/esp/esp-idf/requirements.txt are satisfied.
App "MK32" version: 0aea5e2-dirty
CC build/freemodbus/serial_slave/modbus_controller/mbc_serial_slave.o
C:/msys32/home/hp/esp/esp-idf/components/freemodbus/serial_slave/modbus_controller/mbc_serial_slave.c: In function 'mbc_serial_slave_start':
C:/msys32/home/hp/esp/esp-idf/components/freemodbus/serial_slave/modbus_controller/mbc_serial_slave.c:99:28: error: 'MB_SLAVE_ID_SHORT' undeclared (first use in this function); did you mean 'MB_SLAVE_ASSERT'?
status = eMBSetSlaveID(MB_SLAVE_ID_SHORT, TRUE, (UCHAR*)mb_slave_id, sizeof(mb_slave_id));
^~~~~~~~~~~~~~~~~
MB_SLAVE_ASSERT
C:/msys32/home/hp/esp/esp-idf/components/freemodbus/serial_slave/modbus_controller/mbc_serial_slave.c:99:28: note: each undeclared identifier is reported only once for each function it appears in
C:/msys32/home/hp/esp/esp-idf/components/freemodbus/serial_slave/modbus_controller/mbc_serial_slave.c:99:61: error: 'mb_slave_id' undeclared (first use in this function); did you mean 'mbc_slave_init'?
status = eMBSetSlaveID(MB_SLAVE_ID_SHORT, TRUE, (UCHAR*)mb_slave_id, sizeof(mb_slave_id));
^~~~~~~~~~~
mbc_slave_init
make[1]: *** [/home/hp/esp/esp-idf/make/component_wrapper.mk:292:serial_slave/modbus_controller/mbc_serial_slave.o] error 1
make: *** [C:/msys32/home/hp/esp/esp-idf/make/project.mk:590:component-freemodbus-build] error 2
I found "MB_SLAVE_ID_SHORT" identified in C:\msys32\home\hp\esp\esp-idf\components\freemodbus\common\include\esp_modbus_slave.c, but I don't how to include this file in the program or make it work.
my system is Windows 2004 and I use msys32 as environment. The version of the idf is v4.0.2.
I compiled this program, and these two errors occured. I tried to redownload and set the environment, problem still exsist.
I found "MB_SLAVE_ID_SHORT" identified in C:\msys32\home\hp\esp\esp-idf\components\freemodbus\common\include\esp_modbus_slave.c, but I don't how to include this file in the program or make it work.
Can you help me?