From fc353a447c9be6865aaeddec34b1b3d40b0cf070 Mon Sep 17 00:00:00 2001 From: Kevin Rosenberg Date: Wed, 9 Apr 2008 17:18:21 -0600 Subject: [PATCH] improve makefiles --- iar_c/Makefile | 4 ++-- icc_c/Makefile | 6 +++--- serial_lcd.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/iar_c/Makefile b/iar_c/Makefile index 949ac7c..304b256 100644 --- a/iar_c/Makefile +++ b/iar_c/Makefile @@ -9,10 +9,10 @@ CC = /Program Files/IAR Systems/Embedded Workbench 5.0/avr/bin/iccavr.exe LD = /Program Files/IAR Systems/Embedded Workbench 5.0/avr/bin/xlink.exe ## Compile options common for all C compilation units. -CFLAGS = --cpu $(MCU) -lA $(PROJECT).lst -z9 -e --lock_regs 4 -D ENABLE_BIT_DEFINITIONS +CFLAGS = --cpu $(MCU) -l $(PROJECT).lst -s9 -e --lock_regs 4 -D ENABLE_BIT_DEFINITIONS ## Linker flags -LDFLAGS = -Fubrof9 -xm -xs -f '/Program Files/IAR Systems/Embedded Workbench 5.0/avr/config/lnktiny2313t.xcl' -l $(PROJECT).map -s main +LDFLAGS = -Fubrof9 -xm -xs -xe -xn -xo -f '/Program Files/IAR Systems/Embedded Workbench 5.0/avr/config/lnktiny2313t.xcl' -l $(PROJECT).map -s main LIBS = '/Program Files/IAR Systems/Embedded Workbench 5.0/avr/lib/clib/cl0t.r90' ## Include Directories diff --git a/icc_c/Makefile b/icc_c/Makefile index e039509..f3c232a 100644 --- a/icc_c/Makefile +++ b/icc_c/Makefile @@ -9,7 +9,7 @@ CC = iccavr OBJECTS = $(PROJECT).o ## Compile options common for all C compilation units. -CFLAGS = -e -D__ICC_VERSION="7.16A" -DATtiny2313 -l -A -A -g -Wf-r20_23 -O24 +CFLAGS = -g -e -D__ICC_VERSION="7.16A" -DATtiny2313 -l -A -A -Wf-r20_23 -O24 ## Linker flags LDFLAGS = -g -e:0x0800 -bfunc_lit:0x26.0x800 -dram_end:0xdf -bdata:0x60.0xdf -dhwstk_size:30 -beeprom:0.128 -fihx_coff -S2 @@ -27,11 +27,11 @@ LINKONLYOBJECTS = all: $(TARGET) ## Compile -$(PROJECT).o: ../serial_lcd.c +$(PROJECT).o: ../$(PROJECT).c $(CC) -c $(CFLAGS) $(INCLUDES) $< $(TARGET): $(OBJECTS) - $(CC) -o SERIAL_LCD $(LDFLAGS) $(OBJECTS) -lcavrgr + $(CC) -o $(project) $(LDFLAGS) $(OBJECTS) -lcavrgr ## Clean target .PHONY: distclean diff --git a/serial_lcd.h b/serial_lcd.h index ae4a58e..9d44398 100644 --- a/serial_lcd.h +++ b/serial_lcd.h @@ -169,7 +169,7 @@ typedef __flash unsigned int prog_uint32_t; #define FLASH_DECLARE(x) flash x #define ASM(a) #asm(a) -#define NOP() #asm("nop"); +#define NOP() #asm("nop") #define cli() #asm("cli") #define sei() #asm("sei") #define wdt_reset() #asm("wdr") -- 2.34.1