RP2040-W5100S-MM5D91
RP2040-W5100S-MM5D91
- Modbus TCP Slave/Server library for RP2040 + Wiznet 5100S based on the C++ SDK and FreeRTOS
- can be ported to W5100S-EVB-Pico, requires EEPROM and Accelerometer to be added in I2C-bus.
- sensorSW handling Sensor side UART.
- FreeRTOS in own folder as submodule
- tiny regex also as submodule
- sensorSW contains Sensor side UART.
- Protoocol contains Modbus side.
- main.cpp in own folder
- wiznet w5100s sdk in wiznet folder
- Raspberry Pi 4/Ububntu 22.04 /Osx /Windows as development environment.
- Updating the SW through SWD enabling also the debugging.
- See installation instructions below.
- Install the Raspberry PI Pico C++ SDK according to the official documentation
- Configure the environment to work with Visual Studio Code
- Clone this repository and initialize the submodules
git clone https://github.com/jasa66/TrueSense.git
cd Modbus-PI-Pico-FreeRTOS
git submodule update --init --recursive
cd ../tiny-regex-c
git submodule update --init --recursive
- Open the repository folder in Visual Studio Code
- update the [launch.json](/Modbus-PI-Pico-FreeRTOS/blob/main/.vscode/launch.json) file according to your environment.
- Start the debugging session according to the official documentation
- port of FreeRTOS to the Raspberry Pi Pico published at: https://github.com/FreeRTOS/FreeRTOS-Kernel.git
- (https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/main/portable/ThirdParty/GCC/RP2040)
- FreeRTOS TAG 11.0.1 (includes SMB)
- License MIT
- https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/LICENSE.md
- Pico sdk version 1.5.1
- (https://github.com/raspberrypi/pico-sdk)
- License BSD-3 Clause
- https://github.com/raspberrypi/pico-sdk/blob/master/LICENSE.TXT
- ModbusTCP in Protocol folder
- License LGPL-2.1, ported to TCP and W5100S from https://github.com/alejoseb/Modbus-PI-Pico-FreeRTOS
- Regular expression functions for embedded use: https://github.com/kokke/tiny-regex-c
- License: free, no restrictions.
- https://github.com/kokke/tiny-regex-c/blob/master/LICENSE
- Wiznet W5100S SDK
- https://github.com/Wiznet/ioLibrary_Driver
- License MIT: https://github.com/Wiznet/ioLibrary_Driver/blob/master/license.txt
- License: LGPL 2.1
- fully created byt Parcnu
- Requires environment variables
- SENSOR_PATH to point to folder where main CmakeList.txt is located
- FREERTOS_KERNEL_PATH to point to folder where FreeRTOS-Kernel is located.
- PICO_SDK_PATH to point pico sdk location.
- GCC arm-none-eabi-gcc (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 13.2.1 20231009
- GDB GNU gdb GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
- CMAKE cmake version 3.28.3
- unit tests found from tests folder
- Reports of the tests in tests/Reports folder
- split main to main and initialization files. Main too big and confusing.
- FreeRtos SMB has issue in Assert debugs. Local fix created. Should be removed with later FreeRTOS versions.
- sleep_ms do not work as expected in Pico SDK 1.4.0 FreeRTOS SMB version. Created Sleep_ms to get over the issue.