add .bin target to Makefile
This commit is contained in:
		
							
								
								
									
										5
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								Makefile
									
									
									
									
									
								
							@@ -16,7 +16,7 @@ OBJDUMP        = avr-objdump
 | 
				
			|||||||
SIZE           = avr-size -A
 | 
					SIZE           = avr-size -A
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
all: $(PRG).hex
 | 
					all: $(PRG).hex $(PRG).bin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(PRG).elf: $(OBJ)
 | 
					$(PRG).elf: $(OBJ)
 | 
				
			||||||
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 | 
						$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 | 
				
			||||||
@@ -40,7 +40,10 @@ clean:
 | 
				
			|||||||
	rm -rf *.lst *.map $(EXTRA_CLEAN_FILES)
 | 
						rm -rf *.lst *.map $(EXTRA_CLEAN_FILES)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
hex:  $(PRG).hex
 | 
					hex:  $(PRG).hex
 | 
				
			||||||
 | 
					bin:  $(PRG).bin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%.hex: %.elf
 | 
					%.hex: %.elf
 | 
				
			||||||
	$(OBJCOPY) -j .text -j .data -O ihex $< $@
 | 
						$(OBJCOPY) -j .text -j .data -O ihex $< $@
 | 
				
			||||||
 | 
					%.bin: %.elf
 | 
				
			||||||
 | 
						$(OBJCOPY) -j .text -j .data -O binary $< $@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user