Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
352ec75
Added docs folder
feesmrt Nov 26, 2022
2492f82
Added docify project
feesmrt Nov 26, 2022
b408a4a
Added francor logo
feesmrt Nov 26, 2022
7779940
Started protocol description
feesmrt Nov 26, 2022
343abc8
Added basic structure of project
feesmrt Nov 26, 2022
e6e882d
Added first test
feesmrt Nov 26, 2022
e16ef21
Removed unused files
feesmrt Nov 26, 2022
3814adf
Added github action
feesmrt Nov 26, 2022
8940b8e
Added install gtest
feesmrt Nov 26, 2022
fc40ee4
Fix of install of gtest
feesmrt Nov 26, 2022
2e34a33
Changed job name
feesmrt Nov 26, 2022
5a3c5cb
Splitted jobs into build and test
feesmrt Nov 26, 2022
4a3295f
Added flash info for handler
feesmrt Nov 26, 2022
cb0ed0b
Added convert functions + startet implementation of ping req
feesmrt Nov 27, 2022
e026cfe
Changed organisation of tests
feesmrt Nov 27, 2022
65d50ae
Added test for data conversion
feesmrt Nov 28, 2022
4f86f77
ReqPing implemented
feesmrt Nov 28, 2022
cc1ef29
Added test for general requests
feesmrt Nov 28, 2022
52ad3c0
Added documentation for start app
feesmrt Nov 28, 2022
49c2d6d
Added reset device request
feesmrt Nov 28, 2022
6356327
Restructured error handling + added start app request
feesmrt Nov 28, 2022
7819cf9
Started implementation of start app request
feesmrt Nov 28, 2022
110634b
Added CRC simulation
feesmrt Nov 29, 2022
912b7f9
Added cleanup task
feesmrt Nov 29, 2022
f3c6aa5
Refactoring of test
feesmrt Nov 29, 2022
1b051da
Moved handle inside test class
feesmrt Nov 29, 2022
cacc2fa
Started implementation of device info
feesmrt Nov 29, 2022
166abb9
Added dev info messages + tests
feesmrt Nov 29, 2022
0cac18a
Updated docs
feesmrt Nov 29, 2022
bb6775b
Added req flash info + tests
feesmrt Nov 30, 2022
de66931
Added docs for flash info requests
feesmrt Nov 30, 2022
ce0da5f
Added tests for app info
feesmrt Nov 30, 2022
7d0936f
Added docs for app info
feesmrt Nov 30, 2022
65ef214
Refactoring added test utils class
feesmrt Nov 30, 2022
7d86a96
Refactored tests to use TestHelper class
feesmrt Nov 30, 2022
bdcfd3a
Refactoring of test directory structure
feesmrt Nov 30, 2022
da6a62d
Changed data type of hwi functions
feesmrt Nov 30, 2022
0d0d174
Tests now check crc src address and byte size
feesmrt Nov 30, 2022
608df89
Added page buffer requests including tests
feesmrt Dec 1, 2022
c9a2fb1
Updated page buffer requests + tests
feesmrt Dec 1, 2022
c4f4bc8
Implemented flash read commands
feesmrt Dec 1, 2022
b16cf12
Started implementation fo write flash requests
feesmrt Dec 1, 2022
03ff8b1
Write flash functions implemented + tests
feesmrt Dec 1, 2022
adbb338
Refactoring - changed rresponse to result
feesmrt Dec 21, 2022
46a6cf1
Doc update response to result (refactoring)
feesmrt Dec 21, 2022
8daa1f1
Fix: CRC calculation didn't exclude stored CRC value
feesmrt Jan 8, 2023
af89457
Moved isAppValid func to public
feesmrt Jan 8, 2023
cafaec0
Added msg conversion from raw to struct and vice versa
feesmrt Jan 17, 2023
e5f3c7f
Started implementation of device simulator
feesmrt Jan 17, 2023
183e3db
Modified device sim api
feesmrt Feb 22, 2023
9cf2549
Added utils dir to github actions
feesmrt Feb 22, 2023
57df71b
Fixed initialization warning
feesmrt Aug 22, 2023
080bf35
Added 128-bit UID
feesmrt Aug 25, 2023
0f18ef5
Updated documentation
feesmrt Sep 14, 2025
5ccb092
Updated github workflow
feesmrt Sep 14, 2025
887d919
Changed mkdir command within workflow
feesmrt Sep 14, 2025
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
7 changes: 7 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
BasedOnStyle: Google
IndentWidth: 2
---
Language: Cpp
ColumnLimit: 120
UseTab: Never
51 changes: 51 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
Checks: >
-*,
bugprone-*,
clang-diagnostic-*,
-clang-diagnostic-unused-command-line-argument,
google-*,
misc-*,
-misc-noexcept*,
modernize-*,
-modernize-deprecated-headers,
-modernize-raw-string-literal,
-modernize-return-braced-init-list,
-modernize-use-equals-delete,
-modernize-use-trailing-return-type,
performance-*,
readability-*,
-readability-implicit-bool-conversion,
-readability-isolate-declaration,
-readability-uppercase-literal-suffix
WarningsAsErrors: false
HeaderFilterRegex: '\.\./.*/([^t].*|t[^h].*|th[^i].*)'
AnalyzeTemporaryDtors: false
FormatStyle: file
CheckOptions:
- key: bugprone-assert-side-effect.AssertMacros
value: 'FXL_DCHECK'
- key: google-readability-braces-around-statements.ShortStatementLines
value: '2'
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: modernize-use-default-member-init.UseAssignment
value: '1'
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: readability-braces-around-statements.ShortStatementLines
value: '2'
2 changes: 2 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ARG VARIANT="latest"
FROM bausma/mbed-dev-env:${VARIANT}
44 changes: 44 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/ubuntu
{
"name": "EduArt Bootloader Dev Container",
"build": {
"dockerfile": "Dockerfile",
"args": { "VARIANT": "latest" },
},
"runArgs": [
"-it",
"--rm",
"--privileged",
"--net=host",
"--pid=host",
"--device=/dev/stlinkv2_2"
],
"workspaceMount": "source=${localWorkspaceFolder},target=/home/user/${localWorkspaceFolderBasename},type=bind",
"workspaceFolder": "/home/user/${localWorkspaceFolderBasename}",
"remoteUser": "user",
"extensions": [
//"ms-vscode.cpptools",
//"ms-vscode.cpptools-linux",
"shd101wyy.markdown-preview-enhanced",
"2gua.rainbow-brackets",
"ms-vscode.cmake-tools",
"ms-vscode.cpptools-extension-pack",
"llvm-vs-code-extensions.vscode-clangd",
"xaver.clang-format",
"ms-python.python",
"ms-azuretools.vscode-docker",
"ms-vscode-remote.remote-containers",
"vscode-icons-team.vscode-icons",
"editorconfig.editorconfig",
"eamodio.gitlens",
"xaver.clang-format",
"llvm-vs-code-extensions.vscode-clangd",
"streetsidesoftware.code-spell-checker",
"cschlosser.doxdocgen",
"yzhang.markdown-all-in-one",
"rust-lang.rust-analyzer",
"notskm.clang-tidy"
]
}

46 changes: 46 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy Documentation

on:
# Trigger when documentation files are updated on master
push:
branches: [ master ]
paths:
- 'docs/**'
- 'README.md'
# Manual trigger
workflow_dispatch:

jobs:
deploy-docs:
name: Deploy Documentation to GitHub Pages
runs-on: ubuntu-latest

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload documentation artifacts
uses: actions/upload-pages-artifact@v3
with:
path: './docs'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3

- name: Output deployment URL
run: |
echo "Documentation deployed successfully!"
echo "Available at: ${{ steps.deployment.outputs.page_url }}"
98 changes: 98 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: CI/CD Pipeline

on:
push:
branches: [ master, devel ]
paths:
# Trigger on code changes
- 'include/**'
- 'src/**'
- 'tests/**'
- 'utils/**'
- 'CMakeLists.txt'
- '.github/workflows/**'
pull_request:
branches: [ master, devel ]
paths:
- 'include/**'
- 'src/**'
- 'tests/**'
- 'utils/**'
- 'CMakeLists.txt'
- '.github/workflows/**'

jobs:
# Test and build the library
test-build:
name: Test and Build Library
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential libgtest-dev

- name: Build Google Test
run: |
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cp lib/*.a /usr/lib

- name: Create build directory
run: mkdir -p build

- name: Configure CMake
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release

- name: Build project
run: |
cd build
make -j$(nproc)

- name: Run tests
run: |
cd build
CTEST_OUTPUT_ON_FAILURE=1 ctest --verbose

# Deploy documentation to GitHub Pages (only on master branch after successful tests)
deploy-docs:
name: Deploy Documentation
runs-on: ubuntu-latest
needs: test-build
if: github.ref == 'refs/heads/master' && github.event_name == 'push'

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload documentation artifacts
uses: actions/upload-pages-artifact@v3
with:
path: './docs'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3

- name: Output deployment info
run: |
echo "Documentation deployment completed!"
echo "Available at: ${{ steps.deployment.outputs.page_url }}"
51 changes: 51 additions & 0 deletions .github/workflows/test_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build library and run tests
on:
# Manual trigger only - main workflow handles automatic triggers
workflow_dispatch:
# Also trigger on pull requests for testing
pull_request:
branches: [ master, devel ]
paths:
- '.github/workflows/**'
- 'include/**'
- 'src/**'
- 'tests/**'
- 'utils/**'
- 'CMakeLists.txt'

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential libgtest-dev

- name: Build Google Test
run: |
cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make
sudo cp lib/*.a /usr/lib

- name: Create build directory
run: mkdir -p build

- name: Configure CMake
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release

- name: Build project
run: |
cd build
make -j$(nproc)

- name: Run tests
run: |
cd build
CTEST_OUTPUT_ON_FAILURE=1 ctest --verbose
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build/*
compile_commands.json
.cache
22 changes: 22 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"configurations": [
{
"name": "Linux",
"intelliSenseMode": "${default}",
"includePath": [
"${workspaceFolder}/include"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++17",
"compileCommands": "${workspaceFolder}/compile_commands.json",
"browse": {
"path": ["${workspaceFolder}"],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
}
],
"version": 4
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"clangd.arguments": [
"--header-insertion=never"
],
"C_Cpp.intelliSenseEngine": "Disabled",
"editor.defaultFormatter": "xaver.clang-format",
"editor.formatOnSave": true,
"cSpell.diagnosticLevel": "Hint",
"cSpell.ignoreRegExpList": [
".*"
]

}
27 changes: 27 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"type": "shell",
"command": "cmake .. && make && CTEST_OUTPUT_ON_FAILURE=TRUE make test && cp compile_commands.json ${workspaceFolder}",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher":"$gcc",
"options": {"cwd": "${workspaceFolder}/build"}
},
{
"label": "Cleanup",
"type": "shell",
"command": "rm compile_commands.json; rm -r build/*",
"group": {
"kind": "build",
"isDefault": false
},
}
]
}
Loading