diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..27eace0
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,43 @@
+on:
+ push:
+ branches:
+ - develop
+ - feature/*
+ workflow_dispatch:
+
+jobs:
+ build:
+ name: build
+ runs-on: arm-none-eabi-gcc
+ steps:
+
+ - name: Setup arm-none-eabi-gcc path
+ run: echo "/opt/arm-gnu-toolchain-13.2.Rel1-aarch64-arm-none-eabi/bin" >> $GITHUB_PATH
+
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ set-safe-directory: false
+
+ - run: |
+ git fetch --prune --unshallow --no-recurse-submodules
+ git branch develop
+ git branch -u origin/develop develop
+ git branch master
+ git branch -u origin/master master
+
+ - name: Install python venv & dependencies
+ run: |
+ python -m venv venv
+ source venv/bin/activate
+ pip install -r requirements.txt
+ echo PATH=$PATH >> $GITHUB_ENV
+ echo VIRTUAL_ENV=$VIRTUAL_ENV >> $GITHUB_ENV
+
+ - name: Select the port
+ run: defconfig config/nwdaq_br28_fdc_defconfig
+
+ - name: Compile
+ run: |
+ scons firmware
+
diff --git a/lib/SConscript b/lib/SConscript
index 6623b72..1a1515a 100644
--- a/lib/SConscript
+++ b/lib/SConscript
@@ -33,12 +33,7 @@ def Git(self, url, dir=env['LIB_DEFAULT_REPO_DIR'], branch=None):
return
print(f'{Fore.BLUE}{Style.BRIGHT}Cloning git repo{Style.RESET_ALL} {url} into {dir}...')
-
- try:
- repo = git.Repo.clone_from(url, dir, progress=git_clone_progress(), branch=branch, depth=1)
- except:
- print(f'..{Fore.RED}{Style.BRIGHT}failed{Style.RESET_ALL}')
- return
+ repo = git.Repo.clone_from(url, dir, progress=git_clone_progress(), branch=branch, depth=1)
stamp('.downloaded.stamp')
@@ -58,12 +53,7 @@ def Patch(self, ppatch, dir=env['LIB_DEFAULT_REPO_DIR']):
abspatch = os.path.abspath(p)
print(f'{Fore.BLUE}{Style.BRIGHT}Patching{Style.RESET_ALL} with {p}...')
- try:
- r.git.apply([str(abspatch)])
-
- except git.GitCommandError:
- print(f'..{Fore.RED}{Style.BRIGHT}failed{Style.RESET_ALL}')
- return
+ r.git.apply([str(abspatch)])
stamp('.patched.stamp')
@@ -78,7 +68,7 @@ def Make(self, target, cwd='.'):
r = subprocess.run(['make', target], cwd=str(cwd), stdout=subprocess.PIPE)
print(r.stdout.decode())
-
+
stamp('.compiled.stamp')
env.AddMethod(Make)
diff --git a/lib/cmsis/.downloaded.stamp b/lib/cmsis/.downloaded.stamp
deleted file mode 100644
index e69de29..0000000
diff --git a/lib/heatshrink/.downloaded.stamp b/lib/heatshrink/.downloaded.stamp
deleted file mode 100644
index e69de29..0000000
diff --git a/lib/heatshrink/.patched.stamp b/lib/heatshrink/.patched.stamp
deleted file mode 100644
index e69de29..0000000
diff --git a/lib/libopencm3/.downloaded.stamp b/lib/libopencm3/.downloaded.stamp
deleted file mode 100644
index e69de29..0000000
diff --git a/lib/libopencm3/.patched.stamp b/lib/libopencm3/.patched.stamp
deleted file mode 100644
index e69de29..0000000
diff --git a/lib/libopencm3/add-stm32-g4-rtc-iwdg.patch b/lib/libopencm3/add-stm32-g4-rtc-iwdg.patch
index 795947f..8ff79e9 100644
--- a/lib/libopencm3/add-stm32-g4-rtc-iwdg.patch
+++ b/lib/libopencm3/add-stm32-g4-rtc-iwdg.patch
@@ -1,42 +1,3 @@
-diff --git a/include/libopencm3/stm32/g4/iwdg.h b/include/libopencm3/stm32/g4/iwdg.h
-new file mode 100644
-index 00000000..ce321c16
---- /dev/null
-+++ b/include/libopencm3/stm32/g4/iwdg.h
-@@ -0,0 +1,33 @@
-+/** @defgroup iwdg_defines IWDG Defines
-+ *
-+ * @ingroup STM32G4xx_defines
-+ *
-+ * @brief Defined Constants and Types for the STM32G4xx Independent Watchdog Timer
-+ *
-+ * @version 1.0.0
-+ *
-+ * LGPL License Terms @ref lgpl_license
-+ * */
-+/*
-+ * This file is part of the libopencm3 project.
-+ *
-+ * This library is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU Lesser General Public License as published by
-+ * the Free Software Foundation, either version 3 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public License
-+ * along with this library. If not, see .
-+ */
-+
-+#ifndef LIBOPENCM3_IWDG_H
-+#define LIBOPENCM3_IWDG_H
-+
-+#include
-+
-+#endif
diff --git a/include/libopencm3/stm32/g4/rtc.h b/include/libopencm3/stm32/g4/rtc.h
new file mode 100644
index 00000000..d631fd90
@@ -79,19 +40,6 @@ index 00000000..d631fd90
+#include
+
+#endif
-diff --git a/include/libopencm3/stm32/iwdg.h b/include/libopencm3/stm32/iwdg.h
-index b94b8741..5572e25f 100644
---- a/include/libopencm3/stm32/iwdg.h
-+++ b/include/libopencm3/stm32/iwdg.h
-@@ -40,6 +40,8 @@
- # include
- #elif defined(STM32G0)
- # include
-+#elif defined(STM32G4)
-+# include
- #else
- # error "stm32 family not defined."
- #endif
diff --git a/include/libopencm3/stm32/rtc.h b/include/libopencm3/stm32/rtc.h
index 53118d3c..d4a20e7f 100644
--- a/include/libopencm3/stm32/rtc.h
@@ -106,15 +54,10 @@ index 53118d3c..d4a20e7f 100644
# error "stm32 family not defined."
#endif
diff --git a/lib/stm32/g4/Makefile b/lib/stm32/g4/Makefile
-index c6924130..836d69c3 100644
+index 8cf1c4a..1e29807 100644
--- a/lib/stm32/g4/Makefile
+++ b/lib/stm32/g4/Makefile
-@@ -46,10 +46,12 @@ OBJS += fdcan.o fdcan_common.o
- OBJS += flash.o flash_common_all.o flash_common_f.o flash_common_idcache.o
- OBJS += gpio_common_all.o gpio_common_f0234.o
- OBJS += i2c_common_v2.o
-+OBJS += iwdg_common_all.o
- OBJS += opamp_common_all.o opamp_common_v2.o
+@@ -52,6 +52,7 @@ OBJS += opamp_common_all.o opamp_common_v2.o
OBJS += pwr.o
OBJS += rcc.o rcc_common_all.o
OBJS += rng_common_v1.o
diff --git a/lib/lineedit/.downloaded.stamp b/lib/lineedit/.downloaded.stamp
deleted file mode 100644
index e69de29..0000000
diff --git a/lib/nanopb/.downloaded.stamp b/lib/nanopb/.downloaded.stamp
deleted file mode 100644
index e69de29..0000000
diff --git a/lib/spiffs/.downloaded.stamp b/lib/spiffs/.downloaded.stamp
deleted file mode 100644
index e69de29..0000000
diff --git a/lib/tinycbor/.downloaded.stamp b/lib/tinycbor/.downloaded.stamp
deleted file mode 100644
index e69de29..0000000
diff --git a/lib/tinycbor/.patched.stamp b/lib/tinycbor/.patched.stamp
deleted file mode 100644
index e69de29..0000000
diff --git a/lib/treecli/.downloaded.stamp b/lib/treecli/.downloaded.stamp
deleted file mode 100644
index e69de29..0000000
diff --git a/lib/wren/.downloaded.stamp b/lib/wren/.downloaded.stamp
deleted file mode 100644
index e69de29..0000000
diff --git a/lib/zfp/.downloaded.stamp b/lib/zfp/.downloaded.stamp
deleted file mode 100644
index e69de29..0000000
diff --git a/requirements.txt b/requirements.txt
index 1c447e0..cc27166 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,9 +1,11 @@
gitdb==4.0.5
GitPython==3.1.14
pyaml==20.4.0
-PyYAML==5.4.1
+PyYAML==6.0.1
six==1.15.0
smmap==3.0.5
kconfiglib==14.1.0
-protobuf==3.15.3
+protobuf==5.26.1
SCons==4.1.0.post1
+tqdm==4.57.0
+colorama==0.4.4