Skip to content

Commit b44c179

Browse files
committed
Merge remote-tracking branch 'origin/devel' into devel
2 parents a1c216e + f6aadde commit b44c179

19 files changed

+280
-6762
lines changed

CHANGELOG.md

+199-145
Large diffs are not rendered by default.

docs/TriceUserManual.md

+29-9
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,10 @@ The Trice tool, will change the value to 0 and change it back to 1, when perform
651651

652652
It is recommended to use the Trice cache in conjunction with this to avoid a permanent re-translation of files including Trice code.
653653

654+
TRICE_CLEAN==1 changes all Trice macros into empty ones. It is used only to silence sophisticated editors. In the cleaned state, when the IDs are removed from the files, the editor could underline the Trice macros indicating a false positive.
655+
656+
Do not use TRICE_CLEAN for disabling Trice macros. The *triceConfig.h* line `#define TRICE_CLEAN 0` changes to `1` with every `trice clean` and to `0` with every `trice insert`. This line is optional and must not be in a different file. If you want to disable Trice macros use TRICE_OFF.
657+
654658
### 4.21. <a id='trice-generator'></a>Trice Generator
655659

656660
The Trice tool is able to generate colors or code to support various tasks. One interesting option is the Remote Procedure Call support, allowing RPC usage in a network of embedded devices.
@@ -1622,7 +1626,7 @@ An example, provided by [@KammutierSpule](https://github.com/kammutierspule), is
16221626
void trice0_test() {
16231627
Trice0( "OK");
16241628
Trice( InvalidUse );
1625-
Trice( "OK", Variable );
1629+
Trice( "%u", Variable );
16261630
}
16271631
```
16281632

@@ -1632,7 +1636,7 @@ void trice0_test() {
16321636
void trice0_test() {
16331637
Trice0( iD(2740), "OK"); // ok, iD is added
16341638
Trice( InvalidUse ); // no warning or error
1635-
Trice( "OK", Variable ); // id is not added / inserted
1639+
Trice( "%u", Variable ); // id is not added / inserted
16361640
}
16371641
```
16381642

@@ -3252,15 +3256,15 @@ In this **G0B1_inst** example we use the additional `-d16` and `-pf none` switch
32523256
```
32533257
* See also the configuration in [./examples/G0B1_inst/Core/triceConfig.h](../examples/G0B1_inst/Core/triceConfig.h)
32543258
3255-
* If you install the `screen` command your life can gets esier by using a shell script like [.](../examples/G0B1_inst/RTTLogUnix.sh):
3259+
* If you install the `tmux` command your life gets esier by using a shell script like [./examples/G0B1_inst/RTTLogTmux.sh](../examples/G0B1_inst/RTTLogTmux.sh):
32563260
32573261
```bash
3258-
#!/bin/bash
3262+
mkdir -p ./temp
32593263
rm -f ./temp/trice.bin
32603264
touch ./temp/trice.bin
3261-
screen -d -m JLinkRTTLogger -Device STM32G0B1RE -If SWD -Speed 4000 -RTTChannel 0 ./temp/trice.bin
3262-
trice log -p FILE -args ./temp/trice.bin -prefix off -hs off -d16 -ts ms -i ../../demoTIL.json -li ../../demoLI.json -pf none
3263-
screen -X quit
3265+
tmux new -s "tricerttlog" -d "JLinkRTTLogger -Device STM32G0B1RE -If SWD -Speed 4000 -RTTChannel 0 ./temp/trice.bin"
3266+
trice log -p FILE -args ./temp/trice.bin -pf none -prefix off -hs off -d16 -ts16 "time:offs:%4d µs" -showID "deb:%5d" -i ../../demoTIL.json -li ../../demoLI.json -stat
3267+
tmux kill-session -t "tricerttlog"
32643268
```
32653269
32663270
* Usage:
@@ -3280,6 +3284,8 @@ screen -X quit
32803284
triceExamples.c 29 0:00:00,002 🐁 Speedy Gonzales a 32-bit time stamp
32813285
```
32823286
3287+
* **Hint:** If you use *RTTLogTmux.sh* with Darwin, the "control-C" key combination seems not to work immediately. That is simply because the keyboard focus switches away after script start. Simply click into the terminal window again and then use "control-C" to terminate the Trice logging.
3288+
32833289
<p align="right">(<a href="#top">back to top</a>)</p>
32843290
32853291
### 32.2. <a id='segger-real-time-transfer-(rtt)'></a>Segger Real Time Transfer (RTT)
@@ -4366,7 +4372,7 @@ Setting up a PC is for Linux mostly straightforward but Windows PCs are more pro
43664372
- Open terminal and execute `gcc --version` to check success.
43674373
- Setup J-Link if you use this debug probe as hardware or software (see below).
43684374
- Install SEGGER [J-Link Software and Documentation Pack](https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack)
4369-
- Install [Make for Windows](https://sourceforge.net/projects/gnuwin32/) and add its installation bin folder location to the PATH variable.
4375+
- Install [Make for Windows](#install-make) and add its installation bin folder location to the PATH variable.
43704376

43714377
#### 35.5.1. <a id='setup-trice'></a>Setup Trice
43724378

@@ -4384,6 +4390,10 @@ OR
43844390

43854391
<a id='install-make'></a><h5>Install make</h5>
43864392

4393+
* Fast lane: Go to https://sourceforge.net/projects/ezwinports/files/, download ans extract **make-4.4.1-without-guile-w32-bin.zip**. Put the *make.exe* file somewhere in you $PATH.
4394+
4395+
* OR open the Windows Powershell and:
4396+
43874397
```bash
43884398
ms@PaulPCWin11 MINGW64 ~/repos/trice/examples (devel)
43894399
$ winget install ezwinports.make
@@ -4409,7 +4419,7 @@ Successfully installed
44094419
ms@PaulPCWin11 MINGW64 ~/repos/trice/examples (devel)
44104420
```
44114421
4412-
Check:
4422+
* Check:
44134423
44144424
```bash
44154425
$ make --version
@@ -5979,6 +5989,16 @@ cat demoLI.json | grep '"File":' | sort | uniq
59795989
"File": "examples/exampleData/triceLogDiagData.c",
59805990
```
59815991
5992+
### Building a trice library?
5993+
5994+
The triceConfig.h is mandatory for the trice code. It controls which parts of the trice code are included. There is no big advantage having a trice library, because it would work only with unchanged settings in the project specific triceConfig.h. Once the trice source files are translated, their objects are rebuilt automatically and only when the triceConfig.h is changed. So only the linker has a bit less to do when it finds a trice library compared to a bunch of trice objects. But does that influence the build time heavily?
5995+
5996+
The triceConfig.h is the only part of the trice sources which should be modified by the users. It is ment to be a individual part of the user projects. The examples folder shows the usage.
5997+
5998+
### Possible Compiler Issue when using Trice macros without parameters on old compiler or with strict-C settings
5999+
6000+
If you encounter a compilation error on `trice( "hi");` for example, but not on `trice( "%u stars", 5 );`, this is probably caused by the way your compiler interprets variadic macros. Simply change to `trice0( "hi");` or change your compiler settings. See issue [#279](https://github.com/rokath/trice/issues/279) for more details. If your project needs to be translated with strict-C settings for some reason, you have to use the `trice0` macros when no values exist for the Trice macros.
6001+
59826002
<p align="right">(<a href="#top">back to top</a>)</p>
59836003
59846004
## 41. <a id='trice-user-manual-changelog'></a>Trice User Manual Changelog

docs/TriceUserManual.pdf

120 KB
Binary file not shown.

examples/F030_inst/RTTLogScreen.sh

-9
This file was deleted.

examples/F030_inst/RTTLogTmux.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/bin/bash
2-
# Needs "sudo apt install tmux" or similar done before.
2+
# Linux: Needs "sudo apt install tmux" or similar done before.
3+
# Darwin: needs "brew install tmux"
4+
# Matching CLI values are matching triceConfig.h TRICE_DIRECT_OUTPUT=1 settings in this project.
35

46
mkdir -p ./temp
57
rm -f ./temp/trice.bin
68
touch ./temp/trice.bin
7-
tmux new -d "JLinkRTTLogger -Device STM32F030R8 -If SWD -Speed 4000 -RTTChannel 0 ./temp/trice.bin"
8-
trice log -p FILE -args ./temp/trice.bin -pf none -prefix off -hs off -d16 -ts16 "time:tick #%6d" -showID "deb:%5d" -i ../../demoTIL.json -li ../../demoLI.json
9-
tmux kill-session -t 0
9+
tmux new -s "tricerttlog" -d "JLinkRTTLogger -Device STM32F030R8 -If SWD -Speed 4000 -RTTChannel 0 ./temp/trice.bin"
10+
trice log -p FILE -args ./temp/trice.bin -pf none -prefix off -hs off -d16 -ts16 "time:tick #%6d" -showID "deb:%5d" -i ../../demoTIL.json -li ../../demoLI.json -stat
11+
tmux kill-session -t "tricerttlog"

examples/F030_inst/RTTLogWindows.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
4+
# Matching CLI values are matching triceConfig.h TRICE_DIRECT_OUTPUT=1 settings in this project.
5+
6+
7+
8+
9+
10+
trice.exe log -p jlink -args "-Device STM32F030R8" -pf none -prefix off -hs off -d16 -showID "deb:%5d" -i ../../demoTIL.json -li ../../demoLI.json -stat

examples/G0B1_inst/RTTLogTmux.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
# Linux: Needs "sudo apt install tmux" or similar done before.
3+
# Darwin: needs "brew install tmux"
4+
# Matching CLI values are matching triceConfig.h TRICE_DIRECT_OUTPUT=1 settings in this project.
5+
6+
mkdir -p ./temp
7+
rm -f ./temp/trice.bin
8+
touch ./temp/trice.bin
9+
tmux new -s "tricerttlog" -d "JLinkRTTLogger -Device STM32G0B1RE -If SWD -Speed 4000 -RTTChannel 0 ./temp/trice.bin"
10+
trice log -p FILE -args ./temp/trice.bin -pf none -prefix off -hs off -d16 -ts16 "time:offs:%4d µs" -showID "deb:%5d" -i ../../demoTIL.json -li ../../demoLI.json -stat
11+
tmux kill-session -t "tricerttlog"

examples/G0B1_inst/RTTLogUnix.sh

-10
This file was deleted.

examples/G0B1_inst/RTTLogWindows.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
4+
# Matching CLI values are matching triceConfig.h TRICE_DIRECT_OUTPUT=1 settings in this project.
5+
6+
7+
8+
9+
10+
trice.exe log -p jlink -args "-Device STM32F030R8" -pf none -prefix off -hs off -d16 -showID "deb:%5d" -i ../../demoTIL.json -li ../../demoLI.json -stat -ts16 "time:offs:%4d µs"

examples/G0B1_inst/screenHelpDebian.txt

-38
This file was deleted.

examples/G0B1_inst/screenHelpMac.txt

-32
This file was deleted.

0 commit comments

Comments
 (0)