Part Number: CC3220
Tool/software: TI C/C++ Compiler
I have a #define for a string that contains another #define of the firmware version. I have used this method successfully on other compilers, but the TI one does not seem to like it.
// This doesn’t compile I get an error “expected a ;”
#define FIRMWARE VERSION "V0.0.1"
#define MQTT_WILL_MESSAGE "{\"firmware\":\""FIRMWARE_VERSION"\",\"code\":\"WILL_MESSAGE\"}"
// This does compile and I just manually did the text replacement
#define MQTT_WILL_MESSAGE "{\"firmware\":\"""V0.0.1""\",\"code\":\"WILL_MESSAGE\"}"
Any workarounds or ideas?