doc(pico-sensor): updated readme with remote tests informations
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
# TSM_PicoW_Sensor
|
||||
Project using the PicoW board. It publish sensors values (humidity, temperature) to an MQTT broker.
|
||||
This project uses the PicoW board to publish sensor values (humidity and temperature) to an MQTT broker.
|
||||
|
||||
## Configuration
|
||||
## Target Configuration
|
||||
|
||||
You have to use the serial terminal (Baud rate of 115200) to configure the board by sending commands. The application will then store the parameters in flash memory. You have to restart the device to update the changes.
|
||||
Use a serial terminal (baud rate: 115200) to configure the board by sending commands. The application stores the parameters in flash memory. You must restart the device to apply any changes.
|
||||
|
||||
### Wifi
|
||||
### Wi-Fi
|
||||
|
||||
```shell
|
||||
McuMinINI write settings.ini WiFi ssid "YOUR_SSID"
|
||||
@@ -14,7 +14,7 @@ McuMinINI write settings.ini WiFi pass "YOUR_PASSWORD"
|
||||
|
||||
### MQTT
|
||||
|
||||
Broker informations:
|
||||
Broker information:
|
||||
```shell
|
||||
McuMinINI write settings.ini MQTT broker "BROKER_NAME"
|
||||
McuMinINI write settings.ini MQTT user "USERNAME"
|
||||
@@ -30,29 +30,60 @@ McuMinINI write settings.ini MQTT topic_send_measurement "<user>/<room>/<device>
|
||||
## Build
|
||||
Project has `Debug`, `Release` and `Test` targets, using CMake Presets.
|
||||
|
||||
Configure:
|
||||
```
|
||||
**Configure:**
|
||||
```shell
|
||||
cmake --list-presets
|
||||
cmake --preset Debug
|
||||
cmake --preset Release
|
||||
cmake --preset Test
|
||||
```
|
||||
|
||||
Build:
|
||||
```
|
||||
**Build:**
|
||||
```shell
|
||||
cmake --build --list-presets
|
||||
cmake --build --preset app-debug
|
||||
cmake --build --preset app-release
|
||||
cmake --build --preset app-test
|
||||
```
|
||||
|
||||
Test:
|
||||
```
|
||||
**Test:**
|
||||
```shell
|
||||
ctest --list-presets
|
||||
ctest --test-dir build/Test -R Led_1
|
||||
```
|
||||
|
||||
Worflow:
|
||||
```
|
||||
**Workflow:**
|
||||
```shell
|
||||
cmake --workflow --list-presets
|
||||
```
|
||||
|
||||
## Running Tests on Another Machine
|
||||
|
||||
To run tests on a target connected to another machine (e.g., in a GitLab CI pipeline), follow these steps:
|
||||
|
||||
### On the Host Machine
|
||||
|
||||
Set up a J-Link tunnel to make the target accessible from anywhere:
|
||||
|
||||
```shell
|
||||
JLinkRemoteServerCL -UseTunnel -TunnelBySN
|
||||
```
|
||||
|
||||
The terminal output should look like this:
|
||||
|
||||
```
|
||||
2025-06-04 08:43:57 - Remote Server started
|
||||
2025-06-04 08:43:57 - Connected to J-Link with S/N 801000372
|
||||
2025-06-04 08:43:57 - Resolving tunnel server name (jlink-europe.segger.com)...
|
||||
2025-06-04 08:43:57 - Tunnel server IP: 185.162.249.2
|
||||
2025-06-04 08:43:57 - Registered at tunnel server
|
||||
2025-06-04 08:43:57 - Waiting for client connection
|
||||
```
|
||||
|
||||
`801000372` is the tunnel ID required to reach the target. Include it in your CMake command:
|
||||
|
||||
```shell
|
||||
cmake --preset Test -DTUNNEL_ID=801000372
|
||||
```
|
||||
|
||||
When you run the tests, they will automatically execute on the host machine.
|
||||
Reference in New Issue
Block a user