Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Added action build_and_release.yml #2

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
tag_name: ${{ env.tag_name }}
files: ./release/**/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 6 additions & 21 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -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
Expand Down
73 changes: 65 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 2 additions & 0 deletions Core/Src/can_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ int main(void) {
while (1) {
__NOP();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @version V1.1.1
* @date 10. January 2018
******************************************************************************/

/*
* Copyright (c) 2016-2018 Arm Limited. All rights reserved.
*
Expand Down