Commit Graph

78 Commits

Author SHA1 Message Date
BOT d5e932844e Add Github actions for JIRA 2022-04-05 18:02:09 +08:00
Alex Lisitsyn 3a377dfcac Merge branch 'feature/component_update' into 'master'
esp-modbus: initial component update

See merge request idf/esp-modbus!1
2022-04-05 15:33:17 +08:00
Alex Lisitsyn 304a0a446a esp-modbus: initial component update 2022-04-05 15:33:17 +08:00
Chen Yudong d1a0493a79 CI: rename some tests to avoid duplicated test names
* Original commit: espressif/esp-idf@4dc74c9c42
2022-03-21 13:18:30 +01:00
Alex Lisitsyn 9716064cbb modbus: fix tcp slave destroy issues
* Original commit: espressif/esp-idf@224901fed3
2022-03-21 13:18:30 +01:00
Darian Leung ea81bd7fef freertos: Remove legacy data types
This commit removes the usage of all legacy FreeRTOS data types that
are exposed via configENABLE_BACKWARD_COMPATIBILITY. Legacy types can
still be used by enabling CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY.


* Original commit: espressif/esp-idf@57fd78f5ba
2022-03-21 13:18:30 +01:00
Alex Lisitsyn a0e61427d1 freemodbus: allow address gaps in master data dictionary (support of UID field in MBAP)
* Original commit: espressif/esp-idf@e9cdb3e0d3
2022-03-21 13:18:30 +01:00
morris 355ff75304 unit_tests: replace legacy timer group with gptimer
* Original commit: espressif/esp-idf@705788a13f
2022-03-21 13:18:29 +01:00
morris d34246462a soc: don't expose unstable soc header files in public api
* Original commit: espressif/esp-idf@869bed1bb5
2022-03-21 13:18:29 +01:00
aleks a54f2c11d9 freemodbus: fix port contains lgpl licensed files
Initial version of freemodbus master port files have been added to ESP-IDF based on https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32.
The overall repository license, at the time of adding these files, has been BSD 3-clause. However at that time, several port files carried LGPL license headers. As the author of these files confirmed in https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32/issues/61#issuecomment-977828450, this wasn't intentional. ESP-IDF version of modbus master port has been rewritten to target FreeRTOS instead of RT-Thread, but the license headers remained from the original version. This commit corrects this, replacing the license of these files with BSD 3-clause.


* Original commit: espressif/esp-idf@b8c1d26f56
2022-03-21 13:18:29 +01:00
Roland Dobai 13fa7753de Build & config: Remove leftover files from the unsupported "make" build system
* Original commit: espressif/esp-idf@766aa57084
2022-03-21 13:18:29 +01:00
Alex Lisitsyn 6d2cb13171 modbus: update to support other targets
* Original commit: espressif/esp-idf@0586be45d2
2022-03-21 13:18:29 +01:00
Alex Lisitsyn aebff14d74 freemodbus: fix tcp master long frame buffer issue
* Original commit: espressif/esp-idf@0d393558d3
2022-03-21 13:18:29 +01:00
aleks 509c47fc76 freemodbus: fix timer port to use esp_timer instead of group timer
* Original commit: espressif/esp-idf@ee104f8de2
2022-03-21 13:18:24 +01:00
Alex Lisitsyn 0ddd723239 Bugfix/modbus fix copyright headers
* Original commit: espressif/esp-idf@bdf0298009
2022-03-21 13:15:54 +01:00
morris 23e78eb821 gptimer: clean up hal and ll for driver-ng
* Original commit: espressif/esp-idf@e2275b1f63
2022-03-21 13:15:54 +01:00
Alex Lisitsyn 4fc2d83143 freemodbus: fix TCP stack/examples reinitialization sequence
* Original commit: espressif/esp-idf@c965b48e77
2022-03-21 13:15:54 +01:00
aleks 71ee6f844a freemodbus: update the modbus documentation doc-1641
* Original commit: espressif/esp-idf@b9b2cab8f9
2022-03-21 13:15:54 +01:00
Alex Lisitsyn b0b5ab017c freemodbus: fix issues when modbus master and slave work simultaneously
fix slave destroy bug when master and slave init simultaneously
add additional timer group options for master
fix master and slave use the same timer group index (https://github.com/espressif/esp-idf/issues/4699)


* Original commit: espressif/esp-idf@9693ef4918
2022-03-21 13:15:54 +01:00
Alex Lisitsyn 2bb90f1bbd add compile time checks for MB_MASTER_TCP_ENABLED
Signed-off-by: AshUK <github.AshUK@outlook.com>


* Original commit: espressif/esp-idf@1aa7f27468
2022-03-21 13:15:54 +01:00
aleks 9facdd9148 freemodbus: fix invalid error handling for duplicate param_key
* Original commit: espressif/esp-idf@60ac95a6b2
2022-03-21 13:15:54 +01:00
aleks ee9f8620d7 freemodbus: potential loss of significant bits and auto merge issues
* Original commit: espressif/esp-idf@9457555173
2022-03-21 13:15:54 +01:00
aleks ddd3e3394b freemodbus: add affinity option for modbus stack tasks
Closes https://github.com/espressif/esp-idf/issues/6700


* Original commit: espressif/esp-idf@dfcc434910
2022-03-21 13:15:54 +01:00
Alex Lisitsyn c0163bb01e freemodbus: fix uart_wait_tx_done() reenable tx_done interrupt
fixes the issue with uart_wait_tx_done() when the task is suspended and transmission is done right before reenable tx_done interrupt


* Original commit: espressif/esp-idf@c801b3a182
2022-03-21 13:15:54 +01:00
aleks 5a27d03531 freemodbus: increase max priority of modbus tasks
allows to avoid issues with modbus processing when higher priority tasks are used in user application


* Original commit: espressif/esp-idf@59935e44c0
2022-03-21 13:15:54 +01:00
aleks 920cef48ae freemodbuss: fix event processing after merge
* Original commit: espressif/esp-idf@868e123336
2022-03-21 13:15:54 +01:00
aleks bf29cd008f freemodbus: fix mb zero based reg address in the iterator
Fixes https://github.com/espressif/esp-idf/issues/6571


* Original commit: espressif/esp-idf@0d3f19beea
2022-03-21 13:15:54 +01:00
yuanjm fd44763138 components: Use CONFIG_LWIP_IPV6 to strip IPv6 function in components
* Original commit: espressif/esp-idf@da58235a0e
2022-03-21 13:15:54 +01:00
aleks bc2657c71c freemodbus: fix mb controller parity propagation issues
Closes https://github.com/espressif/esp-idf/issues/6377


* Original commit: espressif/esp-idf@b554d4d34d
2022-03-21 13:15:54 +01:00
David Cermak d11e5c8683 modbus: Exit server task gracefully to correctly cleanup lwip internals
Current lwip implementation does not support deleting a task which is
actively waiting on `select()` or `poll()` API.
Therefore we have to make sure that `select()` exits to deallocate its internal
callback before deleting the task. This is achieved by a shutdown
semaphore which informs the client once the `select()` exitted.

fix slave


* Original commit: espressif/esp-idf@898cac0061
2022-03-21 13:15:54 +01:00
Marius Vikhammer a2144bab49 CI: enable example builds for C3
Enables building C3 examples in CI.

Fixes related warnings/errors and disables examples that cannot run.


* Original commit: espressif/esp-idf@04df1f3a42
2022-03-21 13:15:54 +01:00
Alex Lisitsyn eb45711d81 freemodbus: add support for list of area descriptors for each register area
add multi register area descriptors into concrete port (initial)
add create/destroy of area descriptors into concrete port
add  the list of descriptors in common slave interface structure and init/destroy in concrete slave port
move r/w callback functions into common slave
final update of common slave interface wrappers add override API option in concrete port
update slave examples to check new  feature


* Original commit: espressif/esp-idf@96b77a28b1
2022-03-21 13:15:54 +01:00
Fu Hanxi 84c8ac80ea style: format python files with isort and double-quote-string-fixer
* Original commit: espressif/esp-idf@0146f258d7
2022-03-21 13:15:54 +01:00
Marius Vikhammer 4e41405f2b esp32c3: Disable components that are not yet supported
* Original commit: espressif/esp-idf@0301c66bf0
2022-03-21 13:15:54 +01:00
Angus Gratton e0102243f5 Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)


* Original commit: espressif/esp-idf@66fb5a29bb
2022-03-21 13:15:54 +01:00
Alex Lisitsyn fb445432c4 Bugfix/fix RS485 ut fail
* Original commit: espressif/esp-idf@8737584789
2022-03-21 13:15:54 +01:00
Michael (XIAO Xufeng) c123f2895b Revert "ci: temporarily disable RS485 related tests"
This reverts commit 315aeecb73855526df9bb73061bba78630610b25

* Original commit: espressif/esp-idf@4941cf58d0
2022-03-21 13:15:54 +01:00
Marius Vikhammer 42e560e61b docs: add warning for doxygen version
Running with a newer doxygen version than what's
used in CI may raise warnings locally that are not
present when built by CI


* Original commit: espressif/esp-idf@9b552ce004
2022-03-21 13:15:54 +01:00
Alex Lisitsyn bf49bec977 examples: freemodbus add tcp support for common master/slave iface
Add TCP port files to provide Modbus TCP interface for communication
Add freemodbus add tcp support for common master/slave iface and tcp example based on socket API
The communication between master and slave checked for each example serial_master, serial_slave (use ModbusPoll TCP)
update tcp example according netif changes, fix ci issues
update TCP slave implementation
update example_test.py to to set IP through stdin
update API documentation
event bit instead of semahore to lock communication resource
update default options and master/slave port files

Closes https://github.com/espressif/esp-idf/issues/858
Closes IDF-452


* Original commit: espressif/esp-idf@d0b9829eef
2022-03-21 13:15:54 +01:00
Ivan Grokhotkov 837bbe01b4 ci: temporarily disable RS485 related tests
* Original commit: espressif/esp-idf@983220e216
2022-03-21 13:15:54 +01:00
aleks 3e45775f25 freemodbus: fix memcmp result truncated to 1 byte
Coverity ID: 291158


* Original commit: espressif/esp-idf@30e97e0920
2022-03-21 13:15:54 +01:00
Alex Lisitsyn 6fd4511a39 freemodbus: fix fragmented response frame causes next value fail
drop uart ll driver fix: soc: prevent speculative reads from FIFO at -O2 optimization
(new compiler fixes this issue)


* Original commit: espressif/esp-idf@b28b62b194
2022-03-21 13:15:54 +01:00
aleks 7ae0805d65 freemodbus: fix event processing failure after destroy
Closes https://github.com/espressif/esp-idf/issues/5275


* Original commit: espressif/esp-idf@3bbdfb75ad
2022-03-21 13:15:54 +01:00
Alex Lisitsyn 2ce5c0cb95 freemodbus: add extern c block into common header for cpp
* Original commit: espressif/esp-idf@b1fe4c4cc6
2022-03-21 13:15:54 +01:00
Alex Lisitsyn 7cb1e34dd6 freemodbus: fix long buffer failure
check master read write functions with array of registers)
fix master serial processing code and modbus controller to work with register array
modbus_master: add reading and writing of test value array (58 registers) to check failure is gone
remove parameter temporary buffer from modbus controller to allow more than 24 byte writes
driver: fix issue with TOUT feature
driver: fix uart_rx_timeout issue
driver: fix issue with rxfifo_tout_int_raw not triggered when received fifo_len = 120 byte and all bytes read out of fifo as result of rxfifo_full_int_raw
driver: add function uart_internal_set_always_rx_timeout() to always handle tout interrupt
examples: call uart_internal_set_always_rx_timeout() to handle tout interrupt correctly
examples: update examples to use tout feature
driver: reflect changes of uart_set_always_rx_timeout() function, change uart.c
driver: change conditions to trigger workaround for tout feature in uart.c
driver: change uart_set_always_rx_timeout()
freemodbus: fix tabs, remove commented code
driver: remove uart_ll_is_rx_idle()


* Original commit: espressif/esp-idf@3abdd2207d
2022-03-21 13:15:54 +01:00
Alex Lisitsyn 2a4a72101e driver: fix driver set rx timeout feature of uart
tout_thr - move calculation and masking into hal layer update driver and uart_ll (add uart_ll_set_rx_tout)
move tout calculation into uart_ll
move calculation of time out in bit time for esp32s2 into low level uart_ll.h file
move uart_hal_get_symb_len() into hal
update set_rx_timeout() to warn user about incorrect value
update HAL, LL 1
fix uart_xx_set_rx_tout() to convert symbol time into bit time
update param description
update tout calculation in LL
update uart_hal_get_max_rx_timeout_thrd() and uart_ll_get_max_rx_timeout_thrd()


* Original commit: espressif/esp-idf@16e6e63694
2022-03-21 13:15:54 +01:00
Angus Gratton fee5069a2c docs: Resolve doxygen & Sphinx warnings
* Original commit: espressif/esp-idf@11fac8637a
2022-03-21 13:15:54 +01:00
Felipe Neves 149d4cc74f freertos: moved all xtensa specific files into a separated folder
* Original commit: espressif/esp-idf@429712c6eb
2022-03-21 13:15:54 +01:00
Alex Lisitsyn b56073a5cd freemodbus: fix merge issues
* Original commit: espressif/esp-idf@ba1ee4092a
2022-03-21 13:15:54 +01:00
Alex Lisitsyn 8073747198 freemodbus: update poll event processing
update modbus poll event loop processing to process multiple events


* Original commit: espressif/esp-idf@44444208b7
2022-03-21 13:15:54 +01:00