trice icon indicating copy to clipboard operation
trice copied to clipboard

Invent 0, t, T for id(0), Id(0), ID(0)

Open rokath opened this issue 1 year ago • 5 comments

rokath avatar Aug 20 '22 20:08 rokath

Write update test for Id, than id and ID, same with -z switch.

rokath avatar Aug 21 '22 21:08 rokath

_, t, T ? noTimeStamp, timeStamp16, timeStamp32 ? 0, 2, 4 ? TS0, TS16, TS32 id(0), Id(0), ID(0) seams to be ok

rokath avatar Aug 23 '22 16:08 rokath

Does not add value.

rokath avatar Aug 27 '22 17:08 rokath

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.

rokath avatar Aug 28 '22 17:08 rokath

Fix first #323

rokath avatar Aug 28 '22 20:08 rokath

TRICE( BARE, "isr:Pin is %d\n", value ); // no timestamp ?

rokath avatar Sep 30 '22 03:09 rokath

A more universal naming could be stamp. S0, S16, S32, S64 or S0, S2, S4, S8

rokath avatar Oct 08 '22 15:10 rokath