-
-
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
#define TRICE_CLEAN 1 results in compiler error triceStaticBuffer.c:9:28: error: 'TRICE_BUFFER_SIZE' undeclared here #515
Comments
Please check out ./src/triceDefaultcCnfig.h. It contains all default definitions with documentation. You may need to rebuild your trice library. |
I will remove all defaults from the triceConfig.h. One question: does the trice tool need to be run first before building trice as a lib if TRICE_CLEAN is enabled? For clarification: I could try to also run the trice tool before building the trice static lib. |
What Trice does, is insert and clean IDs in source code. The Trice code itself does not have any IDs. So when building your Trice library only with Trice code from the ./src folder a Trice run is not needed. But if you include any other files containing Trice statements, a Trice run is mandatory, when you want to edit your code without inserted IDs. Please do not deal with TRICE_CLEAN. Only insert |
thanks for the quick response! so the triceCongig.h is not needed for compiling trice as a lib? in this case i would just add the triceConfig.h to my project or is the triceConfig.h needed to compile the trice lib but the my main intention to activating
this warning is from a project compilation run with the old trice version v0.62.1 |
The triceConfig.h is mandatory for the trice code. It controls which parts of the trice code are included. I see no big advantage having a trice library, because it would work only with unchanged settings in the project specific triceConfig.h. Once the trice source files are translated, their objects are rebuilt automatically and only when the thriceConfig.h is changed. So only the linker has a bit less to do when it finds a trice library compared to a bunch of trice objects. But does that influence the build time heavily? The triceConfig.h is the only part of the trice sources which should be modified by the users. It is ment to be a individual part of the user projects. The examples folder shows the usage. TRICE_CLEAN==1 changes all Trice macros into empty ones. It is used only to silence sophisticated editors. In the cleaned state, when the IDs are removed from the files, the editor could underline the Trice macros indicating a false positive. If you want to disable Trice macros use TRICE_OFF. Look in the TriceUserManual.md too. |
Describe the bug
I updated from v0.62.1 to v72.5. I build trice as a static lib an link it into my project. I wanted to enable TRICE_CLEAN,
but this results in a compiler error:
it seems like the block which is defining TRICE_BUFFER_SIZE or my triceConfig.h is not compatible since the new examples are way shorter and offer less explanation.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
i would expect trice to compile, is there a detailed triceConfig.h template available like i used? Or are the triceConfig.h now just simplified?
Desktop (please complete the following information):
Additional Context
without TRICE_CLEAN it works.
The text was updated successfully, but these errors were encountered: