Hi,
We are building our project with nRF52811 and Segger Studio V5.34. (I have Ubuntu 1804 if it helps.)
We have certain variable configurations but would like the ability to build the project without having to change the source files, i.e. the ability to modify/define a handful of macro definitions.
We are using a custom script to call "embuild" with
./emBuild -config Release -rebuild [....]beacon.emProject
And it's been workin well for us.
However, we'd also like the ability to modify a handful of macro #defined values, for example: to go with C source code:
#ifdef CODE_VERSION_DEF // also tried #if // something #else #warning "CODE_VERSION_DEF is not defined" // something else #endif
We've found there is a
-D 'macro'='value' set the value of a global macrooption with "emBuild" but when we pass
-D CODE_VERSION_DEF=0x00000001to building command, and use -show, or -echo to show us the actual commands being used, but the new -D commands are not present in the building process.
I've found this page with Segger's official documentation, but sadly, it doesn't give me an example or specific use cases.
Would you guys be able to help us figure out whether this is a supported use case, or if the -D option meant something entirely differently?
Thanks!
Siyuan