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: CODE_OF_CONDUCT.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -68,9 +68,9 @@ members of the project's leadership.
68
68
## Attribution
69
69
70
70
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
71
+
available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html)
72
72
73
-
[homepage]: https://www.contributor-covenant.org
73
+
[homepage](https://www.contributor-covenant.org)
74
74
75
75
For answers to common questions about this code of conduct, see
Copy file name to clipboardExpand all lines: README.md
+11-4
Original file line number
Diff line number
Diff line change
@@ -46,8 +46,15 @@ Tiny & fast trace code for embedded device real-time PC logging (trace ID visual
46
46
47
47
- Printf-like trace macros `TRICE` and PC `trice` tool (written in [Go](https://en.wikipedia.org/wiki/Go_(programming_language))) for automatic ID managing & logging.
48
48
- Communication without string transfer, just with IDs. Prerequisite: byte transmission to PC, low bandwidth is ok:
- "log in (a) trice" ([S>G](https://www.screentogif.com/)) 
51
58
- Main idea: Logging strings **not** into an embedded device to display them later on a PC but keep usage comfortable and simple.
52
59
53
60
## `TRICE` macros for C & C++ code
@@ -58,7 +65,7 @@ Tiny & fast trace code for embedded device real-time PC logging (trace ID visual
58
65
## Possible Use Cases
59
66
60
67
- Using trice not only for **dynamic debugging** but also as **logging** technique
61
-
is possible and gives the advantage to have very short messages (no strings) for transmission,
68
+
is possible and gives the advantage to have very short messages (no strings) for transmission,
62
69
but keep in mind that the file [til.json](https://github.com/rokath/trice/blob/master/til.json) is the key to read all output if your devices in the field for 10 or more years.
63
70
- You can consider TRICE also as a kind of **data compression** what could be interesting for IoT things, especially NB-IoT, where you have very low data rates.
64
71
- Storing trices in FLASH for later log analysis saves memory because a `TRICE` occupies only 4 bytes.
@@ -77,7 +84,7 @@ Tiny & fast trace code for embedded device real-time PC logging (trace ID visual
77
84
78
85
- Mixed case trice macros are short trices and the letter i at the end says **i**nside critical section. (FLEX encoding)
79
86
- `Trice16_1s( "tim: myFunc %d\n", sysTick );` before and after a function call lets you easy measure the function execution time.
80
-
- As graphical vizualisation you could use a tool similar to https://github.com/sqshq/sampler.
87
+
- As graphical vizualisation you could use a tool similar to [https://github.com/sqshq/sampler](https://github.com/sqshq/sampler).
81
88
- TRICE has intentionally no target timestamps for performance reasons. On the PC you can display the *reception timestampts*. But you can add own **timestamps as parameters** for exact embedded time measurements. Having several devices with trice timestamps, **network timing measurement** is possible.
Copy file name to clipboardExpand all lines: docs/CommandLineExamples.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,9 @@
15
15
## OPTIONS
16
16
17
17
- The **trice** command accepts one and only one sub-command (which can be inside the config file) followed by optional flags: `trice [s|subcommand [-f|flag [value]] [...]]`
18
-
- The flags start with a single dash and are boolean or need a value separated by space or `=`.
18
+
- The flags start with a single dash and are boolean or need a value separated by space or `=`.
19
19
- Flags in square brackets `[]` are optional. If omitted they have a default value depending on the context.
20
-
- Some flags can occur several times. Check with `trice h` for multi-flags.
20
+
- Some flags can occur several times. Check with `trice h` for multi-flags.
21
21
- Command line subcommand and flags are overwriting config file values.
22
22
- A subcommand in the command line is the selected subcommand in config files if there is any.
23
23
- You can place different subcommands with flags in a config file and specify only a subcommand in the command line for selection, like `trice u` and `trice l`.
@@ -88,16 +88,16 @@ Log trice messages from -source and display them line by line. Default destinati
88
88
-`-postfix string` Add string as postfix to end of each trice log line. It defaults to *\n*. The value *\n* was internally removed before, so the default value results to the original string.
89
89
-`-s|source COMn|filename|JLRTT|STRTT|RND|SIM [-p|param string]]` Use source as trice input. The switch -param is accordingly to source.
90
90
-**COMn**: COM15 as example. The only possible parameter is the baud rate. *-param 115200* is default value.
91
-
-**filename**:
91
+
-**filename**:
92
92
-**NOT IMPLEMENTED** When filename is an executable it is started with a random temporary logfile, internally read from. -param is accordingly to the executable command line.
93
93
- When filename is a binary file this file is read and data interpreted according to -format switch.
94
94
-**NOT IMPLEMENTED** When filename is an ASCII file, lines are diplayed. Can be used with logfiles. Default logging is off in that case.
95
95
-**JLRTT** Starts the *JLinkRTTLogger* executable which is expected in the trice executable directory together with acompanying libraries. The -param string is according to *JLinkRTTLogger* description.
96
96
-**STRTT****NOT IMPLEMENTED** Starts the *STLinkRTTLogger* executable which is expected in the trice executable directory together with acompanying libraries. The -param string is according to *STLinkRTTLogger* description.
97
97
-**RND**: random data are used as input and interpreted according to -format switch. The switch -param is used as control for the random generator. Default is total random data. Usable for testing.
98
-
-*-param=wrap* generates valid wrap data with random payload.
98
+
-*-param=wrap* generates valid wrap data with random payload.
99
99
-**SIM**: inputDummy data are used as input and interpreted according to -format switch. The switch -param is used as control for the inputDummy generator. Usable for testing.
100
-
-*-param=name* uses simulation dataset *name*.
100
+
-*-param=name* uses simulation dataset *name*.
101
101
-`-color off|alternate` Switch color off or use alternate color set. Ignored when switch -remote is used.
102
102
-`-r|remote no|ds|displayserver|IPaddr:IPport` Do not show loglines and send them to a displayserver instead. Default is no. localhost:61497.
103
103
-`-a|autostart cmd` Start `cmd` in background. Try `trice ds` to start displayserver automatically.
@@ -149,13 +149,13 @@ trice
149
149
trice -sd -r 192.168.1.23:45678
150
150
```
151
151
152
-
- Play recorded wrap format binary file *log.bin*
152
+
- Play recorded wrap format binary file *log.bin*
153
153
154
154
```b
155
155
trice l -s log.bin -f w
156
156
```
157
157
158
-
- Start *JLinkRTTLogger* manually on Windows and use RTT channel 0.
158
+
- Start *JLinkRTTLogger* manually on Windows and use RTT channel 0.
Copy file name to clipboardExpand all lines: docs/Common.md
+25-7
Original file line number
Diff line number
Diff line change
@@ -28,18 +28,33 @@ Automatically the ID is added to an [ID list](https://github.com/rokath/trice/bl
28
28
When the embedded project is compiled, only the ID goes to the binary
29
29
but not the format string, what results in a smaller memory footprint.
30
30
31
-
On execution the ID is pushed into a FIFO together with the optional trice parameters and that is the real fast and important part which could be finished within 12-14 processor clocks (measured on a ARM M0 with `Trice16_1i`). At 48 MHz the in time needed light travels less than 100 meters. Slightly delayed in the background the TRICE trace goes to the communication port, what is also fast compared to all the actions behind a `printf()` statement.
31
+
On execution the ID is pushed into a FIFO together with the optional trice parameters and that is the real fast \
32
+
and important part which could be finished within 12-14 processor clocks (measured on a ARM M0 with `Trice16_1i`). \
33
+
At 48 MHz the in time needed light travels less than 100 meters. \
34
+
Slightly delayed in the background the TRICE trace goes to the communication port, what is also fast compared to all the actions behind a `printf()` statement.
32
35
33
36
Please understand, that when debugging code containing TRICE\* statements, during a TRICE\* step-over only one ore more 32 bit values go into the internal fifo buffer and no serial output
34
37
is visible because of the stopped target. But the SEGGER debug probe reads out the RTT memory and this way also during debug stepping realtime trice output is visible. That is (right now) not true for the STLINK interface because the is only one USB enpoint.
35
38
36
39
## trice instructions: `TRICE`, `Trice` or `trice` with or without ending letter 'i'?
37
40
38
-
There are several types of trice statements. All trice statements can have an additional letter 'i'. This means **i**nside critical section. You can use these when it is sure not to get interrupted by other trices. If for example an interrupt contains a trice statement this can be an i-trice but other trices not allowed to be an i-trice, they need to be normal trices, which are protected against interruption. If you are not sure it is always safe to use normal trices (without ending 'i'). The i-trices are a bit faster what is not relevant in most cases because of the general speed.
39
-
40
-
- `Trice0`, `Trice8_1`, `Trice16_1` and `Trice8_2` are so called short trice macros. They use internal a smaller encoding and have only a 15-bit ID size, means ID's 1-32767 are usable. These are the fastest trices and with them the speed limit is reached.  The number in the blue lines is the current processor tick. For `Trice16_1i` the difference between neibours is about 13 clocks. Short trices need 'id(0)' instead 'Id(0)' as important difference to normal trices.
41
-
- `TRICE0`, `TRICE8_1`, ... `TRICE8_8`, `TRICE16_1`, ... `TRICE16_4`, `TRICE32_1`, ... `TRICE32_4`, `TRICE64_1`, `TRICE64_2` are normal trice macros. They insert code directly (no function call) for better performance but the drawback is the rising code amount when many trices are used.
42
-
- `trice0`, `trice8_1`, ... `trice8_8`, `trice16_1`, ... `trice16_4`, `trice32_1`, ... `trice32_4`, `trice64_1`, `trice64_2` are normal trice functions. The function call overhead is reasonable and the advantage is significant less code amount when many trices are used.
41
+
There are several types of trice statements. All trice statements can have an additional letter 'i'. This means **i**nside critical section. \
42
+
You can use these when it is sure not to get interrupted by other trices. If for example an interrupt contains a trice statement this can be \
43
+
an i-trice but other trices not allowed to be an i-trice, they need to be normal trices, which are protected against interruption. \
44
+
If you are not sure it is always safe to use normal trices (without ending 'i'). The i-trices are a bit faster what is not relevant in most cases because of the general speed.
45
+
46
+
- `Trice0`, `Trice8_1`, `Trice16_1` and `Trice8_2` are so called short trice macros.\
47
+
They use internal a smaller encoding and have only a 15-bit ID size, means ID's 1-32767 are usable.\
48
+
These are the fastest trices and with them the speed limit is reached.\
49
+
\
50
+
\
51
+
\
52
+
The number in the blue lines is the current processor tick. For `Trice16_1i` the difference between neibours is about 13 clocks. \
53
+
Short trices need 'id(0)' instead 'Id(0)' as important difference to normal trices.
54
+
- `TRICE0`, `TRICE8_1`, ... `TRICE8_8`, `TRICE16_1`, ... `TRICE16_4`, `TRICE32_1`, ... `TRICE32_4`, `TRICE64_1`, `TRICE64_2` are normal trice macros. \
55
+
They insert code directly (no function call) for better performance but the drawback is the rising code amount when many trices are used.
56
+
- `trice0`, `trice8_1`, ... `trice8_8`, `trice16_1`, ... `trice16_4`, `trice32_1`, ... `trice32_4`, `trice64_1`, `trice64_2` are normal trice functions. \
57
+
The function call overhead is reasonable and the advantage is significant less code amount when many trices are used.
43
58
- For most flexibility the code for each trice function can be enabled or not inside the triceConfig.h.
44
59
45
60
## `trice` tool
@@ -523,4 +538,7 @@ example: 'trice zeroSourceTreeIds -src ../A': Sets all TRICE IDs to 0 in ../A. U
523
538
### Color issues under Windows
524
539
525
540
**Currently CMD console colors are not enabled by default in Win10**, so if you see no color but escape sequences on your powershell or cmd window, please refer to
526
-
[Windows console with ANSI colors handling](https://superuser.com/questions/413073/windows-console-with-ansi-colors-handling/1050078#1050078) or simply use a Linux like terminal under windows, like git-bash. One option is also to install Microsoft *Windows Terminal (Preview)* from inside the Microsoft store and to start trice inside there. Unfortunally this can not be done automatically right now because of missing commandline switches.
541
+
[Windows console with ANSI colors handling](https://superuser.com/questions/413073/windows-console-with-ansi-colors-handling/1050078#1050078)\
542
+
or simply use a Linux like terminal under windows, like git-bash.\
543
+
One option is also to install Microsoft *Windows Terminal (Preview)* from inside the Microsoft store\
544
+
and to start trice inside there. Unfortunally this can not be done automatically right now because of missing commandline switches.
Copy file name to clipboardExpand all lines: docs/Manuals/Rutronik.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ J-Link ist ja wahrscheinlich schon vorhanden und ist einen ersten Versuch wert,
15
15
16
16
(Alternativ dazu kann man sich ein eigenes Tool für den virtuellen COM-Port stricken)
17
17
18
-
ST ist ebenfalls auf github aktiv: https://github.com/STMicroelectronics
18
+
ST ist ebenfalls auf github aktiv: [https://github.com/STMicroelectronics](https://github.com/STMicroelectronics)
19
19
20
20
Es gibt [STM32Cube expansion packages](https://www.st.com/en/embedded-software/stm32cube-expansion-packages.html#products)
Copy file name to clipboardExpand all lines: docs/OneWireOption.md
+8-1
Original file line number
Diff line number
Diff line change
@@ -11,4 +11,11 @@ Because the trice tool needs only to receive, a single UART-TX pin will do. But
11
11
12
12
- The 2 images are taken from [https://circuitcellar.com/cc-blog/a-trace-tool-for-embedded-systems/](https://circuitcellar.com/cc-blog/a-trace-tool-for-embedded-systems/). See there for more information.
13
13
- As trace dongle you can use any spare microcontroller board with an UART together with an FTDI USB converter.
14
-
- This allowes also any other data path - method does'nt matter: [UART](https://en.wikipedia.org/wiki/Universal_asynchronous_receiver-transmitter), [I²C](https://en.wikipedia.org/wiki/I%C2%B2C), [SPI](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface), [GPIO](https://circuitcellar.com/cc-blog/a-trace-tool-for-embedded-systems/), [RTT](https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/), [CAN](https://en.wikipedia.org/wiki/CAN_bus), [LIN](https://en.wikipedia.org/wiki/Local_Interconnect_Network), ...
14
+
- This allowes also any other data path - method does'nt matter:\
0 commit comments