Commit cc741eda7ac72b458aff9a588e1b299f66426fa3

Authored by grouille
2 parents 38804439 bb21808e

Merge branch 'master' of https://archives.plil.fr/grouille/IMA3_P10

site/fichiersRPI/Build/Makefile deleted
@@ -1,88 +0,0 @@ @@ -1,88 +0,0 @@
1 -export CC = avr-gcc  
2 -  
3 -export MCU = atmega328p  
4 -export TARGET_ARCH = -mmcu=$(MCU)  
5 -  
6 -export CFLAGS = -Wall -I. -DF_CPU=16000000 -Os #-pedantic -std=c99#-g  
7 -export LDFLAGS = -g $(TARGET_ARCH) -lm -Wl,--gc-sections # -Os  
8 -  
9 -TARGET = libretour  
10 -TERM0 = /dev/ttyACM0  
11 -TERM1 = /dev/ttyACM1  
12 -CPPFLAGS = -mmcu=$(MCU)  
13 -#PGMER = -c stk500v1 -b 57600 -P $(TERM)  
14 -#Dans le cas de l'upload par USB (selon le port)  
15 -PGMERISP0 = -c stk500v1 -b 115200 -P $(TERM0)  
16 -PGMERISP1 = -c stk500v1 -b 115200 -P $(TERM1)  
17 -ARVDUDECONF= -C /usr/local/arduino/arduino-0021/hardware/tools/avrdude.conf  
18 -export DUDE = /usr/bin/avrdude -F -v -p $(MCU) $(AVRDUDECONF)  
19 -#Dans le cas de l'upload par SPI depuis la raspberry  
20 -PGMERISP_RPI = -c pi_3  
21 -ARVDUDECONF_RPI = -C ~/avrdude_gpio.conf  
22 -export DUDE_RPI = avrdude -v -p $(MCU) $(AVRDUDECONF_RPI)  
23 -  
24 -CLIB=ar cq  
25 -C_SRC = $(wildcard *.c)  
26 -OBJS = $(C_SRC:.c=.o)  
27 -  
28 -all: $(TARGET).a  
29 -  
30 -  
31 -clean:  
32 - rm -f *.o *.hex *.elf *.a build-uno  
33 -  
34 -$(TARGET).o: $(TARGET).c $(TARGET).h  
35 - $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@  
36 -  
37 -  
38 -$(TARGET).elf: $(OBJS)  
39 - $(CC) $(LDFLAGS) -o $@ $(OBJS)  
40 -  
41 -$(TARGET).hex: $(TARGET).elf  
42 - avr-objcopy -j .text -j .data -O ihex $(TARGET).elf $(TARGET).hex  
43 - avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 -O ihex $(TARGET).elf eeprom.hex  
44 -  
45 -$(TARGET).a: $(TARGET).o  
46 - rm -rf $@  
47 - $(CLIB) $@ $+  
48 -  
49 -  
50 -#UPLOAD CONDITIONNEL  
51 -FOLDER = $(notdir $(CURDIR))  
52 -  
53 -upload: $(TARGET).hex  
54 -#CAPTEUR 1 connecté en USB  
55 -ifeq ($(FOLDER), capteur1-0)  
56 -  
57 - stty -F $(TERM0) hupcl # reset  
58 - # $(DUDE) $(PGMER) -U flash:w:$(TARGET).hex  
59 - $(DUDE) $(PGMERISP0) -U flash:w:$(TARGET).hex  
60 -endif  
61 -  
62 -#CAPTEUR 1 connecté en SPI  
63 -ifeq ($(FOLDER), capteur1-1)  
64 -  
65 - stty -F $(TERM0) hupcl # reset  
66 - # $(DUDE) $(PGMER) -U flash:w:$(TARGET).hex  
67 - $(DUDE_RPI) $(PGMERISP_RPI) -U flash:w:$(TARGET).hex  
68 -endif  
69 -  
70 -#CAPTEUR 2 connecté en USB  
71 -ifeq ($(FOLDER), capteur2-0)  
72 -  
73 - stty -F $(TERM1) hupcl # reset  
74 - # $(DUDE) $(PGMER) -U flash:w:$(TARGET).hex  
75 - $(DUDE) $(PGMERISP1) -U flash:w:$(TARGET).hex  
76 -endif  
77 -  
78 -#CAPTEUR 2 connecté en SPI  
79 -ifeq ($(FOLDER), capteur2-1)  
80 -  
81 - stty -F $(TERM1) hupcl # reset  
82 - # $(DUDE) $(PGMER) -U flash:w:$(TARGET).hex  
83 - $(DUDE_RPI) $(PGMERISP_RPI) -U flash:w:$(TARGET).hex  
84 -endif  
85 -  
86 -size: $(TARGET).elf  
87 - avr-size --format=avr --mcu=$(MCU) $(TARGET).elf  
88 -  
site/fichiersRPI/fichiersRPI.zip
No preview for this file type
site/fichiersRPI/Build/retour.c renamed to site/fichiersRPI/retour.c
site/fichiersRPI/Build/retour.h renamed to site/fichiersRPI/retour.h
site/upload/binaire.c
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 #include <stdio.h> 5 #include <stdio.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 -#include "libretour.h" 8 +#include "retour.h"
9 9
10 #define PRESCALER 1024 10 #define PRESCALER 1024
11 #define TIME_SLOT 20 11 #define TIME_SLOT 20
@@ -51,4 +51,3 @@ int main() @@ -51,4 +51,3 @@ int main()
51 } 51 }
52 return 0; 52 return 0;
53 } 53 }
54 -