Tool/software:
Hi
i have been experimenting with builing in a Linux context (VM; Ubuntu 24.04 LTS; CCSTheia v20.1.0.6_1.7.0).
The following observations are being made
a) There is an error reported due to incorrect parenthesis being set (i think i found the issue already -- see further below)
b) the two include directives after the -mthumb -O0 are empty
this is despite the fact that as per the subdir_rules.mk file there is supposed to be the Projectroot and projectroot/configname folders mentioned which oddly enough are available in the project settings as being set to the correct values
this is with the IDE being started like so:
when instead it is run like below it will generate the correct paths in these include directives
Back to the parenthesis issue:
i found out that once i remove my custom DEBUB_REMOVE macro definition from the project settings (which was defined as below; and working flawless on windows) the issue resolves itself
so apparently CCS on linux has issues with function like macros being defined via the compiler settings directly (instead of a code file)...
quick follow up :
the two issues are not interconnected ie. when the IDE is started without the variables set as already discussed but the DEBUG_REMOVE definition is removed from the project settings the two include directives still have the incorrect value
Marc,
Thank you for reporting these issues. We will try to reproduce the issues, and file bugs to track them if we are able to.
Regards,
Ricky
so apparently CCS on linux has issues with function like macros being defined via the compiler settings directly (instead of a code file)...
Sorry for the delayed response on this. I can reproduce the issue. Like you said, I see the issue on Linux. Windows does not exhibit the issue.
To remove CCS IDE from the equation, I called the compiler directly from the command line. The first call with the DEBUG_REMOVE definition with the parenthesis exhibited the same issue. When removing it, the file builds fine:
on Windows there is no issue:
I'm going to bring this thread to the attention of out compiler expert for more insight.
I think on Linux you can escape the parenthesis like:
DEBUG_REMOVE\(...\)=/*...*/
This is not a compiler question. It is a question about command shell quoting rules. How does the Windows command shell do it? How does the Linux command shell do it? It is not the same. To illustrate, I wrote this short program called echo_cmd_line ...
#include <stdio.h> int main(int argc, char *argv[]) { int i; for (i = 0; i < argc; i++) puts(argv[i]); return 0; }
When I run it on Windows ...
$ .\echo_cmd_line -DDebug_REMOVE(...)=/*...*/ .\echo_cmd_line -DDebug_REMOVE(...)=/*...*/
When I run it on Linux ...
$ ./echo_cmd_line -DDebug_REMOVE(...)=/*...*/ Badly placed ()'s.
In case it matters, the specific Linux shell here is /bin/tcsh. To fix it, I suggest using single quotes ...
$ ./echo_cmd_line '-DDebug_REMOVE(...)=/*...*/' ./echo_cmd_line -DDebug_REMOVE(...)=/*...*/
On every Unix-like shell I have used, single quotes always tells the shell to not process anything inside the quotes, but to pass it on exactly as is. On Windows, double quotes often has the same effect, but I have a vague memory of getting burned a few times.
Thanks and regards,
-George
i know that on linux one can escape the parenthesis -- but i would expect that when someone defines a function like macro in the described manner that the IDE (being aware of the operating system it runs on; obviously) does that for the user
the IDE (being aware of the operating system it runs on; obviously) does that for the user
CCS currently does not account for the shell / OS being used. We can see if it is possible to account for this.