Skip to content
Merged
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
7 changes: 0 additions & 7 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install clang-format
run: sudo apt-get install -y clang-format

- name: Check formatting in /src
run: |
find ./src \( -iname '*.h' -o -iname '*.cpp' \) -print0 | xargs -0 clang-format --dry-run --Werror
Expand All @@ -25,25 +23,20 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: install build dependancies
run: sudo apt install gcc python3 cmake gcc-arm-none-eabi binutils-arm-none-eabi

- name: microinstall
run: |
chmod +x microinstall.sh
./microinstall.sh

- name: Add micro-tools to path
run: |
source ./aliases.sh
chmod +x ./aliases.sh
./aliases.sh

- name: Copy src foldet to sdk
run: |
rsync -a --delete ./src/ ./microbit-v2-sdk/source/

- name: microbuild python
run: |
cd microbit-v2-sdk
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ Feed in filepath to microbit-v2-sdk: /Users/geirolatvinnereim/AirBit/microbit-v2

If nrf_sdh_soc_init() cannot be found. You have called build from a wrong folder. Chech microbit-v2-sdk/source and assure that only the src/.cpp files are present.

If there are build errors in the Codal SDK. There are probably some conflicting file names or methods which causes build errors. Delete the build folder produces in /microbit-v2-sdk and rebuild.

### Debugging

In order allow debugging, the project needs to be built by navigating into the microbit-v2-sdk and access debugger inside Visual Studio Code.
Expand All @@ -79,8 +81,7 @@ python3 build.py
We want to utilize a dynamic analysis tool, which can linter codebase, not a static one

Using **clang-format** as dynamic cpp-linter. install and usage:
This command line tool can only linter one file at a time, so we need to apply recursiveness
This command line tool can only linter one file at a time, so we need to apply recursiveness at src
```console
brew install clang-format
find /Users/geirolatvinnereim/AirBit/src -iname '*.h' -o -iname '*.cpp' | xargs clang-format -i
./linter.sh
```
1 change: 0 additions & 1 deletion formatting.sh

This file was deleted.

1 change: 1 addition & 0 deletions linter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
find ./src -iname '*.h' -o -iname '*.cpp' | xargs clang-format -i
Loading