trice
trice copied to clipboard
Invent 0, t, T for id(0), Id(0), ID(0)
Write update test for Id, than id and ID, same with -z switch.
_, t, T ? noTimeStamp, timeStamp16, timeStamp32 ? 0, 2, 4 ? TS0, TS16, TS32 id(0), Id(0), ID(0) seams to be ok
Does not add value.
During compilation they are look like this after trice u .
as pre-compile step
TRICE( ID(12345), "isr:Pin is %d\n", value ); // 32-bit timestamp
TRICE( Id(12345), "isr:Pin is %d\n", value ); // 16-bit timestamp
TRICE( id(12345), "isr:Pin is %d\n", value ); // no timestamp
TRICE( iD7(12345), "isr:Pin is %d\n", value ); // extended encoding (any number >0 possible)
Trices are going into the repositories like this after trice z .
as post-compile step:
Option 1:
TRICE( T, "isr:Pin is %d\n", value ); // 32-bit timestamp
TRICE( t, "isr:Pin is %d\n", value ); // 16-bit timestamp
TRICE( 0, "isr:Pin is %d\n", value ); // no timestamp
TRICE( 7, "isr:Pin is %d\n", value ); // extended encoding 7 (any number >0 possible)
Option 2:
TRICE( TS32, "isr:Pin is %d\n", value ); // 32-bit timestamp
TRICE( TS16, "isr:Pin is %d\n", value ); // 16-bit timestamp
TRICE( NOTS, "isr:Pin is %d\n", value ); // no timestamp
TRICE( MOD7, "isr:Pin is %d\n", value ); // extended encoding 7 (any number >0 possible)
The trice header looks like this (see v1.0 spec):
11iiiiii iiiiiiii tttttttt tttttttt tttttttt tttttttt nnnnnnnn cccccccc ... // 8 byte for ID
10iiiiii iiiiiiii tttttttt tttttttt nnnnnnnn cccccccc ... // 6 byte for Id
01iiiiii iiiiiiii nnnnnnnn cccccccc ... // 4 byte for id
00... // anything goes for iDn
The target code must implent a iD7
macro and the trice tool must be able to decode 00...
messages acording the passed CLI switch. Different iDn
macros are distinguished with the 00
following bits.
Fix first #323
TRICE( BARE, "isr:Pin is %d\n", value ); // no timestamp
?
A more universal naming could be stamp. S0
, S16
, S32
, S64
or S0
, S2
, S4
, S8