Naze32 clone with Frysky receiver
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

makefile 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. MCU = attiny85
  2. F_CPU = 16000000
  3. RM = rm -rf
  4. EXTRAINCDIR = include
  5. CSTANDARD = gnu99
  6. GCC = avr-gcc
  7. SIZE = avr-size
  8. OBJCOPY = avr-objcopy
  9. OBJDUMP = avr-objdump
  10. AVRDUDE = avrdude
  11. SRC = src/spi.c
  12. SRC += src/cc2500.c
  13. SRC += src/frsky_arduino_rx_complete.c
  14. OBJ = $(SRC:.c=.o)
  15. CARGS = -mmcu=$(MCU)
  16. CARGS += -I$(EXTRAINCDIR)
  17. CARGS += -Os
  18. CARGS += -funsigned-char
  19. CARGS += -funsigned-bitfields
  20. CARGS += -fpack-struct
  21. CARGS += -fshort-enums
  22. CARGS += -Wall -pedantic -Wstrict-prototypes -Wshadow
  23. CARGS += -Wpointer-arith -Wcast-qual -Wextra
  24. CARGS += -Wno-write-strings -Wno-unused-parameter
  25. CARGS += -std=$(CSTANDARD)
  26. CARGS += -DF_CPU=$(F_CPU)
  27. #CARGS += -lm -lprintf_flt
  28. CARGS += -ffunction-sections
  29. LINKER = -Wl,--relax
  30. #LINKER = -Wl,--relax,-u,vfprintf,-lm,-lprintf_flt,-u,vfscanf,-lscanf_flt
  31. #LINKER += -Wl,--defsym=__heap_start=0x802200,--defsym=__heap_end=0x80ffff
  32. #LINKER += -Wl,-gc-sections
  33. PROGRAMMER = avrisp2
  34. ISPPORT = usb
  35. TARGET = rx
  36. all: $(TARGET).hex
  37. %.o: %.c
  38. $(GCC) -c $< -o $@ $(CARGS)
  39. $(TARGET).elf: $(OBJ)
  40. $(GCC) $(CARGS) $(OBJ) --output $@ $(LINKER) -Wl,-Map -Wl,$(@:.elf=.map)
  41. $(SIZE) --mcu=$(MCU) -C $@
  42. $(TARGET).hex: $(TARGET).elf
  43. $(OBJCOPY) -O ihex $< $@
  44. $(OBJDUMP) -h -S $< > $(@:.hex=.lss)
  45. program: $(TARGET).hex
  46. $(AVRDUDE) -p $(MCU) -c $(PROGRAMMER) -P $(ISPPORT) -e -U $(TARGET).hex
  47. clean:
  48. $(RM) $(OBJ)
  49. $(RM) *.o
  50. $(RM) *.elf
  51. $(RM) *.hex
  52. $(RM) *.lss
  53. $(RM) *.map