From 7b8ee2d186087d42520e99eedf49b50d75067d09 Mon Sep 17 00:00:00 2001 From: Eric Ratliff Date: Sun, 15 Feb 2026 08:42:32 -0600 Subject: [PATCH] Supporting configuration settings for include and warnings --- .arduino-build.conf | 11 ++++ arduino-build.sh | 129 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 135 insertions(+), 5 deletions(-) create mode 100644 .arduino-build.conf diff --git a/.arduino-build.conf b/.arduino-build.conf new file mode 100644 index 0000000..ead2928 --- /dev/null +++ b/.arduino-build.conf @@ -0,0 +1,11 @@ +# .arduino-build.conf -- Project-level build configuration +# +# Discovered by arduino-build.sh when it walks up from the sketch directory. +# All paths are relative to this file's location (the project root). + +# Include paths -- each becomes a -I flag to the compiler +INCLUDE_DIRS="lib/hal lib/app" +EXTRA_BUILD_FLAGS="-Werror" + +# Additional compiler flags (uncomment as needed) +# EXTRA_BUILD_FLAGS="-DDEBUG=1" \ No newline at end of file diff --git a/arduino-build.sh b/arduino-build.sh index 4cebd1e..2198a0c 100755 --- a/arduino-build.sh +++ b/arduino-build.sh @@ -14,7 +14,7 @@ FQBN="${ARDUINO_FQBN:-arduino:avr:uno}" BAUD="${ARDUINO_BAUD:-115200}" BUILD_DIR="${ARDUINO_BUILD_DIR:-/tmp/arduino-build}" ARDUINO_CLI="${ARDUINO_CLI_BIN:-arduino-cli}" -VERSION="1.1.0" +VERSION="1.2.0" # -- Color output (disabled if stdout is not a terminal) --------------------- if [[ -t 1 ]]; then @@ -58,6 +58,7 @@ $(_help_section_commands) $(_help_section_build_options) $(_help_section_config_options) $(_help_section_env_vars) +$(_help_section_project_config) $(_help_section_examples) $(_help_section_cheatsheet) $(_help_section_sketch_layout) @@ -193,6 +194,42 @@ ${BLD}ENVIRONMENT VARIABLES${RST} EOF } +_help_section_project_config() { + cat <