mirror of
https://github.com/hoglet67/AtomBusMon.git
synced 2024-12-22 16:30:06 +00:00
Build: simplfy makefile by outputting a .bin file
Change-Id: I85cea0011a819fff3789e121a89af05b24ddfbd7
This commit is contained in:
parent
da3651abf2
commit
c2e80e2e4c
@ -37,13 +37,11 @@ working/$(PROJECT).bit:
|
||||
$(TARGET).bit: $(PROG).mem working/$(PROJECT).bit
|
||||
data2mem -bm $(BMM_FILE) -bd $(PROG).mem -bt working/$(PROJECT).bit -o b $(TARGET).bit
|
||||
|
||||
$(PROG).mem: $(PROG).hex
|
||||
srec_cat $< -Intel -Byte_Swap 2 -Data_Only -o tmp.mem -vmem 8
|
||||
gawk ' BEGIN{FS=" ";} { $$1= ""; print}' tmp.mem > $@
|
||||
rm tmp.mem
|
||||
$(PROG).mem: $(PROG).bin
|
||||
od -An -tx1 -w16 -v <$(PROG).bin >$(PROG).mem
|
||||
|
||||
$(PROG).hex : $(PROG).out
|
||||
$(OBJCOPY) -R .eeprom -O ihex $(PROG).out $(PROG).hex
|
||||
$(PROG).bin : $(PROG).out
|
||||
$(OBJCOPY) -R .comment --reverse-bytes=2 -O binary $(PROG).out $(PROG).bin
|
||||
|
||||
$(PROG).out : $(OBJECTS)
|
||||
$(CC) $(CFLAGS) -o $(PROG).out -Wl,-Map,$(PROG).map $^
|
||||
@ -55,7 +53,7 @@ $(PROG).out : $(OBJECTS)
|
||||
$(CC) $(CFLAGS) -Os -c $<
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET).bit $(TARGET).mcs $(PROG).mem $(PROG).hex $(PROG).out $(PROG).map *.o
|
||||
rm -f $(TARGET).bit $(TARGET).mcs $(PROG).mem $(PROG).bin $(PROG).out $(PROG).map *.o
|
||||
|
||||
clobber: clean
|
||||
rm -rf $(BMM_FILE) working/ iceconfig/
|
||||
|
Loading…
Reference in New Issue
Block a user