Added Arduino example app and custom target
Add sample arduino custom target to allow overriding backends.
Use the build_and_flash.sh script as a reference to build and flash all
the device targets. Requires the Arduino core installed under
third_party/pigweed/third_party/arduino, following the Pigweed's pw_arduino
documentation.
Change-Id: Ic7092b16d137ddf73b6a01d99ae0d9911bf2e7b0
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/sample_project/+/18821
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Carlos Chinchilla <cachinchilla@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 0263300..d64ab58 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -30,7 +30,7 @@
]
}
-group("host_only_apps") {
+group("app") {
deps = []
if (current_toolchain != default_toolchain) {
deps += [ "//source:hello_world" ]
@@ -42,19 +42,28 @@
# the user adds their own toolchain.
group("host") {
deps = [
- ":host_only_apps(//targets/host:host_clang_debug)",
+ ":app(//targets/host:host_clang_debug)",
":tests(//targets/host:host_clang_debug_tests)"
]
}
+group("arduino") {
+ deps = [
+ ":app(//targets/arduino:arduino_debug)",
+ ":tests(//targets/arduino:arduino_debug_tests)",
+ "//source/arduino_example:blink(//targets/arduino:arduino_debug)",
+ ]
+}
+
pw_tokenizer_database("tokenizer_database") {
database = "//source/tokenizer_database.csv"
- targets = [ ":host_only_apps(//targets/host:host_clang_debug)" ]
+ targets = [ ":app(//targets/host:host_clang_debug)" ]
}
# Lists all the targets build by default with e.g. `ninja -C out`.
group("default") {
deps = [
+ ":arduino",
":host",
":tokenizer_database",
]