Fix building AVR hex files
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
CC=avr-gcc -mmcu=$(EC)
|
CC=avr-gcc -mmcu=$(EC)
|
||||||
|
CFLAGS+=-Os -fstack-usage -Wall -Wl,--gc-sections -Wl,-u,vfprintf -lprintf_flt
|
||||||
OBJ=$(patsubst src/%.c,$(BUILD)/%.o,$(SRC))
|
OBJ=$(patsubst src/%.c,$(BUILD)/%.o,$(SRC))
|
||||||
|
|
||||||
# Run EC rom in simulator
|
# Run EC rom in simulator
|
||||||
@ -11,7 +12,7 @@ $(BUILD)/ec.rom: $(BUILD)/ec.ihx
|
|||||||
makebin -p < $< > $@
|
makebin -p < $< > $@
|
||||||
|
|
||||||
# Convert from ELF file to Intel Hex file
|
# Convert from ELF file to Intel Hex file
|
||||||
$(BUILD)/ec.ihx: $(OBJ)
|
$(BUILD)/ec.ihx: $(BUILD)/ec.elf
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
avr-objcopy -j .text -j .data -O ihex $< $@
|
avr-objcopy -j .text -j .data -O ihex $< $@
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user