avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] How can I "#define" a string in the Makefile?


From: Russell Shaw
Subject: Re: [avr-gcc-list] How can I "#define" a string in the Makefile?
Date: Sat, 01 Nov 2003 02:10:25 +1100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030311 Debian/1.2.1-10

Bob Paddock wrote:


How can I "#define" a string in the Makefile?

Simple ones like "-DUSE_LCDDISP=1" work fine but
doing this:

CFLAGS = -g -O$(OPT) ... -DUSE_LCDDISP=1 -DFIRMWARE_REV_STR="1.23" ...

results in the error "invalid initializer" on this line:

/* Displayed as part of sign on message: */
static CONST char FLASH Firmware_Prj_str[] PROGMEM = FIRMWARE_REV_STR;

Is there some kind of shell escaping I should be accounting for?

Does this work?:

  static CONST char FLASH Firmware_Prj_str[] PROGMEM = "1.23";



reply via email to

[Prev in Thread] Current Thread [Next in Thread]