examples: clean up examples and add blinky1 for Arduino

Arduino has trouble supporting anything that's not extremely simple, so
add a simple blinky example for it. Also, it may be useful anyway.
This commit is contained in:
Ayke van Laethem
2018-09-05 11:49:31 +02:00
parent 17b5b6ec5b
commit 9101ea11bf
5 changed files with 35 additions and 7 deletions
+7 -6
View File
@@ -3,7 +3,7 @@
all: tgo
tgo: build/tgo
.PHONY: all tgo run-hello run-blinky clean fmt gen-device gen-device-nrf
.PHONY: all tgo run-test run-blinky run-blinky2 clean fmt gen-device gen-device-nrf
# Custom LLVM toolchain.
LLVM := $(shell go env GOPATH)/src/github.com/aykevl/llvm/bindings/go/llvm/workdir/llvm_build/bin/
@@ -56,11 +56,12 @@ endif
run-hello: build/hello
./build/hello
run-test: build/test
./build/test
run-blinky: build/blinky
./build/blinky
run-blinky: run-blinky2
run-blinky2: build/blinky2
./build/blinky2
ifeq ($(TARGET),pca10040)
flash-%: build/%.hex
@@ -74,7 +75,7 @@ clean:
@rm -rf build
fmt:
@go fmt . ./src/examples/hello
@go fmt . ./src/examples/test
@go fmt ./src/runtime/*.go
gen-device: gen-device-nrf