git clone --recurse-submodules https://github.com/wdl83/modbus_c
- ATmega328p, slave only
- STM8S003F3, slave only
- STM32F103C8, slave only
- Linux, slave and master
All targets use same implementation
Utilizes linux tty device as serial I/O. Allows validation and quick prototyping.
make -f rtu_linux.mk
make -f rtu_atmega328p.mk
Current state of RTU tests
Building
make -f rtu_linux_tests.mk
Running
make -f rtu_linux_tests.mk run
- default, software RTU (linux RTU running in separate thread)
./obj/rtu_linux_tests
- HW loopback. Use 2 USB to SERIAL converters with crossed RX/TX pins
./obj/rtu_linux -d /dev/ttyUSB1 -a 32 -t 10000 -T 20000 -D 1024 -p E
./obj/rtu_linux_tests -d /dev/ttyUSB0 -a 32 -t 10000 -T 20000 -p E
- HW target. ATmega328p with obj_atmega328p/rtu_atmega328p.hex connected to PC
./obj/rtu_linux_tests -d /dev/ttyUSB0 -a 15 -p E
Same set of tests work with all targets listed above.