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

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