summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorLeo C2014-08-12 12:35:28 +0200
committerLeo C2014-08-12 12:35:28 +0200
commitd684c21619905153eff68c43927207248925f6c2 (patch)
treec4bfb04a20512679103c6ad39fd9885dea6d9e76 /configs
parent9b6b4b31e8cb284ad6a68fe16d458e36bbfb46fa (diff)
downloadz180-stamp-d684c21619905153eff68c43927207248925f6c2.zip
New U-Boot like AVR main program.
Uses U-Boot source code taken from: git://git.denx.de/u-boot.git
Diffstat (limited to 'configs')
-rw-r--r--configs/debug.config2
-rw-r--r--configs/gcc.tup40
2 files changed, 41 insertions, 1 deletions
diff --git a/configs/debug.config b/configs/debug.config
index 04be440..1a54f76 100644
--- a/configs/debug.config
+++ b/configs/debug.config
@@ -1 +1 @@
-CONFIG_DEBUG=2
+CONFIG_DEBUG=0
diff --git a/configs/gcc.tup b/configs/gcc.tup
new file mode 100644
index 0000000..ad2d788
--- /dev/null
+++ b/configs/gcc.tup
@@ -0,0 +1,40 @@
+CC = $(TOOLCHAIN)-gcc
+LD = $(TOOLCHAIN)-gcc
+AR = $(TOOLCHAIN)-ar
+AS = $(TOOLCHAIN)-as
+OBJCOPY = $(TOOLCHAIN)-objcopy
+OBJDUMP = $(TOOLCHAIN)-objdump
+SIZE = $(TOOLCHAIN)-size
+GDB = $(TOOLCHAIN)-gdb
+
+
+CFLAGS += -g -Os
+CFLAGS += -std=gnu99
+CFLAGS += -Wall -Wextra
+CFLAGS += -Wredundant-decls
+#CFLAGS += -fno-common -ffunction-sections -fdata-sections
+
+
+LDFLAGS += -Wl,--gc-sections
+LDFLAGS += -Wl,--cref
+
+ifneq ($(LDSCRIPT),)
+LDFLAGS += -T$(LDSCRIPT)
+endif
+
+
+!cc = |> ^ CC %f^ $(CC) $(CFLAGS) $(CPPFLAGS) -c %f -o %o |> %B.o
+!LINK = |> ^ LINK %o^ $(LD) $(CFLAGS) $(LDFLAGS) -Wl,-Map=%O.map %f $(LDLIBS) -o %o |> | %O.map
+!OBJCOPY= |> ^ OBJCOPY %o^ $(OBJCOPY) -Oihex %f %o |>
+!OBJDUMP= |> ^ OBJDUMP %o^ $(OBJDUMP) -h -S %f > %o |> %O.lss
+!SIZE = |> ^ SIZE %f^ $(SIZE) %f |>
+
+
+: foreach $(SRC) | $(PREDEP) |> !cc |> {objs}
+: $(SRC_Z) |> !cc $(CPPFLAGS_Z) |> {objs}
+
+: {objs} |> !LINK |> $(PROG).elf {elf}
+: {elf} |> !OBJCOPY |> %B.hex {aux}
+: {elf} |> !OBJDUMP |> %B.lss {aux}
+: {elf} | {aux} |> !SIZE |>
+