all : gpio.hex OBJS:=gpio.o gpio_example.o trampoline.o HEX:=gpio.hex ELF:=gpio.elf PART:=uc3b1256 LDFLAGS:=-march=ucr2 -mpart=$(PART) -Os -ffunction-sections -fdata-sections -T./link_at32uc3b-isp.lds -Wl,--gc-sections CFLAGS:=-march=ucr2 -mpart=$(PART) -Wall -D BOARD=EVK1100 -DFOSC0=12000000 -D ISP_OSC=0 -g -Os -ffunction-sections -fdata-sections -IHeader CC:=avr32-gcc ASFLAGS:=$(CFLAGS) DFU:=sudo dfu-programmer at32$(PART) gpio.elf : $(OBJS) avr32-gcc $(LDFLAGS) $^ -o $@ %.hex: %.elf avr32-objcopy -O ihex $^ $@ program : $(HEX) $(DFU) flash --suppress-bootloader-mem $^ erase : $(DFU) erase start : erase program $(DFU) start clean : rm -rf $(OBJS) $(ELF) $(HEX) *~