You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/TriceUserManual.md
+29-9
Original file line number
Diff line number
Diff line change
@@ -651,6 +651,10 @@ The Trice tool, will change the value to 0 and change it back to 1, when perform
651
651
652
652
It is recommended to use the Trice cache in conjunction with this to avoid a permanent re-translation of files including Trice code.
653
653
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.
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
1622
1626
void trice0_test() {
1623
1627
Trice0( "OK");
1624
1628
Trice( InvalidUse );
1625
-
Trice( "OK", Variable );
1629
+
Trice( "%u", Variable );
1626
1630
}
1627
1631
```
1628
1632
@@ -1632,7 +1636,7 @@ void trice0_test() {
1632
1636
voidtrice0_test() {
1633
1637
Trice0( iD(2740), "OK"); // ok, iD is added
1634
1638
Trice( InvalidUse ); // no warning or error
1635
-
Trice( "OK", Variable ); // id is not added / inserted
1639
+
Trice( "%u", Variable ); // id is not added / inserted
1636
1640
}
1637
1641
```
1638
1642
@@ -3252,15 +3256,15 @@ In this **G0B1_inst** example we use the additional `-d16` and `-pf none` switch
3252
3256
```
3253
3257
* See also the configuration in [./examples/G0B1_inst/Core/triceConfig.h](../examples/G0B1_inst/Core/triceConfig.h)
3254
3258
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):
triceExamples.c 29 0:00:00,002 🐁 Speedy Gonzales a 32-bit time stamp
3281
3285
```
3282
3286
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
+
3283
3289
<p align="right">(<a href="#top">back to top</a>)</p>
3284
3290
3285
3291
### 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
4366
4372
- Open terminal and execute `gcc --version` to check success.
4367
4373
- Setup J-Link if you use this debug probe as hardware or software (see below).
4368
4374
- 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.
4370
4376
4371
4377
#### 35.5.1. <a id='setup-trice'></a>Setup Trice
4372
4378
@@ -4384,6 +4390,10 @@ OR
4384
4390
4385
4391
<a id='install-make'></a><h5>Install make</h5>
4386
4392
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.
The triceConfig.h is mandatory forthe 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 settingsin 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
+
5982
6002
<p align="right">(<a href="#top">back to top</a>)</p>
5983
6003
5984
6004
## 41. <a id='trice-user-manual-changelog'></a>Trice User Manual Changelog
0 commit comments