mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-13 01:30:31 +08:00
move platformio.ini -> platformio-avr.ini (#105)
This commit is contained in:
parent
1973a1e6e0
commit
6772d3425d
1
hid/.gitignore
vendored
1
hid/.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/.pio/
|
/.pio/
|
||||||
/.current
|
/.current
|
||||||
/.vscode/
|
/.vscode/
|
||||||
|
/.config
|
||||||
|
|||||||
20
hid/Makefile
20
hid/Makefile
@ -1,21 +1,23 @@
|
|||||||
serial:
|
serial:
|
||||||
make _build E=serial
|
make _build E=serial C=avr
|
||||||
spi:
|
spi:
|
||||||
make _build E=spi
|
make _build E=spi C=avr
|
||||||
aum:
|
aum:
|
||||||
make _build E=aum
|
make _build E=aum C=avr
|
||||||
_build:
|
_build:
|
||||||
rm -f .current
|
rm -f .current .config
|
||||||
platformio run --environment $(E)
|
platformio run --environment $(E) --project-conf platformio-$(C).ini
|
||||||
echo -n $(E) > .current
|
echo -n $(E) > .current
|
||||||
|
echo -n $(C) > .config
|
||||||
|
|
||||||
# Added to easy test all builds
|
# Added to easy test all builds
|
||||||
_build_all: aum spi serial
|
_build_all: aum spi serial
|
||||||
rm -f .current
|
rm -f .current .config
|
||||||
|
|
||||||
install: upload
|
install: upload
|
||||||
upload:
|
upload:
|
||||||
$(eval $@_CURRENT := $(shell cat .current))
|
$(eval $@_CURRENT := $(shell cat .current))
|
||||||
|
$(eval $@_CONFIG := $(shell cat .config))
|
||||||
bash -ex -c " \
|
bash -ex -c " \
|
||||||
current=`cat .current`; \
|
current=`cat .current`; \
|
||||||
if [ '$($@_CURRENT)' == 'spi' ] || [ '$($@_CURRENT)' == 'aum' ]; then \
|
if [ '$($@_CURRENT)' == 'spi' ] || [ '$($@_CURRENT)' == 'aum' ]; then \
|
||||||
@ -23,13 +25,13 @@ upload:
|
|||||||
gpioset 0 25=0; \
|
gpioset 0 25=0; \
|
||||||
fi \
|
fi \
|
||||||
"
|
"
|
||||||
platformio run --environment '$($@_CURRENT)' --target upload
|
platformio run --environment '$($@_CURRENT)' --project-conf '$($@_CONFIG)' --target upload
|
||||||
|
|
||||||
|
|
||||||
bootloader-spi: install-bootloader-spi
|
bootloader-spi: install-bootloader-spi
|
||||||
install-bootloader-spi: upload-bootloader-spi
|
install-bootloader-spi: upload-bootloader-spi
|
||||||
upload-bootloader-spi:
|
upload-bootloader-spi:
|
||||||
platformio run --environment bootloader_spi --target bootloader
|
platformio run --environment bootloader_spi --project-conf platformio-avr.ini --target bootloader
|
||||||
|
|
||||||
|
|
||||||
update:
|
update:
|
||||||
@ -39,7 +41,7 @@ update:
|
|||||||
clean-all: clean
|
clean-all: clean
|
||||||
rm -rf .platformio
|
rm -rf .platformio
|
||||||
clean:
|
clean:
|
||||||
rm -rf .pio .current
|
rm -rf .pio .current .config
|
||||||
|
|
||||||
|
|
||||||
help:
|
help:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user