Skip to content

Handling of preprocessor-defined strings in TRICE macro #293

Description

@escherstair

I found this situation while adapting my old printf source code to Trice.
Here there are useful information on how to handle strings.
I've just found another situation where a constant string is defined through a preoprocessor macro.
As an example
#define VERSION_STRING "1.0.0"
How should this be handled?
I tried with
TRICE("The version is:"VERSION_STRING);
but trice tool receives the message
The version is VERSION_STRING
and I think the reason is that as reported ion the User Guide,

string concatenation within TRICE macros is untested and expected not to work. The reason lays inside the way the update tool works (right now)

Which is the optimal way to handle this kind of strings (known at compile time) at the moment?
Thanks

In a long term roadmap, this could be an improvement of the update feature of the trice tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions