Get some basic Teensy code working
It prints some stuff over the USB serial port and turns the on-board LED
on. Also tweak some of the existing code so it works with better
compiler options for what we're doing.
Change-Id: Ifcbd36f9eaca47a86f7a97e8c458c64f9b3df3ab
diff --git a/tools/cpp/BUILD b/tools/cpp/BUILD
index a7495d9..f5dfe10 100644
--- a/tools/cpp/BUILD
+++ b/tools/cpp/BUILD
@@ -10,6 +10,7 @@
deps = select({
'//tools:has_asan': [],
'//tools:has_tsan': [],
+ '//tools:cpu_cortex_m4f': [],
'//conditions:default': ['//third_party/gperftools:tcmalloc'],
}),
)
@@ -30,6 +31,7 @@
'k8|clang': ':cc-compiler-k8',
'roborio|gcc': ':cc-compiler-roborio',
'armhf-debian|clang': 'cc-compiler-armhf-debian',
+ 'cortex-m4f|gcc': 'cc-compiler-cortex-m4f',
},
)
@@ -150,3 +152,17 @@
strip_files = '//tools/cpp/linaro_linux_gcc:strip',
supports_param_files = 1,
)
+
+cc_toolchain(
+ name = 'cc-compiler-cortex-m4f',
+ all_files = ':empty',
+ compiler_files = ':empty',
+ cpu = 'cortex-m4',
+ dwp_files = ':empty',
+ dynamic_runtime_libs = [':empty'],
+ linker_files = '//motors/core:linkerscript',
+ objcopy_files = ':empty',
+ static_runtime_libs = [':empty'],
+ strip_files = ':empty',
+ supports_param_files = 0,
+)