Skip to content

Commit

Permalink
Merge pull request #13 from tesseract-one/new-sdk
Browse files Browse the repository at this point in the history
updated to the new sdk and issue #11 fixes
  • Loading branch information
ypopovych authored May 31, 2024
2 parents 115e2ae + 1ec8bc4 commit 4fa9f5f
Show file tree
Hide file tree
Showing 153 changed files with 3,821 additions and 4,918 deletions.
1 change: 0 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ SortIncludes: false
SpaceAfterCStyleCast: true
AllowShortCaseLabelsOnASingleLine: false
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortFunctionsOnASingleLine: None
BinPackArguments: false
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
make BOLOS_SDK=${{ matrix.SDK }} DEBUG=1
- name: Upload app binary
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: bin
Expand All @@ -43,7 +43,7 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build unit tests
run: |
Expand All @@ -64,14 +64,14 @@ jobs:
lcov --directory . -b "$(realpath build/)" --remove coverage.info '*/unit-tests/*' -o coverage.info && \
genhtml coverage.info -o coverage
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: code-coverage
path: unit-tests/coverage

- name: Upload to codecov.io
if: false
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./unit-tests/coverage.info
Expand All @@ -89,12 +89,12 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: HTML documentation
run: doxygen .doxygen/Doxyfile

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: documentation
path: doc/html
Expand All @@ -108,15 +108,15 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build with Clang Static Analyzer
run: |
make clean
scan-build --use-cc=clang -analyze-headers -enable-checker security -enable-checker unix -enable-checker valist -o scan-build --status-bugs make default
- name: Upload scan result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: scan-build
Expand Down Expand Up @@ -147,17 +147,17 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download app binary
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ergo-app-debug-${{matrix.model}}
path: bin

- name: Run test
run: |
apt-get update && apt-get install -qy curl netcat
apt-get update && apt-get install -qy curl netcat-traditional
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt-get install -qy nodejs
export SEED=`cat tests/seed.txt`
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Lint
uses: DoozyX/clang-format-lint-action@v0.12
Expand All @@ -24,7 +24,7 @@ jobs:

steps:
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
23 changes: 14 additions & 9 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{
"env": {
"BOLOS_SDK": "~/.ledger/sdk/nanos-secure-sdk",
"BOLOS_ENV": "~/.ledger/env",
"GCC_COMPILER_NAME": "gcc-arm-none-eabi-10.3-2021.10"
"BOLOS_SDK": "~/.ledger/nanos-sdk",
"ARM_GCC": "~/.ledger/gcc-arm-none-eabi-13.2-2023.10"
},
"configurations": [
{
"name": "Nano S",
"includePath": [
"${workspaceFolder}/src",
"${workspaceFolder}/build/**",
"${env:BOLOS_ENV}/${env:GCC_COMPILER_NAME}/arm-none-eabi/include",
"${workspaceFolder}/build/nanos/gen_src",
"${env:ARM_GCC}/arm-none-eabi/include/*",
"${env:ARM_GCC}/lib/gcc/arm-none-eabi/13.2.1/include/*",
"${env:BOLOS_SDK}/include/*",
"${env:BOLOS_SDK}/target/nanos/include/*",
"${env:BOLOS_SDK}/lib_bagl/include/*",
"${env:BOLOS_SDK}/lib_ux/include/*",
"${env:BOLOS_SDK}/lib_cxng/include/*"
"${env:BOLOS_SDK}/lib_cxng/include/*",
"${env:BOLOS_SDK}/lib_standard_app/*"
],
"defines": [
"TARGET_NANOS",
Expand Down Expand Up @@ -43,12 +46,14 @@
"PATCH_VERSION=0",
"IO_SEPROXYHAL_BUFFER_SIZE_B=128",
"HAVE_UX_FLOW",
"DEBUG=1",
"DEBUG_BUILD=1",
"HAVE_PRINTF",
"PRINTF=screen_printf"
"PRINTF=screen_printf",
"_DEFAULT_SOURCE"
],
"compilerPath": "${env:BOLOS_ENV}/${env:GCC_COMPILER_NAME}/bin/arm-none-eabi-gcc",
"cStandard": "c99",
"compilerPath": "${env:ARM_GCC}/bin/arm-none-eabi-gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-arm",
"browse": {
Expand Down
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"ms-vscode.cpptools",
"LedgerHQ.ledger-dev-tools",
]
}
5 changes: 3 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
"valuesFormatting": "parseText",
"gdbpath": "gdb-multiarch",
"autorun": [
"set substitute-path /project ${workspaceFolder}",
"set architecture arm",
"set backtrace limit 15",
"handle SIGILL nostop pass noprint",
"add-symbol-file ${workspaceFolder}/bin/app.elf 0x40000000",
"b *0x40000000",
"c"
"b *0x40000000"
]
}
]
Expand Down
21 changes: 4 additions & 17 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
{
"files.associations": {
"*.h": "c",
"cstdio": "c",
"optional": "c",
"istream": "c",
"ostream": "c",
"ratio": "c",
"system_error": "c",
"array": "c",
"functional": "c",
"tuple": "c",
"type_traits": "c",
"utility": "c",
"limits": "c",
"numeric": "c",
"stop_token": "c"
"format": "c"
},
"C_Cpp.clang_format_path": "/usr/bin/clang-format",
"editor.formatOnSave": true,
"cmake.configureOnOpen": false
"editor.formatOnSave": false,
"python.terminal.activateEnvironment": false,
"git.ignoreLimitWarning": true,
}
111 changes: 0 additions & 111 deletions .vscode/tasks.json

This file was deleted.

Loading

0 comments on commit 4fa9f5f

Please sign in to comment.