From 0a8217f18a702d630e828798249b9dac5ab1851f Mon Sep 17 00:00:00 2001 From: martinabars Date: Thu, 20 Jun 2024 00:00:24 +0200 Subject: [PATCH 1/8] feat: added action build_and_release.yml --- .github/workflows/build_and_release.yml | 63 +++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/build_and_release.yml diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml new file mode 100644 index 0000000..fd94bda --- /dev/null +++ b/.github/workflows/build_and_release.yml @@ -0,0 +1,63 @@ +name: Build and Create Release + +on: + push: + tags: + - 'v*.*' + workflow_dispatch: + +jobs: + generate: + name: Generate Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install ARM gcc Toolchain + uses: carlosperate/arm-none-eabi-gcc-action@v1 + + - name: Verify ARM gcc Version + run: arm-none-eabi-gcc --version + + - name: Make Release + run: make release + + # - name: List build directory contents + # run: ls -al + + # - name: Compress build artifacts + # run: zip -r output_build.zip ./build + + - name: Upload Build Artifact + uses: actions/upload-artifact@v4 + with: + name: build + path: ./release + + createrelease: + name: Create Release + runs-on: [ubuntu-latest] + needs: generate + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Get tag name + id: get_tag_name + run: echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + + - name: Download Build Artifact + uses: actions/download-artifact@v4 + with: + name: build + path: ./release + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2.0.5 + with: + tag_name: ${{ env.tag_name }} + files: ./release/**/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3f94e204e678852699dc94ad6e7cb97b54ba9ed4 Mon Sep 17 00:00:00 2001 From: martinabars Date: Sat, 6 Jul 2024 22:53:35 +0200 Subject: [PATCH 2/8] v3.0 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6a9fad3..4843ff5 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ If you want it configured for this project only use `--local` otherwise for your Checkout out either [this](https://www.git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_formatting_and_whitespace) or [this](https://stackoverflow.com/a/46347609/9167660) for more information. + Don't use `.gitattributes` it gets messy very quickly. ## Dependencies From f96320cf7522172319848baf7628b9bd5e3b2bb4 Mon Sep 17 00:00:00 2001 From: martinabars Date: Sat, 6 Jul 2024 22:54:07 +0200 Subject: [PATCH 3/8] v3.1 --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 4843ff5..6a9fad3 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ If you want it configured for this project only use `--local` otherwise for your Checkout out either [this](https://www.git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_formatting_and_whitespace) or [this](https://stackoverflow.com/a/46347609/9167660) for more information. - Don't use `.gitattributes` it gets messy very quickly. ## Dependencies From a7f621d5f227cfa46a7d97e6ccae43e0811d4779 Mon Sep 17 00:00:00 2001 From: martinabars Date: Sat, 6 Jul 2024 22:56:21 +0200 Subject: [PATCH 4/8] v3.2 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6a9fad3..8b2c112 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ This repo contains the firmware and bootloader for the SensorBoard Device v3.0 ## Develop **PLEASE STOP USING CRLF LINE ENDING : use LF as normal people do** + + Git can handle this for you correctly! If you want it configured for this project only use `--local` otherwise for your whole system use `--global`. From f962048a74fc942d48233d9d1c68ba0f16de817c Mon Sep 17 00:00:00 2001 From: martinabars Date: Sat, 6 Jul 2024 22:56:48 +0200 Subject: [PATCH 5/8] v3.3 --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 8b2c112..ade7393 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ This repo contains the firmware and bootloader for the SensorBoard Device v3.0 **PLEASE STOP USING CRLF LINE ENDING : use LF as normal people do** - Git can handle this for you correctly! If you want it configured for this project only use `--local` otherwise for your whole system use `--global`. From ca052d6c4cb02abf736053c323600279c6334b28 Mon Sep 17 00:00:00 2001 From: martinabars Date: Sat, 6 Jul 2024 23:01:49 +0200 Subject: [PATCH 6/8] futura v3.4 --- .vscode/c_cpp_properties.json | 27 +++---------- .vscode/settings.json | 73 +++++++++++++++++++++++++++++++---- Core/Src/can_utils.c | 2 + README.md | 1 - 4 files changed, 73 insertions(+), 30 deletions(-) diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 45d0cdb..6c20b88 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -1,33 +1,18 @@ { "configurations": [ { - "name": "STM32", + "name": "windows-gcc-x86", "includePath": [ - "Core/Inc", - "Drivers/CMSIS/Device/ST/STM32F4xx/Include", - "Drivers/CMSIS/Include", - "Drivers/STM32F4xx_HAL_Driver/Inc", - "Drivers/STM32F4xx_HAL_Driver/Inc/Legacy", - "Lib/SCan/SC22EVO/artifacts/HVCB/c_source", - "Lib/SCan/SC22EVO/artifacts/MCB/c_source", - "Lib/adc1283", - "Lib/stmlibs", - "Lib/stmlibs/circular_buffer", - "Lib/stmlibs/critical_section", - "Lib/stmlibs/error_utils", - "Lib/stmlibs/fsm", - "Lib/stmlibs/lock", - "Lib/stmlibs/logger", - "Lib/stmlibs/longcounter", - "Lib/stmlibs/pwm", - "Lib/stmlibs/timebase", - "Lib/stmlibs/timer_utils" + "${workspaceFolder}/**" ], "defines": [ "STM32F446xx", "USE_HAL_DRIVER" ], - "compilerPath": "/usr/bin/arm-none-eabi-gcc" + "compilerPath": "C:/MinGW/bin/gcc.exe", + "cStandard": "${default}", + "cppStandard": "${default}", + "intelliSenseMode": "windows-gcc-x86" } ], "version": 4 diff --git a/.vscode/settings.json b/.vscode/settings.json index 6c50ed5..1e07df5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,10 +1,67 @@ { - "cortex-debug.armToolchainPath": "/usr/bin", - "cortex-debug.openocdPath": "/usr/bin/openocd", - "files.associations": { - "anal.h": "c", - "memory.h": "c", - "sd_sensing.h": "c", - "adc.h": "c" - } + "cortex-debug.armToolchainPath": "/usr/bin", + "cortex-debug.openocdPath": "/usr/bin/openocd", + "files.associations": { + "anal.h": "c", + "memory.h": "c", + "sd_sensing.h": "c", + "adc.h": "c" + }, + "C_Cpp_Runner.cCompilerPath": "gcc", + "C_Cpp_Runner.cppCompilerPath": "g++", + "C_Cpp_Runner.debuggerPath": "gdb", + "C_Cpp_Runner.cStandard": "", + "C_Cpp_Runner.cppStandard": "", + "C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat", + "C_Cpp_Runner.useMsvc": false, + "C_Cpp_Runner.warnings": [ + "-Wall", + "-Wextra", + "-Wpedantic", + "-Wshadow", + "-Wformat=2", + "-Wcast-align", + "-Wconversion", + "-Wsign-conversion", + "-Wnull-dereference" + ], + "C_Cpp_Runner.msvcWarnings": [ + "/W4", + "/permissive-", + "/w14242", + "/w14287", + "/w14296", + "/w14311", + "/w14826", + "/w44062", + "/w44242", + "/w14905", + "/w14906", + "/w14263", + "/w44265", + "/w14928" + ], + "C_Cpp_Runner.enableWarnings": true, + "C_Cpp_Runner.warningsAsError": false, + "C_Cpp_Runner.compilerArgs": [], + "C_Cpp_Runner.linkerArgs": [], + "C_Cpp_Runner.includePaths": [], + "C_Cpp_Runner.includeSearch": [ + "*", + "**/*" + ], + "C_Cpp_Runner.excludeSearch": [ + "**/build", + "**/build/**", + "**/.*", + "**/.*/**", + "**/.vscode", + "**/.vscode/**" + ], + "C_Cpp_Runner.useAddressSanitizer": false, + "C_Cpp_Runner.useUndefinedSanitizer": false, + "C_Cpp_Runner.useLeakSanitizer": false, + "C_Cpp_Runner.showCompilationTime": false, + "C_Cpp_Runner.useLinkTimeOptimization": false, + "C_Cpp_Runner.msvcSecureNoWarnings": false } \ No newline at end of file diff --git a/Core/Src/can_utils.c b/Core/Src/can_utils.c index 8896ad9..b9a13f8 100644 --- a/Core/Src/can_utils.c +++ b/Core/Src/can_utils.c @@ -34,10 +34,12 @@ void can_init(void) { filter.FilterIdHigh = MCB_D_SPACE_PERIPHERALS_CTRL_FRAME_ID << 5; // to 2^11 - 1 filter.FilterMaskIdHigh = MCB_D_SPACE_PERIPHERALS_CTRL_FRAME_ID << 5; // Don't care on can id bits filter.FilterMaskIdLow = MCB_D_SPACE_PERIPHERALS_CTRL_FRAME_ID << 5; // Don't care on can id bits + /* HAL considers IdLow and IdHigh not as just the ID of the can message but as the combination of: STDID + RTR + IDE + 4 most significant bits of EXTID */ + filter.FilterFIFOAssignment = CAN_FILTER_FIFO0; filter.FilterBank = 1; filter.FilterScale = CAN_FILTERSCALE_16BIT; diff --git a/README.md b/README.md index ade7393..6a9fad3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ This repo contains the firmware and bootloader for the SensorBoard Device v3.0 ## Develop **PLEASE STOP USING CRLF LINE ENDING : use LF as normal people do** - Git can handle this for you correctly! If you want it configured for this project only use `--local` otherwise for your whole system use `--global`. From 2e84b9d4b411e9e1fd1a11e3fbe2ac32411e979a Mon Sep 17 00:00:00 2001 From: martinabars Date: Sat, 6 Jul 2024 23:08:14 +0200 Subject: [PATCH 7/8] first version, to be tested --- openblt_f446re/Drivers/CMSIS/Core/Template/ARMv8-M/main_s.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openblt_f446re/Drivers/CMSIS/Core/Template/ARMv8-M/main_s.c b/openblt_f446re/Drivers/CMSIS/Core/Template/ARMv8-M/main_s.c index 273607b..dd2b304 100644 --- a/openblt_f446re/Drivers/CMSIS/Core/Template/ARMv8-M/main_s.c +++ b/openblt_f446re/Drivers/CMSIS/Core/Template/ARMv8-M/main_s.c @@ -55,4 +55,5 @@ int main(void) { while (1) { __NOP(); } + } From 88653d376ac42c5370ef554e782605eeac8672d2 Mon Sep 17 00:00:00 2001 From: martinabars Date: Sat, 6 Jul 2024 23:08:38 +0200 Subject: [PATCH 8/8] second version, no touch --- openblt_f446re/Drivers/CMSIS/Core/Template/ARMv8-M/tz_context.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openblt_f446re/Drivers/CMSIS/Core/Template/ARMv8-M/tz_context.c b/openblt_f446re/Drivers/CMSIS/Core/Template/ARMv8-M/tz_context.c index e2e8294..b5f9e0a 100644 --- a/openblt_f446re/Drivers/CMSIS/Core/Template/ARMv8-M/tz_context.c +++ b/openblt_f446re/Drivers/CMSIS/Core/Template/ARMv8-M/tz_context.c @@ -4,6 +4,7 @@ * @version V1.1.1 * @date 10. January 2018 ******************************************************************************/ + /* * Copyright (c) 2016-2018 Arm Limited. All rights reserved. *