Skip to content

Commit 9e9398f

Browse files
committed
finalized the file layout to match the Arduino 1.5 file structure
1 parent e6e0061 commit 9e9398f

29 files changed

Lines changed: 14 additions & 341 deletions

File tree

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,3 @@
1-
BASENAME=$(shell basename $$(pwd))
2-
EXECUTABLE=$(BASENAME).ihx
1+
BOARD_TAG = stm8sblue
32

4-
SDCCBASE=/opt/sdcc
5-
BINDIR=$(SDCCBASE)/bin
6-
LIBDIR=$(SDCCBASE)/share/sdcc/lib
7-
INCDIR=$(SDCCBASE)/share/include
8-
CC=$(BINDIR)/sdcc
9-
LD=$(BINDIR)/sdld
10-
11-
SPLBASE=../../../STM8S_StdPeriph_Driver
12-
SDUINO=../../../sduino
13-
14-
CFLAGS= --debug -mstm8 -DF_CPU=16000000L -DSTM8S103 \
15-
-I. -I$(SDUINO) -I$(SPLBASE)/inc -I$(INCDIR)
16-
17-
LDFLAGS=-L$(SPLBASE)/src -L$(LIBDIR)/stm8 -lstm8s103
18-
19-
OBJECTS=$(BASENAME).rel
20-
SDOBJECTS=main.rel wiring.rel wiring_digital.rel wiring_analog.rel \
21-
HardwareSerial.rel Print.rel
22-
23-
.PHONY: all clean flash
24-
25-
#all: $(OBJECTS)
26-
27-
$(EXECUTABLE): $(OBJECTS) $(SDOBJECTS)
28-
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
29-
30-
$(OBJECTS) : %.rel : %.c
31-
$(CC) -c $(CFLAGS) $^ -o $@
32-
33-
$(SDOBJECTS) : %.rel : $(SDUINO)/%.c
34-
$(CC) -c $(CFLAGS) $^ -o $@
35-
36-
flash: $(EXECUTABLE)
37-
stm8flash -cstlinkv2 -pstm8s103?3 -w $^
38-
39-
readopt:
40-
stm8flash -c stlinkv2 -p stm8s103?3 -s opt -r opt.bin
41-
42-
43-
clean:
44-
rm -f *.lib *.rst *.rel *.lst *.ihx *.sym *.asm *.lk *.map \
45-
*.cdb *.adb *~ *.bak
46-
rm -f $(EXECUTABLE)
3+
include ../../../sduino/sduino.mk
Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,3 @@
1-
BASENAME=$(shell basename $$(pwd))
2-
EXECUTABLE=$(BASENAME).ihx
1+
BOARD_TAG = stm8sblue
32

4-
SDCCBASE=/opt/sdcc
5-
BINDIR=$(SDCCBASE)/bin
6-
LIBDIR=$(SDCCBASE)/share/sdcc/lib
7-
INCDIR=$(SDCCBASE)/share/include
8-
CC=$(BINDIR)/sdcc
9-
LD=$(BINDIR)/sdld
10-
11-
SPLBASE=../../../STM8S_StdPeriph_Driver
12-
SDUINO=../../../sduino
13-
14-
CFLAGS= --debug -mstm8 -DF_CPU=16000000L -DSTM8S103 \
15-
-I. -I$(SDUINO) -I$(SPLBASE)/inc -I$(INCDIR)
16-
17-
LDFLAGS=-L$(SPLBASE)/src -L$(LIBDIR)/stm8 -lstm8s103
18-
19-
OBJECTS=$(BASENAME).rel
20-
SDOBJECTS=main.rel wiring.rel
21-
# wiring_digital.rel wiring_analog.rel
22-
# HardwareSerial.rel Print.rel
23-
24-
.PHONY: all clean flash
25-
26-
#all: $(OBJECTS)
27-
28-
$(EXECUTABLE): $(OBJECTS) $(SDOBJECTS)
29-
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
30-
31-
$(OBJECTS) : %.rel : %.c
32-
$(CC) -c $(CFLAGS) $^ -o $@
33-
34-
$(SDOBJECTS) : %.rel : $(SDUINO)/%.c
35-
$(CC) -c $(CFLAGS) $^ -o $@
36-
37-
flash: $(EXECUTABLE)
38-
stm8flash -cstlinkv2 -pstm8s103?3 -w $^
39-
40-
readopt:
41-
stm8flash -c stlinkv2 -p stm8s103?3 -s opt -r opt.bin
42-
43-
44-
clean:
45-
rm -f *.lib *.rst *.rel *.lst *.ihx *.sym *.asm *.lk *.map \
46-
*.cdb *.adb *~ *.bak
47-
rm -f $(EXECUTABLE)
3+
include ../../../sduino/sduino.mk

examples/01.Basics/Blink/Makefile

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,3 @@
1-
BASENAME=$(shell basename $$(pwd))
2-
EXECUTABLE=$(BASENAME).ihx
1+
BOARD_TAG = stm8sblue
32

4-
SDCCBASE=/opt/sdcc
5-
BINDIR=$(SDCCBASE)/bin
6-
LIBDIR=$(SDCCBASE)/share/sdcc/lib
7-
INCDIR=$(SDCCBASE)/share/include
8-
CC=$(BINDIR)/sdcc
9-
LD=$(BINDIR)/sdld
10-
11-
SPLBASE=../../../STM8S_StdPeriph_Driver
12-
SDUINO=../../../sduino
13-
14-
CFLAGS= --debug -mstm8 -DF_CPU=16000000L -DSTM8S103 \
15-
-I. -I$(SDUINO) -I$(SPLBASE)/inc -I$(INCDIR)
16-
17-
LDFLAGS=-L$(SPLBASE)/src -L$(LIBDIR)/stm8 -lstm8s103
18-
19-
OBJECTS=$(BASENAME).rel
20-
SDOBJECTS=main.rel wiring.rel wiring_digital.rel
21-
# wiring_analog.rel
22-
# HardwareSerial.rel Print.rel
23-
24-
.PHONY: all clean flash
25-
26-
#all: $(OBJECTS)
27-
28-
$(EXECUTABLE): $(OBJECTS) $(SDOBJECTS)
29-
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
30-
31-
$(OBJECTS) : %.rel : %.c
32-
$(CC) -c $(CFLAGS) $^ -o $@
33-
34-
$(SDOBJECTS) : %.rel : $(SDUINO)/%.c
35-
$(CC) -c $(CFLAGS) $^ -o $@
36-
37-
flash: $(EXECUTABLE)
38-
stm8flash -cstlinkv2 -pstm8s103?3 -w $^
39-
40-
readopt:
41-
stm8flash -c stlinkv2 -p stm8s103?3 -s opt -r opt.bin
42-
43-
44-
clean:
45-
rm -f *.lib *.rst *.rel *.lst *.ihx *.sym *.asm *.lk *.map \
46-
*.cdb *.adb *~ *.bak
47-
rm -f $(EXECUTABLE)
3+
include ../../../sduino/sduino.mk
Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,3 @@
1-
BASENAME=$(shell basename $$(pwd))
2-
EXECUTABLE=$(BASENAME).ihx
1+
BOARD_TAG = stm8sblue
32

4-
SDCCBASE=/opt/sdcc
5-
BINDIR=$(SDCCBASE)/bin
6-
LIBDIR=$(SDCCBASE)/share/sdcc/lib
7-
INCDIR=$(SDCCBASE)/share/include
8-
CC=$(BINDIR)/sdcc
9-
LD=$(BINDIR)/sdld
10-
11-
SPLBASE=../../../STM8S_StdPeriph_Driver
12-
SDUINO=../../../sduino
13-
14-
CFLAGS= --debug -mstm8 -DF_CPU=16000000L -DSTM8S103 \
15-
-I. -I$(SDUINO) -I$(SPLBASE)/inc -I$(INCDIR)
16-
17-
LDFLAGS=-L$(SPLBASE)/src -L$(LIBDIR)/stm8 -lstm8s103
18-
19-
OBJECTS=$(BASENAME).rel
20-
SDOBJECTS=main.rel wiring.rel wiring_digital.rel \
21-
HardwareSerial.rel Print.rel
22-
# wiring_analog.rel
23-
24-
.PHONY: all clean flash
25-
26-
#all: $(OBJECTS)
27-
28-
$(EXECUTABLE): $(OBJECTS) $(SDOBJECTS)
29-
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
30-
31-
$(OBJECTS) : %.rel : %.c
32-
$(CC) -c $(CFLAGS) $^ -o $@
33-
34-
$(SDOBJECTS) : %.rel : $(SDUINO)/%.c
35-
$(CC) -c $(CFLAGS) $^ -o $@
36-
37-
flash: $(EXECUTABLE)
38-
stm8flash -cstlinkv2 -pstm8s103?3 -w $^
39-
40-
readopt:
41-
stm8flash -c stlinkv2 -p stm8s103?3 -s opt -r opt.bin
42-
43-
44-
clean:
45-
rm -f *.lib *.rst *.rel *.lst *.ihx *.sym *.asm *.lk *.map \
46-
*.cdb *.adb *~ *.bak
47-
rm -f $(EXECUTABLE)
3+
include ../../../sduino/sduino.mk

examples/01.Basics/Fade/Fade.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/*
22
Fade
33
4-
This example shows how to fade an LED on pin 9
4+
This example shows how to fade an LED on pin 5
55
using the analogWrite() function.
66
77
This example code is in the public domain.
88
*/
99

1010
#include <Arduino.h>
1111

12-
int led = 9; // the pin that the LED is attached to
12+
int led = 5; // the pin that the LED is attached to
1313
int brightness = 0; // how bright the LED is
1414
int fadeAmount = 5; // how many points to fade the LED by
1515

examples/01.Basics/Fade/Makefile

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,3 @@
1-
BASENAME=$(shell basename $$(pwd))
2-
EXECUTABLE=$(BASENAME).ihx
1+
BOARD_TAG = stm8sblue
32

4-
SDCCBASE=/opt/sdcc
5-
BINDIR=$(SDCCBASE)/bin
6-
LIBDIR=$(SDCCBASE)/share/sdcc/lib
7-
INCDIR=$(SDCCBASE)/share/include
8-
CC=$(BINDIR)/sdcc
9-
LD=$(BINDIR)/sdld
10-
11-
SPLBASE=../../../STM8S_StdPeriph_Driver
12-
SDUINO=../../../sduino
13-
14-
CFLAGS= --debug -mstm8 -DF_CPU=16000000L -DSTM8S103 \
15-
-I. -I$(SDUINO) -I$(SPLBASE)/inc -I$(INCDIR)
16-
17-
LDFLAGS=-L$(SPLBASE)/src -L$(LIBDIR)/stm8 -lstm8s103
18-
19-
OBJECTS=$(BASENAME).rel
20-
SDOBJECTS=main.rel wiring.rel wiring_analog.rel wiring_digital.rel
21-
# HardwareSerial.rel Print.rel
22-
23-
.PHONY: all clean flash
24-
25-
#all: $(OBJECTS)
26-
27-
$(EXECUTABLE): $(OBJECTS) $(SDOBJECTS)
28-
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
29-
30-
$(OBJECTS) : %.rel : %.c
31-
$(CC) -c $(CFLAGS) $^ -o $@
32-
33-
$(SDOBJECTS) : %.rel : $(SDUINO)/%.c
34-
$(CC) -c $(CFLAGS) $^ -o $@
35-
36-
flash: $(EXECUTABLE)
37-
stm8flash -cstlinkv2 -pstm8s103?3 -w $^
38-
39-
readopt:
40-
stm8flash -c stlinkv2 -p stm8s103?3 -s opt -r opt.bin
41-
42-
43-
clean:
44-
rm -f *.lib *.rst *.rel *.lst *.ihx *.sym *.asm *.lk *.map \
45-
*.cdb *.adb *~ *.bak
46-
rm -f $(EXECUTABLE)
3+
include ../../../sduino/sduino.mk
Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,3 @@
1-
BASENAME=$(shell basename $$(pwd))
2-
EXECUTABLE=$(BASENAME).ihx
1+
BOARD_TAG = stm8sblue
32

4-
SDCCBASE=/opt/sdcc
5-
BINDIR=$(SDCCBASE)/bin
6-
LIBDIR=$(SDCCBASE)/share/sdcc/lib
7-
INCDIR=$(SDCCBASE)/share/include
8-
CC=$(BINDIR)/sdcc
9-
LD=$(BINDIR)/sdld
10-
11-
SPLBASE=../../../STM8S_StdPeriph_Driver
12-
SDUINO=../../../sduino
13-
14-
CFLAGS= --debug -mstm8 -DF_CPU=16000000L -DSTM8S103 \
15-
-I. -I$(SDUINO) -I$(SPLBASE)/inc -I$(INCDIR)
16-
17-
LDFLAGS=-L$(SPLBASE)/src -L$(LIBDIR)/stm8 -lstm8s103
18-
19-
OBJECTS=$(BASENAME).rel
20-
SDOBJECTS=main.rel wiring.rel wiring_analog.rel wiring_digital.rel \
21-
HardwareSerial.rel Print.rel
22-
23-
.PHONY: all clean flash
24-
25-
#all: $(OBJECTS)
26-
27-
$(EXECUTABLE): $(OBJECTS) $(SDOBJECTS)
28-
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
29-
30-
$(OBJECTS) : %.rel : %.c
31-
$(CC) -c $(CFLAGS) $^ -o $@
32-
33-
$(SDOBJECTS) : %.rel : $(SDUINO)/%.c
34-
$(CC) -c $(CFLAGS) $^ -o $@
35-
36-
flash: $(EXECUTABLE)
37-
stm8flash -cstlinkv2 -pstm8s103?3 -w $^
38-
39-
readopt:
40-
stm8flash -c stlinkv2 -p stm8s103?3 -s opt -r opt.bin
41-
42-
43-
clean:
44-
rm -f *.lib *.rst *.rel *.lst *.ihx *.sym *.asm *.lk *.map \
45-
*.cdb *.adb *~ *.bak
46-
rm -f $(EXECUTABLE)
3+
include ../../../sduino/sduino.mk

sduino/Makefile

Lines changed: 0 additions & 44 deletions
This file was deleted.

sduino/hardware/sduino/stm8/cores/sduino

Lines changed: 0 additions & 1 deletion
This file was deleted.

sduino/Arduino.h renamed to sduino/hardware/sduino/stm8/cores/sduino/Arduino.h

File renamed without changes.

0 commit comments

Comments
 (0)