I'm trying to pass a string using the C51 DEFINE directive from command line. i.e. DEFINE(SERIAL="FOOBAR")
When compiling, it is converted to an identifier (FOOBAR) instead of remaining as a string literal ("FOOBAR"). Is there a way to force it to remain as a string literal?
Look at the list file, the quotes are indeed stripped by the compiler.
Try to use backslash '\' on Makefile, command line, and IDE, but it still don't work on all cases. The compiler just strip the quote.
It's not necessarily the Compiler that's doing it - it might be uVision stripping the quotes before they get to the compiler...?
Or it might be something else that happens betwen uVision and the compiler...
Have you tried doubling-up the quotes; eg,
DEFINE(SERIAL=""FOOBAR"")