From 3a4f36d80f2a8fd93727fc6d024b48f0a7511c9f Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Fri, 22 Jan 2010 12:04:40 +0100 Subject: [PATCH] Moved all examples to a board specific folder. --- examples/Makefile | 28 +++------- examples/STM32-H103/Makefile | 51 +++++++++++++++++++ examples/{ => STM32-H103}/fancyblink/Makefile | 2 +- examples/{ => STM32-H103}/fancyblink/README | 0 .../{ => STM32-H103}/fancyblink/fancyblink.c | 0 .../{ => STM32-H103}/fancyblink/fancyblink.ld | 0 examples/{ => STM32-H103}/miniblink/Makefile | 2 +- examples/{ => STM32-H103}/miniblink/README | 0 .../{ => STM32-H103}/miniblink/miniblink.c | 0 .../{ => STM32-H103}/miniblink/miniblink.ld | 0 examples/{ => STM32-H103}/usart/Makefile | 2 +- examples/{ => STM32-H103}/usart/README | 0 examples/{ => STM32-H103}/usart/usart.c | 0 examples/{ => STM32-H103}/usart/usart.ld | 0 14 files changed, 62 insertions(+), 23 deletions(-) create mode 100644 examples/STM32-H103/Makefile rename examples/{ => STM32-H103}/fancyblink/Makefile (99%) rename examples/{ => STM32-H103}/fancyblink/README (100%) rename examples/{ => STM32-H103}/fancyblink/fancyblink.c (100%) rename examples/{ => STM32-H103}/fancyblink/fancyblink.ld (100%) rename examples/{ => STM32-H103}/miniblink/Makefile (99%) rename examples/{ => STM32-H103}/miniblink/README (100%) rename examples/{ => STM32-H103}/miniblink/miniblink.c (100%) rename examples/{ => STM32-H103}/miniblink/miniblink.ld (100%) rename examples/{ => STM32-H103}/usart/Makefile (99%) rename examples/{ => STM32-H103}/usart/README (100%) rename examples/{ => STM32-H103}/usart/usart.c (100%) rename examples/{ => STM32-H103}/usart/usart.ld (100%) diff --git a/examples/Makefile b/examples/Makefile index d0f25f3d..4defad25 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,7 +1,7 @@ ## ## This file is part of the libopenstm32 project. ## -## Copyright (C) 2009 Uwe Hermann +## Copyright (C) 2010 Piotr Esden-Tempski ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -25,27 +25,15 @@ ifneq ($(V),1) Q := @ endif -all: miniblink fancyblink usart +all: STM32-H103 -miniblink: - @printf " BUILD miniblink\n" - $(Q)$(MAKE) -C miniblink - -fancyblink: - @printf " BUILD fancyblink\n" - $(Q)$(MAKE) -C fancyblink - -usart: - @printf " BUILD usart\n" - $(Q)$(MAKE) -C usart +STM32-H103: + @printf " BUILD STM32-H103 examples\n" + $(Q)$(MAKE) -C STM32-H103 clean: - @printf " CLEAN miniblink\n" - $(Q)$(MAKE) -C miniblink clean - @printf " CLEAN fancyblink\n" - $(Q)$(MAKE) -C fancyblink clean - @printf " CLEAN usart\n" - $(Q)$(MAKE) -C usart clean + @printf " CLEAN STM32-H103 examples\n" + $(Q)$(MAKE) -C STM32-H103 clean -.PHONY: miniblink fancyblink usart clean +.PHONY: STM32-H103 clean diff --git a/examples/STM32-H103/Makefile b/examples/STM32-H103/Makefile new file mode 100644 index 00000000..d0f25f3d --- /dev/null +++ b/examples/STM32-H103/Makefile @@ -0,0 +1,51 @@ +## +## This file is part of the libopenstm32 project. +## +## Copyright (C) 2009 Uwe Hermann +## +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . +## + +# Do not print "Entering directory ...". +## MAKEFLAGS += --no-print-directory + +# Be silent per default, but 'make V=1' will show all compiler calls. +ifneq ($(V),1) +Q := @ +endif + +all: miniblink fancyblink usart + +miniblink: + @printf " BUILD miniblink\n" + $(Q)$(MAKE) -C miniblink + +fancyblink: + @printf " BUILD fancyblink\n" + $(Q)$(MAKE) -C fancyblink + +usart: + @printf " BUILD usart\n" + $(Q)$(MAKE) -C usart + +clean: + @printf " CLEAN miniblink\n" + $(Q)$(MAKE) -C miniblink clean + @printf " CLEAN fancyblink\n" + $(Q)$(MAKE) -C fancyblink clean + @printf " CLEAN usart\n" + $(Q)$(MAKE) -C usart clean + +.PHONY: miniblink fancyblink usart clean + diff --git a/examples/fancyblink/Makefile b/examples/STM32-H103/fancyblink/Makefile similarity index 99% rename from examples/fancyblink/Makefile rename to examples/STM32-H103/fancyblink/Makefile index e2bc0db1..0d19fda0 100644 --- a/examples/fancyblink/Makefile +++ b/examples/STM32-H103/fancyblink/Makefile @@ -27,7 +27,7 @@ OBJCOPY = $(PREFIX)-objcopy OBJDUMP = $(PREFIX)-objdump # Uncomment this line if you want to use the installed (not local) library. # TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX) -TOOLCHAIN_DIR = ../.. +TOOLCHAIN_DIR = ../../.. CFLAGS = -O0 -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \ -mcpu=cortex-m3 -mthumb LDSCRIPT = $(BINARY).ld diff --git a/examples/fancyblink/README b/examples/STM32-H103/fancyblink/README similarity index 100% rename from examples/fancyblink/README rename to examples/STM32-H103/fancyblink/README diff --git a/examples/fancyblink/fancyblink.c b/examples/STM32-H103/fancyblink/fancyblink.c similarity index 100% rename from examples/fancyblink/fancyblink.c rename to examples/STM32-H103/fancyblink/fancyblink.c diff --git a/examples/fancyblink/fancyblink.ld b/examples/STM32-H103/fancyblink/fancyblink.ld similarity index 100% rename from examples/fancyblink/fancyblink.ld rename to examples/STM32-H103/fancyblink/fancyblink.ld diff --git a/examples/miniblink/Makefile b/examples/STM32-H103/miniblink/Makefile similarity index 99% rename from examples/miniblink/Makefile rename to examples/STM32-H103/miniblink/Makefile index 803b0071..db85a8ca 100644 --- a/examples/miniblink/Makefile +++ b/examples/STM32-H103/miniblink/Makefile @@ -27,7 +27,7 @@ OBJCOPY = $(PREFIX)-objcopy OBJDUMP = $(PREFIX)-objdump # Uncomment this line if you want to use the installed (not local) library. # TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX) -TOOLCHAIN_DIR = ../.. +TOOLCHAIN_DIR = ../../.. CFLAGS = -O0 -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \ -mcpu=cortex-m3 -mthumb LDSCRIPT = $(BINARY).ld diff --git a/examples/miniblink/README b/examples/STM32-H103/miniblink/README similarity index 100% rename from examples/miniblink/README rename to examples/STM32-H103/miniblink/README diff --git a/examples/miniblink/miniblink.c b/examples/STM32-H103/miniblink/miniblink.c similarity index 100% rename from examples/miniblink/miniblink.c rename to examples/STM32-H103/miniblink/miniblink.c diff --git a/examples/miniblink/miniblink.ld b/examples/STM32-H103/miniblink/miniblink.ld similarity index 100% rename from examples/miniblink/miniblink.ld rename to examples/STM32-H103/miniblink/miniblink.ld diff --git a/examples/usart/Makefile b/examples/STM32-H103/usart/Makefile similarity index 99% rename from examples/usart/Makefile rename to examples/STM32-H103/usart/Makefile index 85933996..432446d7 100644 --- a/examples/usart/Makefile +++ b/examples/STM32-H103/usart/Makefile @@ -27,7 +27,7 @@ OBJCOPY = $(PREFIX)-objcopy OBJDUMP = $(PREFIX)-objdump # Uncomment this line if you want to use the installed (not local) library. # TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX) -TOOLCHAIN_DIR = ../.. +TOOLCHAIN_DIR = ../../.. CFLAGS = -O0 -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \ -mcpu=cortex-m3 -mthumb LDSCRIPT = $(BINARY).ld diff --git a/examples/usart/README b/examples/STM32-H103/usart/README similarity index 100% rename from examples/usart/README rename to examples/STM32-H103/usart/README diff --git a/examples/usart/usart.c b/examples/STM32-H103/usart/usart.c similarity index 100% rename from examples/usart/usart.c rename to examples/STM32-H103/usart/usart.c diff --git a/examples/usart/usart.ld b/examples/STM32-H103/usart/usart.ld similarity index 100% rename from examples/usart/usart.ld rename to examples/STM32-H103/usart/usart.ld