mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-22 18:50:37 +02:00
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
This commit is contained in:
parent
021ccdec93
commit
edfb8a94eb
@ -14,12 +14,13 @@ SHELL = /bin/bash
|
||||
|
||||
NAME = atusb
|
||||
|
||||
CFLAGS = -g -mmcu=$(CHIP) \
|
||||
CFLAGS = -g -mmcu=$(CHIP) -DBOOT_ADDR=$(BOOT_ADDR) \
|
||||
-Wall -Wextra -Wshadow -Werror -Wno-unused-parameter \
|
||||
-Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
|
||||
|
||||
CHIP=atmega32u2
|
||||
HOST=jlime
|
||||
BOOT_ADDR=0x7000
|
||||
|
||||
AVR_PREFIX = $(BIN_PATH) avr-
|
||||
CC = $(AVR_PREFIX)gcc
|
||||
@ -67,7 +68,7 @@ $(NAME).elf: $(OBJS)
|
||||
|
||||
boot.elf: $(BOOT_OBJS)
|
||||
$(CC) $(CFLAGS) -o $@ $(BOOT_OBJS) \
|
||||
-Wl,--section-start=.text=0x7000
|
||||
-Wl,--section-start=.text=$(BOOT_ADDR)
|
||||
|
||||
%.bin: %.elf
|
||||
$(BUILD) $(OBJCOPY) -j .text -j .data -O binary $< $@
|
||||
@ -132,8 +133,6 @@ prog:
|
||||
-U hfuse:w:0xde:m \
|
||||
-U lock:w:0x2f:m
|
||||
|
||||
# -U flash:w:$(NAME).bin:r \
|
||||
|
||||
on:
|
||||
ssh $(HOST) poke 0x10010318 4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user