-
Notifications
You must be signed in to change notification settings - Fork 70
Description
Checklist
- Checked the issue tracker for similar issues to ensure this is not a duplicate
- Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
- Tested with the latest version to ensure the issue hasn't been fixed
How often does this bug occurs?
always
Expected behavior
The code should compile successfully when MB_FUNC_OTHER_REP_SLAVEID_ENABLED or MB_FUNC_OTHER_REP_SLAVEID_BUF are disabled.
In main brachen, the 8215e3d commit has compilation problems due to the following line:
https://github.com/espressif/esp-modbus/blame/eeeab170be289376b7a9915a82ef874c52d86acf/modbus/mb_controller/serial/mbc_serial_master.c#L264
Actual behavior (suspected bug)
When building the project with MB_FUNC_OTHER_REP_SLAVEID_ENABLED or MB_FUNC_OTHER_REP_SLAVEID_BUF undefined, compilation fails due to an unguarded call to mbm_rq_custom() in mbc_serial_master.c. The function is implicitly declared, leading to a compiler error.
This seems to be declared only for these macros in file main/modbus/mb_objects/functions/mbfuncother.c.
Error logs or terminal output
<project_root>/EasyHomeControl-ESP32/managed_components/espressif__esp-modbus/modbus/mb_controller/serial/mbc_serial_master.c: In function 'mbc_serial_master_send_request':
<project_root>/HomeControl/EasyHomeControl-ESP32/managed_components/espressif__esp-modbus/modbus/mb_controller/serial/mbc_serial_master.c:264:28: error: implicit declaration of function 'mbm_rq_custom' [-Wimplicit-function-declaration]
264 | mb_error = mbm_rq_custom(mbm_controller_iface->mb_base, mb_slave_addr, mb_command,
|Steps to reproduce the behavior
- Disable
CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT=ninsdkconfig. - Build the Modbus master example located at
examples/serial/mb_serial_master. - Crash in the logs.
Project release version
main
System architecture
Intel/AMD 64-bit (modern PC, older Mac)
Operating system
Linux
Operating system version
openSUSE Leap 15.6
Shell
ZSH
Additional context
No response