[En-Nut-Discussion] Proposed addition to app/Makerules

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Thu Feb 19 12:12:23 CET 2009


Hallo,

appended patch
- Adds "-R .eeprom" to the rom and bin target
- Adds a BINFLAGS variable  to the hex/rom/bin target

The BINFLAG comes handy if the local Makefile defines additional sections
like:

LDFLAGS += -Wl,--section-start=.aram=0x801100 
LDFLAGS += -Wl,--section-start=.fpga=0x80e000

and these sections should be exclude from the targets too, like

BINFLAGS += -R .aram -R .fpga

Fore me, .aram is additional RAM memory and memory mapped FPGA registers,
that are only detected in main().

Any comments?

Thanks
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: app/Makerules.avr-gcc
===================================================================
--- app/Makerules.avr-gcc	(Revision 970)
+++ app/Makerules.avr-gcc	(Arbeitskopie)
@@ -53,13 +53,13 @@
 	$(ELFCOF) -O coff-ext-avr $< $@
 
 %hex: %elf
-	$(BIN) -R .eeprom -O ihex $< $@
+	$(BIN) -R .eeprom $(BINFLAGS) -O ihex $< $@
 
 %rom: %elf
-	$(BIN) -O ihex $< $@
+	$(BIN) -R .eeprom $(BINFLAGS) -O ihex $< $@
 
 %bin: %elf
-	$(BIN) -O binary $< $@
+	$(BIN) -R .eeprom $(BINFLAGS) -O binary $< $@
 
 %eep: %elf
 	$(BIN) -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 -O ihex $< $@



More information about the En-Nut-Discussion mailing list