Skip to content

Commit a714339

Browse files
committed
polish 0 according superlinter job
1 parent 7db3d43 commit a714339

File tree

14 files changed

+97
-66
lines changed

14 files changed

+97
-66
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ A clear and concise description of what the bug is.
1212

1313
**To Reproduce**
1414
Steps to reproduce the behavior:
15+
1516
1. Go to '...'
1617
2. Click on '....'
1718
3. Scroll down to '....'
@@ -24,15 +25,17 @@ A clear and concise description of what you expected to happen.
2425
If applicable, add screenshots to help explain your problem.
2526

2627
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
28+
29+
- OS: [e.g. iOS]
30+
- Browser [e.g. chrome, safari]
31+
- Version [e.g. 22]
3032

3133
**Smartphone (please complete the following information):**
32-
- Device: [e.g. iPhone6]
33-
- OS: [e.g. iOS8.1]
34-
- Browser [e.g. stock browser, safari]
35-
- Version [e.g. 22]
34+
35+
- Device: [e.g. iPhone6]
36+
- OS: [e.g. iOS8.1]
37+
- Browser [e.g. stock browser, safari]
38+
- Version [e.g. 22]
3639

3740
**Additional context**
3841
Add any other context about the problem here.

CODE_OF_CONDUCT.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ members of the project's leadership.
6868
## Attribution
6969

7070
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)
7272

73-
[homepage]: https://www.contributor-covenant.org
73+
[homepage](https://www.contributor-covenant.org)
7474

7575
For answers to common questions about this code of conduct, see
76-
https://www.contributor-covenant.org/faq
76+
[https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq)

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MIT License
1+
# MIT License
22

33
Copyright © 2020 Thomas.Hoehenleitner [at] seerose.net
44

README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,15 @@ Tiny & fast trace code for embedded device real-time PC logging (trace ID visual
4646

4747
- 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.
4848
- Communication without string transfer, just with IDs. Prerequisite: byte transmission to PC, low bandwidth is ok:
49-
- 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), ...
50-
- "log in (a) trice" ([S>G](https://www.screentogif.com/)) ![ ](./docs/README.media/life0.gif)
49+
- method does'nt matter: \
50+
[UART](https://en.wikipedia.org/wiki/Universal_asynchronous_receiver-transmitter), \
51+
[I²C](https://en.wikipedia.org/wiki/I%C2%B2C), \
52+
[SPI](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface), \
53+
[GPIO](https://circuitcellar.com/cc-blog/a-trace-tool-for-embedded-systems/), \
54+
[RTT](https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/), \
55+
[CAN](https://en.wikipedia.org/wiki/CAN_bus), \
56+
[LIN](https://en.wikipedia.org/wiki/Local_Interconnect_Network), ...
57+
- "log in (a) trice" ([S>G](https://www.screentogif.com/)) ![ ](./docs/README.media/life0.gif)
5158
- Main idea: Logging strings **not** into an embedded device to display them later on a PC but keep usage comfortable and simple.
5259

5360
## `TRICE` macros for C & C++ code
@@ -58,7 +65,7 @@ Tiny & fast trace code for embedded device real-time PC logging (trace ID visual
5865
## Possible Use Cases
5966

6067
- 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,
6269
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.
6370
- 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.
6471
- 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
7784
7885
- Mixed case trice macros are short trices and the letter i at the end says **i**nside critical section. (FLEX encoding)
7986
- `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).
8188
- 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.
8289
8390
## How it approximately works

docs/CommandLineExamples.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
## OPTIONS
1616

1717
- 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 `=`.
1919
- 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.
2121
- Command line subcommand and flags are overwriting config file values.
2222
- A subcommand in the command line is the selected subcommand in config files if there is any.
2323
- 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
8888
- `-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.
8989
- `-s|source COMn|filename|JLRTT|STRTT|RND|SIM [-p|param string]]` Use source as trice input. The switch -param is accordingly to source.
9090
- **COMn**: COM15 as example. The only possible parameter is the baud rate. *-param 115200* is default value.
91-
- **filename**:
91+
- **filename**:
9292
- **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.
9393
- When filename is a binary file this file is read and data interpreted according to -format switch.
9494
- **NOT IMPLEMENTED** When filename is an ASCII file, lines are diplayed. Can be used with logfiles. Default logging is off in that case.
9595
- **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.
9696
- **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.
9797
- **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.
9999
- **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*.
101101
- `-color off|alternate` Switch color off or use alternate color set. Ignored when switch -remote is used.
102102
- `-r|remote no|ds|displayserver|IPaddr:IPport` Do not show loglines and send them to a displayserver instead. Default is no. localhost:61497.
103103
- `-a|autostart cmd` Start `cmd` in background. Try `trice ds` to start displayserver automatically.
@@ -149,13 +149,13 @@ trice
149149
trice -sd -r 192.168.1.23:45678
150150
```
151151

152-
- Play recorded wrap format binary file *log.bin*
152+
- Play recorded wrap format binary file *log.bin*
153153

154154
```b
155155
trice l -s log.bin -f w
156156
```
157157

158-
- Start *JLinkRTTLogger* manually on Windows and use RTT channel 0.
158+
- Start *JLinkRTTLogger* manually on Windows and use RTT channel 0.
159159

160160
```b
161161
trice log -s="C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkRTTLogger.exe" -p="-Device STM32F030R8 -if SWD -RTTChannel 0"

docs/Common.md

+25-7
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,33 @@ Automatically the ID is added to an [ID list](https://github.com/rokath/trice/bl
2828
When the embedded project is compiled, only the ID goes to the binary
2929
but not the format string, what results in a smaller memory footprint.
3030
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.
3235
3336
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
3437
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.
3538
3639
## trice instructions: `TRICE`, `Trice` or `trice` with or without ending letter 'i'?
3740
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. ![x](README.media/Trice16_1-Code.PNG)![x](README.media/Trice16_1i-Code.PNG)![x](README.media/Trice16_1i.PNG) 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+
![x](README.media/Trice16_1-Code.PNG)\
50+
![x](README.media/Trice16_1i-Code.PNG)\
51+
![x](README.media/Trice16_1i.PNG)\
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.
4358
- For most flexibility the code for each trice function can be enabled or not inside the triceConfig.h.
4459
4560
## `trice` tool
@@ -523,4 +538,7 @@ example: 'trice zeroSourceTreeIds -src ../A': Sets all TRICE IDs to 0 in ../A. U
523538
### Color issues under Windows
524539

525540
**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.

docs/Manuals/ConfigFile.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## Rules
88

9-
- The `trice` command can be called without parameters.
9+
- The `trice` command can be called without parameters.
1010
- In that case it needs to find at least one config file named *trice.conf.json*.
1111
- The `trice` command can be called with a single sub-command plus an optional dashed parameter list.
1212
- In that case it looks also for a config file named *trice.conf.json* for additional settings.

docs/Manuals/Rutronik.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ J-Link ist ja wahrscheinlich schon vorhanden und ist einen ersten Versuch wert,
1515

1616
(Alternativ dazu kann man sich ein eigenes Tool für den virtuellen COM-Port stricken)
1717

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)
1919

2020
Es gibt [STM32Cube expansion packages](https://www.st.com/en/embedded-software/stm32cube-expansion-packages.html#products)
2121

docs/OneWireOption.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,11 @@ Because the trice tool needs only to receive, a single UART-TX pin will do. But
1111

1212
- 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.
1313
- 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:\
15+
[UART](https://en.wikipedia.org/wiki/Universal_asynchronous_receiver-transmitter),\
16+
[I²C](https://en.wikipedia.org/wiki/I%C2%B2C),\
17+
[SPI](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface),\
18+
[GPIO](https://circuitcellar.com/cc-blog/a-trace-tool-for-embedded-systems/),\
19+
[RTT](https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/),\
20+
[CAN](https://en.wikipedia.org/wiki/CAN_bus),\
21+
[LIN](https://en.wikipedia.org/wiki/Local_Interconnect_Network), ...

0 commit comments

Comments
 (0)