blob: 4efc42b4777bbd30ad5ac3ca1820b90b8ec866fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
serial:
make _build E=serial C=avr
spi:
make _build E=spi C=avr
aum:
make _build E=aum C=avr
stm32:
platformio run --environment patch --project-conf platformio-stm32.ini
make _build E=serial C=stm32
_build:
rm -f .current .config
platformio run --environment $(E) --project-conf platformio-$(C).ini
echo -n $(E) > .current
echo -n $(C) > .config
# Added to easy test all builds
_build_all: aum spi serial stm32
rm -f .current .config
install: upload
upload:
$(eval $@_CURRENT := $(shell cat .current))
$(eval $@_CONFIG := $(shell cat .config))
bash -ex -c " \
current=`cat .current`; \
if [ '$($@_CURRENT)' == 'spi' ] || [ '$($@_CURRENT)' == 'aum' ]; then \
gpioset 0 25=1; \
gpioset 0 25=0; \
fi \
"
platformio run --environment '$($@_CURRENT)' --project-conf 'platformio-$($@_CONFIG).ini' --target upload
bootloader-spi: install-bootloader-spi
install-bootloader-spi: upload-bootloader-spi
upload-bootloader-spi:
platformio run --environment bootloader_spi --project-conf platformio-avr.ini --target bootloader
update:
platformio platform update
clean-all: clean
rm -rf .platformio
clean:
rm -rf .pio .current .config
help:
@ cat Makefile
|