-
Hi! Attached a log file with RTT output: Running one single FreeRTOS thread with a loop calling trice twice with a second sleep in between: while (rval == 0) {
trice( iD(4715), "Testit!");
os_task_sleep(1000);
trice( iD(5913), "test");
os_task_sleep(1000);
} Printing ascii messages over RTT works fine, displayed in RTT Viewer. BR |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
Viewing the provided log file: $ trice l -p FILEBUFFER -args RTTLogger_Channel_Terminal.log
2024/06/15 11:48:57 fn=til.json, maybe need to create an empty file first? (Safety feature)
2024/06/15 11:48:57 Error in manage.go:155: func 'github.com/rokath/trice/internal/id.TriceIDLookUp.fromFile' -> open til.json: The system cannot find the file specified. EDIT: When providing a binary Log file, the Please provide your In the EDIT: The Trice tool command line for the RTT output is: |
Beta Was this translation helpful? Give feedback.
-
Are you going to use both: direct AND deferred output? That is possible, but I guess you are just wont the direct output via SEGGER_RTT. So I recommend to change If you want also deferred output you need to call Analyzing: $ trice l -p FILEBUFFER -args RTTLogger_Channel_Terminal.log -pf none -d16
Jun 16 19:38:29.103331 FILEBUFFER: CYCLE: 121 not equal expected value 192 - adjusting. Now 1 CycleEvents
Jun 16 19:38:29.103331 FILEBUFFER: testTestit!testTestit!testTestit!testTestit!testTestit!testTestit!testTestit!testTestit!testTestit!testTestit!testTestit!testTestit!testTestit!CYCLE: 148 not equal expected value 147 - adjusting. Now 2 CycleEvents
Jun 16 19:38:29.103949 FILEBUFFER: Testit!testTestit!testTestit!CYCLE: 154 not equal expected value 153 - adjusting.
...
$ trice l -p FILEBUFFER -args RTTLogger_Channel_Terminal.log -debug
TCOBSv1: 19 57 79 00
->TRICE:
TCOBSv1: 6b 52 7a 00
->TRICE:
TCOBSv1: 19 57 7b 00
->TRICE:
TCOBSv1: 6b 52 7c 00
->TRICE:
TCOBSv1: 19 57 7d 00
->TRICE:
TCOBSv1: 6b 52 7e 00
->TRICE:
TCOBSv1: 19 57 7f 00
->TRICE:
TCOBSv1: 6b 52 80 00
->TRICE:
TCOBSv1: 19 57 81 00
->TRICE:
TCOBSv1: 6b 52 82 00
->TRICE: 6b 52 ff ff ff ff
Jun 16 19:42:56.088229 FILEBUFFER: len(p.B) = 0 < p.ParamSpace = 32767 - ignoring package []
Jun 16 19:42:56.088229 FILEBUFFER: Hints:Baudrate? Encoding? Interrupt? Overflow? Parameter count? Format specifier? Password? til.json? Version?
Jun 16 19:42:56.088229 FILEBUFFER: ERROR:ignoring data garbage
Jun 16 19:42:56.088229 FILEBUFFER: Hints:Baudrate? Encoding? Interrupt? Overflow? Parameter count? Format specifier? Password? til.json? Version?
TCOBSv1: 19 57 83 00
->TRICE:
TCOBSv1: 6b 52 84 00
->TRICE:
TCOBSv1: 19 57 85 00
->TRICE:
TCOBSv1: 6b 52 86 00
->TRICE:
TCOBSv1: 19 57 87 00
->TRICE:
TCOBSv1: 6b 52 88 00
->TRICE:
TCOBSv1: 19 57 89 00
->TRICE:
TCOBSv1: 6b 52 8a 00
->TRICE:
TCOBSv1: 19 57 8b 00
->TRICE:
TCOBSv1: 6b 52 8c 00
->TRICE
TCOBSv1: 19 57 8d 00
->TRICE:
TCOBSv1: 6b 52 8e 00
->TRICE:
TCOBSv1: 19 57 8f 00
->TRICE:
TCOBSv1: 6b 52 90 00
->TRICE:
TCOBSv1: 19 57 91 00
->TRICE:
TCOBSv1: 6b 52 92 00
->TRICE:
TCOBSv1: 6b 52 94 00
->TRICE:
TCOBSv1: 19 57 95 00
->TRICE:
ms16++;
ms16 = ms16 < 10000 ? ms16 : 0; and in your #define TriceStamp16() ms16 That allows you to use 16-bit time stamps most of the time and only at least every 10s a 32-bit time stamp Trice message is needed. |
Beta Was this translation helpful? Give feedback.
-
Yes, it works also with the ring buffer, even when not reading it out. During the direct trice transfer, the trice data are written immediately and the copy into the ring buffer is not used at all. Sorry for my wrong sayings. Weird is, that adding |
Beta Was this translation helpful? Give feedback.
-
Hi! Sorry for the delayed answer, had to do other stuff :) Works fine both listening directly and when reviewing a logged file. When trying to remove the \n characters, it hangs with one output line, both 'live' and when reading from file. Interesting finding: If I manually add \\n to the strings in til.json it seems to work! BR |
Beta Was this translation helpful? Give feedback.
-
Good idea. This would allow to write |
Beta Was this translation helpful? Give feedback.
Are you going to use both: direct AND deferred output? That is possible, but I guess you are just wont the direct output via SEGGER_RTT. So I recommend to change
#define TRICE_BUFFER TRICE_RING_BUFFER
into#define TRICE_BUFFER TRICE_STATIC_BUFFER
. That probably will solve your problem. When you write into the ring buffer without reading it, it will be filled and then the last Trices get overwritten. Because your Trice messages are all equal, there is no data garbage, just missing messages. Currently is work in progress (#462) to protect against such wrong use cases.If you want also deferred output you need to call
TriceTransfer()
cyclicylly to serve deferred output.Analyzing: