Parcourir la source

New folder structure, added Readme and Makefile.

Thomas Buck il y a 8 ans
Parent
révision
c0cb737dc2
7 fichiers modifiés avec 85 ajouts et 2 suppressions
  1. 2
    0
      .gitignore
  2. 17
    0
      README.md
  3. 0
    0
      include/iface_cc2500.h
  4. 65
    0
      makefile
  5. 0
    1
      readme.txt
  6. 1
    1
      src/cc2500_BB_SPI.c
  7. 0
    0
      src/frsky_arduino_rx_complete.c

+ 2
- 0
.gitignore Voir le fichier

@@ -0,0 +1,2 @@
1
+.DS_Store
2
+*.o

+ 17
- 0
README.md Voir le fichier

@@ -0,0 +1,17 @@
1
+# xyFC
2
+
3
+## ATtiny85 OpenSkyRX
4
+
5
+The code running on the ATtiny85 is based on [OpenSkyRX by readerror67](https://github.com/readerror67/OpenSkyRX). It originally contained the following notice:
6
+
7
+    /*
8
+     * Frsky RX 2-way
9
+     *  By  Midelic
10
+     *  on RCGroups
11
+     * an adaptation from Kyrre Aalerud(Kreature)
12
+     * 2012 Frsky rx demo code
13
+     * http://www.rcgroups.com/forums/showthread.php?t=1667453
14
+     * Thanks also to Phracturedblue and his deviation firmware
15
+     **********************************
16
+     */
17
+

iface_cc2500.h → include/iface_cc2500.h Voir le fichier


+ 65
- 0
makefile Voir le fichier

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

+ 0
- 1
readme.txt Voir le fichier

@@ -1 +0,0 @@
1
- with autotuning complete with 8 channels servo and PPM out

cc2500_BB_SPI.ino → src/cc2500_BB_SPI.c Voir le fichier

@@ -119,4 +119,4 @@ void cc2500_resetChip(void)
119 119
     _delay_us(45);
120 120
     cc2500_strobe(CC2500_SRES);
121 121
     _delay_ms(100);
122
-}
122
+}

frsky_arduino_rx_complete.ino → src/frsky_arduino_rx_complete.c Voir le fichier


Chargement…
Annuler
Enregistrer