Closed saphieron closed 4 years ago
Your example fails, because copts expects an array of strings. Also you should see an error message that tells you that the + operator is not defined for the combination of strings and arrays.
copts = cpu_frequency_flag() + ["-DDEBUG=1"]
should work.
Leaving the issue open since having this in the documentation wouldn't hurt.
Added in 299e1d9633b2f9d50b2fe4c35b4632e391068159. If there is still something unclear, reopening this issue may be a good idea.
Under https://github.com/es-ude/EmbeddedSystemsBuildScripts#macros the copts option is defined with copts = cpu_frequency_flag(),
which presumably defines the CPU frequency. However it is unclear, how that macro call can be extended to be used with other copts. Using the intuitiv step of e.g. copts = cpu_frequency_flag() + "-DDEBUG=1" does raise an error. It is unclear how to use this. Other copts statements however use + to add the different strings.
An example how to extend the copts is required in the documentation.