Date:2011-03-11 20:21:39 (13 years 17 days ago)
Author:Werner Almesberger
Commit:edfb8a94ebc33e6b985b75d208b51b87b945f7b0
Message:atusb/fw/Makefile: clean up handing of boot loader base address

- Makefile (BOOT_ADDR, boot.elf): use variable instead of hiding the
address in a command
- Makefile (CFLAGS): pass BOOT_ADDR as a macro
- Makefile: removed commented-out application flashing code
Files: atusb/fw/Makefile (3 diffs)

Change Details

atusb/fw/Makefile
1414
1515NAME = atusb
1616
17CFLAGS = -g -mmcu=$(CHIP) \
17CFLAGS = -g -mmcu=$(CHIP) -DBOOT_ADDR=$(BOOT_ADDR) \
1818     -Wall -Wextra -Wshadow -Werror -Wno-unused-parameter \
1919     -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
2020
2121CHIP=atmega32u2
2222HOST=jlime
23BOOT_ADDR=0x7000
2324
2425AVR_PREFIX = $(BIN_PATH) avr-
2526CC = $(AVR_PREFIX)gcc
...... 
6768
6869boot.elf: $(BOOT_OBJS)
6970        $(CC) $(CFLAGS) -o $@ $(BOOT_OBJS) \
70          -Wl,--section-start=.text=0x7000
71          -Wl,--section-start=.text=$(BOOT_ADDR)
7172
7273%.bin: %.elf
7374        $(BUILD) $(OBJCOPY) -j .text -j .data -O binary $< $@
...... 
132133          -U hfuse:w:0xde:m \
133134          -U lock:w:0x2f:m
134135
135# -U flash:w:$(NAME).bin:r \
136
137136on:
138137        ssh $(HOST) poke 0x10010318 4
139138

Archive Download the corresponding diff file



interactive