mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-22 19:42:48 +02:00
atusb/fw/Makefile: improve size reporting (show segment sizes)
This commit is contained in:
parent
6416fa8d0b
commit
a9d502850a
@ -1,8 +1,8 @@
|
|||||||
#
|
#
|
||||||
# Makefile - Makefile of the ATUSB firmware
|
# Makefile - Makefile of the ATUSB firmware
|
||||||
#
|
#
|
||||||
# Written 2010-2011 by Werner Almesberger
|
# Written 2010-2011, 2013 by Werner Almesberger
|
||||||
# Copyright 2010-2011 by Werner Almesberger
|
# Copyright 2010-2011, 2013 by Werner Almesberger
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -69,10 +69,12 @@ all: $(NAME).bin boot.hex
|
|||||||
$(NAME).elf: $(OBJS)
|
$(NAME).elf: $(OBJS)
|
||||||
$(MAKE) version.o
|
$(MAKE) version.o
|
||||||
$(CC) $(CFLAGS) -o $@ $(OBJS) version.o
|
$(CC) $(CFLAGS) -o $@ $(OBJS) version.o
|
||||||
|
$(SIZE) $@
|
||||||
|
|
||||||
boot.elf: $(BOOT_OBJS)
|
boot.elf: $(BOOT_OBJS)
|
||||||
$(CC) $(CFLAGS) -o $@ $(BOOT_OBJS) \
|
$(CC) $(CFLAGS) -o $@ $(BOOT_OBJS) \
|
||||||
-Wl,--section-start=.text=$(BOOT_ADDR)
|
-Wl,--section-start=.text=$(BOOT_ADDR)
|
||||||
|
$(SIZE) $@
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
$(BUILD) $(OBJCOPY) -j .text -j .data -O binary $< $@
|
$(BUILD) $(OBJCOPY) -j .text -j .data -O binary $< $@
|
||||||
@ -80,7 +82,7 @@ boot.elf: $(BOOT_OBJS)
|
|||||||
|
|
||||||
%.hex: %.elf
|
%.hex: %.elf
|
||||||
$(BUILD) $(OBJCOPY) -j .text -j .data -O ihex $< $@
|
$(BUILD) $(OBJCOPY) -j .text -j .data -O ihex $< $@
|
||||||
$(SIZE) $@
|
@echo "Size: `$(SIZE) -A boot.hex | sed '/Total */s///p;d'` B"
|
||||||
|
|
||||||
# ----- Cleanup ---------------------------------------------------------------
|
# ----- Cleanup ---------------------------------------------------------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user