-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
invalid use of Trice0 will misbehave trice insert #465
Comments
Am I understand you right, that the first line causes the trice tool not to insert further IDs in that file? That's indeed an issue. Unfortunately I am not a parser expert and the trice tool is somehow limited. There is probably no quick fix right now. See also comment in https://github.com/rokath/trice/blob/master/internal/id/insertIDs.go near line 280. |
also, it happens with clean too. |
Yes, it is the same parser. I am going to add a chapter about that to https://github.com/rokath/trice/blob/master/docs/TriceUserGuide.md#9-additional-hints. |
The following sequence inside // Depending on mode, either print this string to
// UART (mode 0), or the Trice write buffer (mode 200).
TRICE( Id( 4030),"Hello, TRICE, %d\n", 42);
// TRICE() with a string parameter only is problematic.
// See discussion on https://github.com/rokath/trice/issues/279
// TRICE0() works in either case
#ifdef __STRICT_ANSI__
// if compiled with e.g. --std=c99
TRICE0( Id( 4683),"Hello, TRICE\n");
#else
TRICE( Id( 2926),"Hello, TRICE\n");
TRICE0( Id( 7263),"Hello, TRICE0()\n");
#endif gets changed into // Depending on mode, either print this string to
// UART (mode 0), or the Trice write buffer (mode 200).
TRICE(Id(0), "Hello, TRICE, %d\n", 42);
// TRICE(Id(0), "Hello, TRICE\n");
#else
TRICE(Id(0), "Hello, TRICE\n");
TRICE0(Id(0), "Hello, TRICE0()\n");
#endif so these lines are disappearing: // TRICE() with a string parameter only is problematic.
// See discussion on https://github.com/rokath/trice/issues/279
// TRICE0() works in either case
#ifdef __STRICT_ANSI__
// if compiled with e.g. --std=c99 when running |
I propose to close this issue for less issue noise. Normal usage is |
Trice0( variable ); // invalid use
Trice0( "text %u", variable ); // invalid use
Will cause that the next Trices will be ignored or not updated.
(also if Trice0 are // commented)
See also: #464
The text was updated successfully, but these errors were encountered: