espressif / esp-modbus

ESP-Modbus - the officially suppported library for Modbus protocol (serial RS485 + TCP over WiFi or Ethernet).
Apache License 2.0
85 stars 46 forks source link

Kconfig FMB_TIMER_ISR_IN_IRAM removed but used (IDFGH-9807) #26

Closed kossnikita closed 1 year ago

kossnikita commented 1 year ago

After commit https://github.com/espressif/esp-idf/commit/ee104f8de2b98bb9961f201151ad72cc22385471 Kconfig option FMB_TIMER_ISR_IN_IRAM has been removed. But it still used in https://github.com/espressif/esp-modbus/blob/7d16826aef23729757ae21678c8bd20d385dd8ee/freemodbus/modbus/include/mbconfig.h#L174 This causes the component to not work when flash is used.

alisitsyn commented 1 year ago

Hi @kossnikita,

Thank you for this issue. I confirm that it was removed incompletely in that commit from kconfig but still used in the code and can cause issues if it is not enabled but CONFIG_FMB_TIMER_USE_ISR_DISPATCH_METHOD is enabled in esp-idf => 5.0. However, this issues were not observed during test because the sdkconfig.defaults and test configs still have this option as enabled.

The fix for this issue should be as below:

0001_fix_removed_option_CONFIG_FMB_TIMER_ISR_IN_IRAM.patch

alisitsyn commented 1 year ago

@kossnikita ,

The fix was merged in v1.0.11.

alisitsyn commented 1 year ago

The issue is closed. Feel free to reopen.