From 9c37d18b9c70fdb70dfec453398c4649e9e57586 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 13 May 2013 20:18:01 +0300 Subject: [PATCH] Reorganize the directory structure These were forked off the r2c2 repo since especially the s88w stuff is not tied to it. --- .gitignore | 2 ++ firmware/Makefile => common/build.mk | 8 +++----- {firmware => common}/delay.h | 0 {firmware => common}/eeprom.c | 0 {firmware => common}/eeprom.h | 0 {firmware => common}/lcd.c | 0 {firmware => common}/lcd.h | 0 {firmware => common}/serial.c | 0 {firmware => common}/serial.h | 0 {firmware => common}/timer.c | 0 {firmware => common}/timer.h | 0 misc/Makefile | 1 + {firmware => misc}/ctrl.c | 0 s88w/Makefile | 6 ++++++ {firmware => s88w}/s88w-r.c | 0 {firmware => s88w}/s88w-t.c | 0 {firmware => s88w}/s88w-t.svg | 0 17 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 .gitignore rename firmware/Makefile => common/build.mk (84%) rename {firmware => common}/delay.h (100%) rename {firmware => common}/eeprom.c (100%) rename {firmware => common}/eeprom.h (100%) rename {firmware => common}/lcd.c (100%) rename {firmware => common}/lcd.h (100%) rename {firmware => common}/serial.c (100%) rename {firmware => common}/serial.h (100%) rename {firmware => common}/timer.c (100%) rename {firmware => common}/timer.h (100%) create mode 100644 misc/Makefile rename {firmware => misc}/ctrl.c (100%) create mode 100644 s88w/Makefile rename {firmware => s88w}/s88w-r.c (100%) rename {firmware => s88w}/s88w-t.c (100%) rename {firmware => s88w}/s88w-t.svg (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d6c2e45 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.elf +*.hex diff --git a/firmware/Makefile b/common/build.mk similarity index 84% rename from firmware/Makefile rename to common/build.mk index b92db65..96d0f93 100644 --- a/firmware/Makefile +++ b/common/build.mk @@ -1,8 +1,7 @@ MCU := atmega328p CLOCK := 16000000 CC := avr-gcc -FEATURES := LCD_SHIFTREG LCD_ASYNC -CFLAGS := -Wall -Os -ffunction-sections -fdata-sections -mmcu=$(MCU) -DF_CPU=$(CLOCK) $(patsubst %,-D%,$(FEATURES)) +CFLAGS := -Wall -Os -ffunction-sections -fdata-sections -mmcu=$(MCU) -DF_CPU=$(CLOCK) $(patsubst %,-D%,$(FEATURES)) -I../common LDFLAGS := -Os -Wl,--gc-sections -mmcu=$(MCU) AVRDUDE := avrdude OBJCOPY := avr-objcopy @@ -12,6 +11,8 @@ else BAUD := 57600 endif +VPATH := ../common + help: @echo "Targets:" @echo " %.hex: Build firmware from %.c" @@ -39,6 +40,3 @@ clean: $(RM) *.hex $(RM) *.elf $(RM) *.o - -s88w-t.elf: serial.o timer.o eeprom.o -s88w-r.elf: serial.o lcd.o timer.o diff --git a/firmware/delay.h b/common/delay.h similarity index 100% rename from firmware/delay.h rename to common/delay.h diff --git a/firmware/eeprom.c b/common/eeprom.c similarity index 100% rename from firmware/eeprom.c rename to common/eeprom.c diff --git a/firmware/eeprom.h b/common/eeprom.h similarity index 100% rename from firmware/eeprom.h rename to common/eeprom.h diff --git a/firmware/lcd.c b/common/lcd.c similarity index 100% rename from firmware/lcd.c rename to common/lcd.c diff --git a/firmware/lcd.h b/common/lcd.h similarity index 100% rename from firmware/lcd.h rename to common/lcd.h diff --git a/firmware/serial.c b/common/serial.c similarity index 100% rename from firmware/serial.c rename to common/serial.c diff --git a/firmware/serial.h b/common/serial.h similarity index 100% rename from firmware/serial.h rename to common/serial.h diff --git a/firmware/timer.c b/common/timer.c similarity index 100% rename from firmware/timer.c rename to common/timer.c diff --git a/firmware/timer.h b/common/timer.h similarity index 100% rename from firmware/timer.h rename to common/timer.h diff --git a/misc/Makefile b/misc/Makefile new file mode 100644 index 0000000..c7b57b4 --- /dev/null +++ b/misc/Makefile @@ -0,0 +1 @@ +include ../common/build.mk diff --git a/firmware/ctrl.c b/misc/ctrl.c similarity index 100% rename from firmware/ctrl.c rename to misc/ctrl.c diff --git a/s88w/Makefile b/s88w/Makefile new file mode 100644 index 0000000..5018b01 --- /dev/null +++ b/s88w/Makefile @@ -0,0 +1,6 @@ +FEATURES := LCD_SHIFTREG LCD_ASYNC + +include ../common/build.mk + +s88w-t.elf: serial.o timer.o eeprom.o +s88w-r.elf: serial.o lcd.o timer.o diff --git a/firmware/s88w-r.c b/s88w/s88w-r.c similarity index 100% rename from firmware/s88w-r.c rename to s88w/s88w-r.c diff --git a/firmware/s88w-t.c b/s88w/s88w-t.c similarity index 100% rename from firmware/s88w-t.c rename to s88w/s88w-t.c diff --git a/firmware/s88w-t.svg b/s88w/s88w-t.svg similarity index 100% rename from firmware/s88w-t.svg rename to s88w/s88w-t.svg -- 2.45.2