From 8d190cdbb9c4e4377d0c33424e453c5ac166eed8 Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Sun, 10 Jun 2012 16:40:07 +1200 Subject: [PATCH] Renamed platforms to 'native' and 'libftdi' and moved into 'platforms' dir. --- src/Makefile | 12 +++++------- src/{linux => platforms/libftdi}/Makefile.inc | 0 src/{linux => platforms/libftdi}/gdb_if.c | 0 src/{linux => platforms/libftdi}/jtagtap.c | 0 src/{linux => platforms/libftdi}/platform.c | 0 src/{linux => platforms/libftdi}/platform.h | 0 src/{linux => platforms/libftdi}/swdptap.c | 0 src/{stm32 => platforms/native}/Makefile.inc | 2 +- src/{stm32 => platforms/native}/blackmagic.ld | 0 src/{stm32 => platforms/native}/cdcacm.c | 0 src/{stm32 => platforms/native}/gdb_if.c | 0 src/{stm32 => platforms/native}/jtagtap.c | 0 src/{stm32 => platforms/native}/platform.c | 0 src/{stm32 => platforms/native}/platform.h | 0 src/{stm32 => platforms/native}/swdptap.c | 0 src/{stm32 => platforms/native}/traceswo.c | 0 src/{stm32 => platforms/native}/traceswo.h | 0 src/{stm32 => platforms/native}/usbdfu.c | 0 src/{stm32 => platforms/native}/usbuart.c | 0 src/{stm32 => platforms/native}/usbuart.h | 0 20 files changed, 6 insertions(+), 8 deletions(-) rename src/{linux => platforms/libftdi}/Makefile.inc (100%) rename src/{linux => platforms/libftdi}/gdb_if.c (100%) rename src/{linux => platforms/libftdi}/jtagtap.c (100%) rename src/{linux => platforms/libftdi}/platform.c (100%) rename src/{linux => platforms/libftdi}/platform.h (100%) rename src/{linux => platforms/libftdi}/swdptap.c (100%) rename src/{stm32 => platforms/native}/Makefile.inc (90%) rename src/{stm32 => platforms/native}/blackmagic.ld (100%) rename src/{stm32 => platforms/native}/cdcacm.c (100%) rename src/{stm32 => platforms/native}/gdb_if.c (100%) rename src/{stm32 => platforms/native}/jtagtap.c (100%) rename src/{stm32 => platforms/native}/platform.c (100%) rename src/{stm32 => platforms/native}/platform.h (100%) rename src/{stm32 => platforms/native}/swdptap.c (100%) rename src/{stm32 => platforms/native}/traceswo.c (100%) rename src/{stm32 => platforms/native}/traceswo.h (100%) rename src/{stm32 => platforms/native}/usbdfu.c (100%) rename src/{stm32 => platforms/native}/usbuart.c (100%) rename src/{stm32 => platforms/native}/usbuart.h (100%) diff --git a/src/Makefile b/src/Makefile index 3ba0330..37abb00 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,14 +1,12 @@ -ifndef PROBE_HOST -PROBE_HOST = stm32 -endif - -VPATH += $(PROBE_HOST) +PROBE_HOST ?= native +PLATFORM_DIR = platforms/$(PROBE_HOST) +VPATH += $(PLATFORM_DIR) BUILDDATE := `date +"%Y%m%d"` CFLAGS += -Wall -Wextra -Wno-pointer-sign -Wno-char-subscripts\ -O2 -std=gnu99 -g3 -DBUILDDATE=\"$(BUILDDATE)\"\ - -I. -Iinclude -I$(PROBE_HOST) \ + -I. -Iinclude -I$(PLATFORM_DIR) \ -DVERSION_SUFFIX=\"`../scripts/setlocalversion`\" -MD SRC = gdb_if.c \ @@ -32,7 +30,7 @@ SRC = gdb_if.c \ stm32f4.c \ crc32.c \ -include $(PROBE_HOST)/Makefile.inc +include $(PLATFORM_DIR)/Makefile.inc OBJ = $(SRC:.c=.o) diff --git a/src/linux/Makefile.inc b/src/platforms/libftdi/Makefile.inc similarity index 100% rename from src/linux/Makefile.inc rename to src/platforms/libftdi/Makefile.inc diff --git a/src/linux/gdb_if.c b/src/platforms/libftdi/gdb_if.c similarity index 100% rename from src/linux/gdb_if.c rename to src/platforms/libftdi/gdb_if.c diff --git a/src/linux/jtagtap.c b/src/platforms/libftdi/jtagtap.c similarity index 100% rename from src/linux/jtagtap.c rename to src/platforms/libftdi/jtagtap.c diff --git a/src/linux/platform.c b/src/platforms/libftdi/platform.c similarity index 100% rename from src/linux/platform.c rename to src/platforms/libftdi/platform.c diff --git a/src/linux/platform.h b/src/platforms/libftdi/platform.h similarity index 100% rename from src/linux/platform.h rename to src/platforms/libftdi/platform.h diff --git a/src/linux/swdptap.c b/src/platforms/libftdi/swdptap.c similarity index 100% rename from src/linux/swdptap.c rename to src/platforms/libftdi/swdptap.c diff --git a/src/stm32/Makefile.inc b/src/platforms/native/Makefile.inc similarity index 90% rename from src/stm32/Makefile.inc rename to src/platforms/native/Makefile.inc index 8daed4f..3bddde9 100644 --- a/src/stm32/Makefile.inc +++ b/src/platforms/native/Makefile.inc @@ -4,7 +4,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy CFLAGS += -Istm32/include -mcpu=cortex-m3 -mthumb -DSTM32F1 LDFLAGS_BOOT = -lopencm3_stm32f1 -Wl,--defsym,_stack=0x20005000 \ - -Wl,-T,stm32/blackmagic.ld -nostartfiles -lc -lnosys -Wl,-Map=mapfile \ + -Wl,-T,$(PLATFORM_DIR)/blackmagic.ld -nostartfiles -lc -lnosys -Wl,-Map=mapfile \ -mthumb -mcpu=cortex-m3 -Wl,-gc-sections LDFLAGS = $(LDFLAGS_BOOT) -Wl,-Ttext=0x8002000 diff --git a/src/stm32/blackmagic.ld b/src/platforms/native/blackmagic.ld similarity index 100% rename from src/stm32/blackmagic.ld rename to src/platforms/native/blackmagic.ld diff --git a/src/stm32/cdcacm.c b/src/platforms/native/cdcacm.c similarity index 100% rename from src/stm32/cdcacm.c rename to src/platforms/native/cdcacm.c diff --git a/src/stm32/gdb_if.c b/src/platforms/native/gdb_if.c similarity index 100% rename from src/stm32/gdb_if.c rename to src/platforms/native/gdb_if.c diff --git a/src/stm32/jtagtap.c b/src/platforms/native/jtagtap.c similarity index 100% rename from src/stm32/jtagtap.c rename to src/platforms/native/jtagtap.c diff --git a/src/stm32/platform.c b/src/platforms/native/platform.c similarity index 100% rename from src/stm32/platform.c rename to src/platforms/native/platform.c diff --git a/src/stm32/platform.h b/src/platforms/native/platform.h similarity index 100% rename from src/stm32/platform.h rename to src/platforms/native/platform.h diff --git a/src/stm32/swdptap.c b/src/platforms/native/swdptap.c similarity index 100% rename from src/stm32/swdptap.c rename to src/platforms/native/swdptap.c diff --git a/src/stm32/traceswo.c b/src/platforms/native/traceswo.c similarity index 100% rename from src/stm32/traceswo.c rename to src/platforms/native/traceswo.c diff --git a/src/stm32/traceswo.h b/src/platforms/native/traceswo.h similarity index 100% rename from src/stm32/traceswo.h rename to src/platforms/native/traceswo.h diff --git a/src/stm32/usbdfu.c b/src/platforms/native/usbdfu.c similarity index 100% rename from src/stm32/usbdfu.c rename to src/platforms/native/usbdfu.c diff --git a/src/stm32/usbuart.c b/src/platforms/native/usbuart.c similarity index 100% rename from src/stm32/usbuart.c rename to src/platforms/native/usbuart.c diff --git a/src/stm32/usbuart.h b/src/platforms/native/usbuart.h similarity index 100% rename from src/stm32/usbuart.h rename to src/platforms/native/usbuart.h