Skip to content

Commit bf4a442

Browse files
authored
chore: Update to latest espp, use idf-component-manager (#12)
* chore: Update to latest espp, use idf-component-manager * fix sa * update to latest * fix build
1 parent 4defd06 commit bf4a442

16 files changed

+696
-124
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,26 @@ jobs:
77

88
runs-on: ubuntu-latest
99

10+
strategy:
11+
matrix:
12+
build:
13+
- path: '.'
14+
target: esp32s3
15+
command: |
16+
idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.test_stand" build
17+
- path: '.'
18+
target: esp32s3
19+
command: |
20+
idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.motorgo" build
21+
1022
steps:
1123
- name: Checkout repo
1224
uses: actions/checkout@v4
13-
with:
14-
submodules: 'recursive'
1525

1626
- name: Build Examples
1727
uses: espressif/esp-idf-ci-action@v1
1828
with:
19-
esp_idf_version: release-v5.2
20-
target: esp32s3
21-
path: '.'
29+
esp_idf_version: release-v5.4
30+
target: ${{ matrix.build.target }}
31+
path: ${{ matrix.build.path }}
32+
command: ${{ matrix.build.command }}

.github/workflows/package_main.yml

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,76 @@ on:
55
branches: [main]
66
release:
77
types: [published]
8+
workflow_dispatch:
89

910
jobs:
1011
build:
1112

1213
runs-on: ubuntu-latest
1314
continue-on-error: false
1415

16+
strategy:
17+
matrix:
18+
build:
19+
- name: 'tinys3_test_stand'
20+
path: '.'
21+
target: esp32s3
22+
command: |
23+
idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.test_stand" build
24+
- name: 'motorgo'
25+
path: '.'
26+
target: esp32s3
27+
command: |
28+
idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.motorgo" build
29+
1530
steps:
1631
- name: Checkout repo
1732
uses: actions/checkout@v4
18-
with:
19-
submodules: 'recursive'
2033

2134
- name: Build Main Code
2235
uses: espressif/esp-idf-ci-action@v1
2336
with:
24-
esp_idf_version: release-v5.2
25-
target: esp32s3
26-
path: '.'
27-
command: 'idf.py build'
37+
esp_idf_version: release-v5.4
38+
target: ${{ matrix.build.target }}
39+
path: ${{ matrix.build.path }}
40+
command: ${{ matrix.build.command }}
2841

2942
- name: Upload Build Outputs
3043
uses: actions/upload-artifact@v4
3144
with:
32-
name: build-artifacts
45+
name: ${{ matrix.build.name }}-build-artifacts
3346
path: |
47+
build/*.bin
48+
build/*.elf
3449
build/bootloader/bootloader.bin
3550
build/partition_table/partition-table.bin
36-
build/bldc_test_stand.bin
51+
build/flasher_args.json
3752
build/flash_args
3853
54+
- name: Zip up files for upload to release
55+
if: ${{ github.event.release && github.event.action == 'published' }}
56+
shell: bash
57+
run: |
58+
cd build
59+
zip -r ../${{ matrix.build.name }}.zip *.bin *.elf bootloader/bootloader.bin partition_table/partition-table.bin flasher_args.json flash_args
60+
cd ..
61+
3962
- name: Attach files to release
4063
uses: softprops/action-gh-release@v2
4164
if: ${{ github.event.release && github.event.action == 'published' }}
4265
with:
43-
files: |
44-
build/bldc_test_stand.bin
45-
build/bootloader/bootloader.bin
46-
build/partition_table/partition-table.bin
47-
build/flash_args
66+
files: ${{ matrix.build.name }}.zip
4867

68+
package:
69+
name: Package the binaries into an executables for Windows, MacOS, and Linux (Ubuntu)
70+
needs: build
71+
strategy:
72+
matrix:
73+
os: [windows-latest, macos-latest, ubuntu-latest]
74+
build: ['tinys3_test_stand', 'motorgo']
75+
runs-on: ${{ matrix.os }}
76+
steps:
77+
- uses: esp-cpp/esp-packaged-programmer-action@v1.0.5
78+
with:
79+
zipfile-name: ${{ matrix.build }}-build-artifacts
80+
programmer-name: 'software-defined-haptics-${{ matrix.build }}_programmer'

.github/workflows/static_analysis.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ jobs:
99
steps:
1010
- name: Checkout repo
1111
uses: actions/checkout@v4
12-
with:
13-
submodules: 'recursive'
1412

1513
- name: Run static analysis
1614
uses: esp-cpp/StaticAnalysis@master
1715
with:
1816
# Do not build the project and do not use cmake to generate compile_commands.json
1917
use_cmake: false
2018

21-
# Use the 5.2 release version since it's what we build with
22-
esp_idf_version: release/v5.2
19+
# Use the 5.4 release version since it's what we build with
20+
esp_idf_version: release/v5.4
2321

2422
# (Optional) cppcheck args
25-
cppcheck_args: -i$GITHUB_WORKSPACE/components/espp --force --enable=all --inline-suppr --inconclusive --platform=mips32 --std=c++17 --suppressions-list=$GITHUB_WORKSPACE/suppressions.txt
23+
cppcheck_args: --check-level=exhaustive --force --enable=all --inline-suppr --inconclusive --platform=mips32 --std=c++17 --suppressions-list=$GITHUB_WORKSPACE/suppressions.txt

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@
3333
build/
3434
sdkconfig
3535
sdkconfig.old
36+
managed_components/

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "components/espp"]
2-
path = components/espp
3-
url = git@github.com:esp-cpp/espp

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# The following lines of boilerplate have to be in your project's CMakeLists
22
# in this exact order for cmake to work correctly
3-
cmake_minimum_required(VERSION 3.5)
3+
cmake_minimum_required(VERSION 3.20)
44

55
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
66

77
# add the component directories that we want to use
88
set(EXTRA_COMPONENT_DIRS
99
"components/"
10-
"components/espp/components/"
1110
)
1211

1312
set(

components/espp

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
idf_component_register(
22
INCLUDE_DIRS "include"
3+
SRC_DIRS "src"
34
REQUIRES base_component filters math mt6701 pid bldc_driver bldc_motor i2c
45
)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## IDF Component Manager Manifest File
2+
dependencies:
3+
## Required IDF version
4+
idf:
5+
version: '>=4.1.0'
6+
# # Put list of dependencies here
7+
# # For components maintained by Espressif:
8+
# component: "~1.0.0"
9+
# # For 3rd party components:
10+
# username/component: ">=1.0.0,<2.0.0"
11+
# username2/component2:
12+
# version: "~1.0.0"
13+
# # For transient dependencies `public` flag can be set.
14+
# # `public` flag doesn't have an effect dependencies of the `main` component.
15+
# # All dependencies of `main` are public by default.
16+
# public: true
17+
espp/filters: '>=1.0'
18+
espp/math: '>=1.0'
19+
espp/mt6701: '>=1.0'
20+
espp/pid: '>=1.0'
21+
espp/bldc_driver: '>=1.0'
22+
espp/bldc_motor: '>=1.0'
23+
espp/i2c: '>=1.0'

0 commit comments

Comments
 (0)