Skip to content

Commit ea30041

Browse files
authored
Merge branch 'hathach:master' into nxp_k64
2 parents 9063ede + f918406 commit ea30041

File tree

574 files changed

+32087
-11895
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

574 files changed

+32087
-11895
lines changed

.github/workflows/build_aarch64.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,12 @@ jobs:
3636
- 'broadcom_64bit'
3737
steps:
3838
- name: Setup Python
39-
uses: actions/setup-python@v4
39+
uses: actions/setup-python@v5
4040
with:
4141
python-version: '3.x'
4242

4343
- name: Checkout TinyUSB
44-
uses: actions/checkout@v3
45-
46-
- name: Checkout hathach/linkermap
47-
uses: actions/checkout@v3
48-
with:
49-
repository: hathach/linkermap
50-
path: linkermap
44+
uses: actions/checkout@v4
5145

5246
- name: Set Toolchain URL
5347
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
@@ -73,12 +67,4 @@ jobs:
7367
run: python3 tools/get_deps.py ${{ matrix.family }}
7468

7569
- name: Build
76-
run: python3 tools/build_family.py ${{ matrix.family }}
77-
78-
- name: Linker Map
79-
run: |
80-
pip install linkermap/
81-
for ex in `ls -d examples/device/*/`; do \
82-
find ${ex} -name *.map -print -quit | \
83-
xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
84-
done
70+
run: python3 tools/build_make.py ${{ matrix.family }}

.github/workflows/build_arm.yml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 'examples/**'
99
- 'lib/**'
1010
- 'hw/**'
11+
- 'tools/get_deps.py'
1112
- '.github/workflows/build_arm.yml'
1213
pull_request:
1314
branches: [ master ]
@@ -16,6 +17,7 @@ on:
1617
- 'examples/**'
1718
- 'lib/**'
1819
- 'hw/**'
20+
- 'tools/get_deps.py'
1921
- '.github/workflows/build_arm.yml'
2022

2123
concurrency:
@@ -35,19 +37,16 @@ jobs:
3537
# Alphabetical order
3638
- 'broadcom_32bit'
3739
- 'kinetis_k32l2'
38-
- 'lpc11 lpc13 lpc15 lpc17'
39-
- 'lpc51 lpc54'
40+
- 'lpc11 lpc13 lpc15'
41+
- 'lpc51'
4042
- 'mm32 msp432e4'
41-
- 'nrf'
42-
- 'samd11 samd21'
43-
- 'samd51 same5x'
44-
- 'saml2x'
43+
- 'samd11 same5x saml2x'
4544
- 'stm32f2 stm32f3'
46-
- 'stm32l0 stm32u5 stm32wb'
45+
- 'stm32l0 stm32wb'
4746
- 'tm4c123 xmc4000'
4847
steps:
4948
- name: Setup Python
50-
uses: actions/setup-python@v4
49+
uses: actions/setup-python@v5
5150
with:
5251
python-version: '3.x'
5352

@@ -57,25 +56,10 @@ jobs:
5756
release: '11.2-2022.02'
5857

5958
- name: Checkout TinyUSB
60-
uses: actions/checkout@v3
61-
62-
- name: Checkout hathach/linkermap
63-
uses: actions/checkout@v3
64-
with:
65-
repository: hathach/linkermap
66-
path: linkermap
59+
uses: actions/checkout@v4
6760

6861
- name: Get Dependencies
6962
run: python3 tools/get_deps.py ${{ matrix.family }}
7063

7164
- name: Build
72-
run: python3 tools/build_family.py ${{ matrix.family }}
73-
74-
- name: Linker Map
75-
run: |
76-
pip install linkermap/
77-
# find -quit to only print linkermap of 1 board per example
78-
for ex in `ls -d examples/*/*/`
79-
do
80-
find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
81-
done
65+
run: python3 tools/build_make.py ${{ matrix.family }}

.github/workflows/build_esp.yml

Lines changed: 62 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 'examples/**'
99
- 'lib/**'
1010
- 'hw/**'
11+
- 'test/hil/**'
1112
- '.github/workflows/build_esp.yml'
1213
pull_request:
1314
branches: [ master ]
@@ -16,6 +17,7 @@ on:
1617
- 'examples/**'
1718
- 'lib/**'
1819
- 'hw/**'
20+
- 'test/hil/**'
1921
- '.github/workflows/build_esp.yml'
2022

2123
concurrency:
@@ -29,39 +31,78 @@ jobs:
2931
fail-fast: false
3032
matrix:
3133
board:
32-
# Alphabetical order
3334
# ESP32-S2
34-
- 'espressif_saola_1'
35+
- 'espressif_kaluga_1'
3536
# ESP32-S3
36-
#- 'espressif_s3_devkitm'
37-
# S3 compile error with "dangerous relocation: call8: call target out of range: memcpy"
38-
37+
- 'espressif_s3_devkitc'
3938
steps:
4039
- name: Setup Python
41-
uses: actions/setup-python@v4
40+
uses: actions/setup-python@v5
4241
with:
4342
python-version: '3.x'
4443

4544
- name: Pull ESP-IDF docker
4645
run: docker pull espressif/idf:latest
4746

4847
- name: Checkout TinyUSB
49-
uses: actions/checkout@v3
48+
uses: actions/checkout@v4
49+
50+
- name: Build
51+
run: docker run --rm -v $PWD:/project -w /project espressif/idf:v5.1.1 python3 tools/build_esp32.py ${{ matrix.board }}
5052

51-
- name: Checkout hathach/linkermap
52-
uses: actions/checkout@v3
53+
- name: Upload Artifacts for Hardware Testing
54+
if: matrix.board == 'espressif_s3_devkitc' && github.repository_owner == 'hathach'
55+
uses: actions/upload-artifact@v3
5356
with:
54-
repository: hathach/linkermap
55-
path: linkermap
57+
name: ${{ matrix.board }}
58+
path: |
59+
cmake-build/cmake-build-${{ matrix.board }}/*/*/bootloader/bootloader.bin
60+
cmake-build/cmake-build-${{ matrix.board }}/*/*/*.bin
61+
cmake-build/cmake-build-${{ matrix.board }}/*/*/partition_table/partition-table.bin
62+
cmake-build/cmake-build-${{ matrix.board }}/*/*/config.env
63+
cmake-build/cmake-build-${{ matrix.board }}/*/*/flash_args
5664
57-
- name: Build
58-
run: docker run --rm -v $PWD:/project -w /project espressif/idf:latest python3 tools/build_esp32.py ${{ matrix.board }}
65+
# ---------------------------------------
66+
# Hardware in the loop (HIL)
67+
# Current self-hosted instance is running on an RPI4. For attached hardware checkout hil_pi4.json
68+
# ---------------------------------------
69+
hil-test:
70+
# run only with hathach's commit due to limited resource on RPI4
71+
if: github.repository_owner == 'hathach'
72+
needs: build-esp
73+
runs-on: [self-hosted, esp32s3, hardware-in-the-loop]
74+
strategy:
75+
fail-fast: false
76+
matrix:
77+
board:
78+
- 'espressif_s3_devkitc'
79+
steps:
80+
- name: Clean workspace
81+
run: |
82+
echo "Cleaning up previous run"
83+
rm -rf "${{ github.workspace }}"
84+
mkdir -p "${{ github.workspace }}"
85+
86+
# USB bus on rpi4 is not stable, reset it before testing
87+
- name: Reset USB bus
88+
run: |
89+
for port in $(lspci | grep USB | cut -d' ' -f1); do
90+
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
91+
sleep 0.1;
92+
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
93+
done
94+
95+
- name: Checkout test/hil
96+
uses: actions/checkout@v4
97+
with:
98+
sparse-checkout: test/hil
99+
100+
- name: Download Artifacts
101+
uses: actions/download-artifact@v3
102+
with:
103+
name: ${{ matrix.board }}
104+
path: cmake-build/cmake-build-${{ matrix.board }}
59105

60-
- name: Linker Map
61-
run: |
62-
pip install linkermap/
63-
# find -quit to only print linkermap of 1 board per example
64-
for ex in `ls -d examples/device/*/`
65-
do
66-
find ${ex} -maxdepth 3 -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
67-
done
106+
- name: Test on actual hardware
107+
run: |
108+
python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json

.github/workflows/build_iar.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
- 'examples/**'
99
- 'lib/**'
1010
- 'hw/**'
11+
- 'tools/get_deps.py'
12+
- 'test/hil/**'
1113
- '.github/workflows/build_iar.yml'
1214
pull_request:
1315
branches: [ master ]
@@ -16,6 +18,8 @@ on:
1618
- 'examples/**'
1719
- 'lib/**'
1820
- 'hw/**'
21+
- 'tools/get_deps.py'
22+
- 'test/hil/**'
1923
- '.github/workflows/build_iar.yml'
2024

2125
concurrency:
@@ -32,7 +36,7 @@ jobs:
3236
# Alphabetical order
3337
# Note: bundle multiple families into a matrix since there is only one self-hosted instance can
3438
# run IAR build. Too many matrix can hurt due to setup/teardown overhead.
35-
- 'lpc43 stm32f0 stm32f1 stm32f4 stm32f7 stm32g0 stm32g4 stm32h7 stm32l4'
39+
- 'lpc43 stm32f0 stm32f1 stm32f7 stm32g0 stm32g4 stm32l4'
3640
steps:
3741
- name: Clean workspace
3842
run: |
@@ -41,7 +45,7 @@ jobs:
4145
mkdir -p "${{ github.workspace }}"
4246
4347
- name: Checkout TinyUSB
44-
uses: actions/checkout@v3
48+
uses: actions/checkout@v4
4549

4650
- name: Get Dependencies
4751
run: python3 tools/get_deps.py ${{ matrix.family }}

.github/workflows/build_msp430.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 'examples/**'
99
- 'lib/**'
1010
- 'hw/**'
11+
- 'tools/get_deps.py'
1112
- '.github/workflows/build_msp430.yml'
1213
pull_request:
1314
branches: [ master ]
@@ -16,6 +17,7 @@ on:
1617
- 'examples/**'
1718
- 'lib/**'
1819
- 'hw/**'
20+
- 'tools/get_deps.py'
1921
- '.github/workflows/build_msp430.yml'
2022

2123
concurrency:
@@ -34,18 +36,12 @@ jobs:
3436

3537
steps:
3638
- name: Setup Python
37-
uses: actions/setup-python@v4
39+
uses: actions/setup-python@v5
3840
with:
3941
python-version: '3.x'
4042

4143
- name: Checkout TinyUSB
42-
uses: actions/checkout@v3
43-
44-
- name: Checkout hathach/linkermap
45-
uses: actions/checkout@v3
46-
with:
47-
repository: hathach/linkermap
48-
path: linkermap
44+
uses: actions/checkout@v4
4945

5046
- name: Set Toolchain URL
5147
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2
@@ -71,13 +67,4 @@ jobs:
7167
run: python3 tools/get_deps.py ${{ matrix.family }}
7268

7369
- name: Build
74-
run: python3 tools/build_family.py ${{ matrix.family }}
75-
76-
- name: Linker Map
77-
run: |
78-
pip install linkermap/
79-
# find -quit to only print linkermap of 1 board per example
80-
for ex in `ls -d examples/device/*/`
81-
do
82-
find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
83-
done
70+
run: python3 tools/build_make.py ${{ matrix.family }}

.github/workflows/build_renesas.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 'examples/**'
99
- 'lib/**'
1010
- 'hw/**'
11+
- 'tools/get_deps.py'
1112
- '.github/workflows/build_renesas.yml'
1213
pull_request:
1314
branches: [ master ]
@@ -16,6 +17,7 @@ on:
1617
- 'examples/**'
1718
- 'lib/**'
1819
- 'hw/**'
20+
- 'tools/get_deps.py'
1921
- '.github/workflows/build_renesas.yml'
2022

2123
concurrency:
@@ -33,18 +35,12 @@ jobs:
3335
- 'rx'
3436
steps:
3537
- name: Setup Python
36-
uses: actions/setup-python@v4
38+
uses: actions/setup-python@v5
3739
with:
3840
python-version: '3.x'
3941

4042
- name: Checkout TinyUSB
41-
uses: actions/checkout@v3
42-
43-
- name: Checkout hathach/linkermap
44-
uses: actions/checkout@v3
45-
with:
46-
repository: hathach/linkermap
47-
path: linkermap
43+
uses: actions/checkout@v4
4844

4945
- name: Set Toolchain URL
5046
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=http://gcc-renesas.com/downloads/get.php?f=rx/8.3.0.202004-gnurx/gcc-8.3.0.202004-GNURX-ELF.run
@@ -71,13 +67,4 @@ jobs:
7167
run: python3 tools/get_deps.py ${{ matrix.family }}
7268

7369
- name: Build
74-
run: python3 tools/build_family.py ${{ matrix.family }}
75-
76-
- name: Linker Map
77-
run: |
78-
pip install linkermap/
79-
# find -quit to only print linkermap of 1 board per example
80-
for ex in `ls -d examples/device/*/`
81-
do
82-
find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
83-
done
70+
run: python3 tools/build_make.py ${{ matrix.family }}

0 commit comments

Comments
 (0)