mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-07 05:54:11 +08:00
Merge pull request #2371 from hathach/hil-add-nrf52840
add nrf52840 to hard in the loop pool
This commit is contained in:
commit
b6ad70bad9
8
.github/workflows/build_esp.yml
vendored
8
.github/workflows/build_esp.yml
vendored
@ -95,3 +95,11 @@ jobs:
|
|||||||
- name: Test on actual hardware
|
- name: Test on actual hardware
|
||||||
run: |
|
run: |
|
||||||
python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json
|
python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json
|
||||||
|
|
||||||
|
- name: Reset USB bus
|
||||||
|
run: |
|
||||||
|
for port in $(lspci | grep USB | cut -d' ' -f1); do
|
||||||
|
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
|
||||||
|
sleep 1;
|
||||||
|
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
|
||||||
|
done
|
||||||
|
24
.github/workflows/cmake_arm.yml
vendored
24
.github/workflows/cmake_arm.yml
vendored
@ -86,14 +86,23 @@ jobs:
|
|||||||
# for rp2040, there is no harm if defined for other families
|
# for rp2040, there is no harm if defined for other families
|
||||||
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
|
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
|
||||||
|
|
||||||
- name: Upload Artifacts for Hardware Testing
|
- name: Upload Artifacts for Hardware Testing (rp2040)
|
||||||
if: contains(matrix.family,'rp2040') && github.repository_owner == 'hathach'
|
if: matrix.family == 'rp2040' && github.repository_owner == 'hathach'
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: raspberry_pi_pico
|
name: raspberry_pi_pico
|
||||||
path: |
|
path: |
|
||||||
cmake-build/cmake-build-raspberry_pi_pico/*/*/*.elf
|
cmake-build/cmake-build-raspberry_pi_pico/*/*/*.elf
|
||||||
|
|
||||||
|
- name: Upload Artifacts for Hardware Testing (nRF)
|
||||||
|
if: matrix.family == 'nrf' && github.repository_owner == 'hathach'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: feather_nrf52840_express
|
||||||
|
path: |
|
||||||
|
cmake-build/cmake-build-feather_nrf52840_express/*/*/*.elf
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
# Hardware in the loop (HIL)
|
# Hardware in the loop (HIL)
|
||||||
# Current self-hosted instance is running on an RPI4. For attached hardware checkout hil_pi4.json
|
# Current self-hosted instance is running on an RPI4. For attached hardware checkout hil_pi4.json
|
||||||
@ -102,12 +111,13 @@ jobs:
|
|||||||
# run only with hathach's commit due to limited resource on RPI4
|
# run only with hathach's commit due to limited resource on RPI4
|
||||||
if: github.repository_owner == 'hathach'
|
if: github.repository_owner == 'hathach'
|
||||||
needs: build-arm
|
needs: build-arm
|
||||||
runs-on: [self-hosted, rp2040, hardware-in-the-loop]
|
runs-on: [self-hosted, rp2040, nrf52840, hardware-in-the-loop]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
board:
|
board:
|
||||||
- 'raspberry_pi_pico'
|
- 'raspberry_pi_pico'
|
||||||
|
- 'feather_nrf52840_express'
|
||||||
steps:
|
steps:
|
||||||
- name: Clean workspace
|
- name: Clean workspace
|
||||||
run: |
|
run: |
|
||||||
@ -129,3 +139,11 @@ jobs:
|
|||||||
- name: Test on actual hardware
|
- name: Test on actual hardware
|
||||||
run: |
|
run: |
|
||||||
python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json
|
python3 test/hil/hil_test.py --board ${{ matrix.board }} hil_pi4.json
|
||||||
|
|
||||||
|
- name: Reset USB bus
|
||||||
|
run: |
|
||||||
|
for port in $(lspci | grep USB | cut -d' ' -f1); do
|
||||||
|
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
|
||||||
|
sleep 1;
|
||||||
|
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
|
||||||
|
done
|
||||||
|
@ -203,6 +203,22 @@ uint32_t board_button_read(void) {
|
|||||||
return BUTTON_STATE_ACTIVE == nrf_gpio_pin_read(BUTTON_PIN);
|
return BUTTON_STATE_ACTIVE == nrf_gpio_pin_read(BUTTON_PIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t board_get_unique_id(uint8_t id[], size_t max_len) {
|
||||||
|
(void) max_len;
|
||||||
|
|
||||||
|
#ifdef NRF5340_XXAA
|
||||||
|
uintptr_t did_addr = (uintptr_t) NRF_FICR->INFO.DEVICEID;
|
||||||
|
#else
|
||||||
|
uintptr_t did_addr = (uintptr_t) NRF_FICR->DEVICEID;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const uint8_t* device_id = (const uint8_t*) did_addr;
|
||||||
|
for(uint8_t i=0; i<8; i++) {
|
||||||
|
id[i] = device_id[i];
|
||||||
|
}
|
||||||
|
return 8;
|
||||||
|
}
|
||||||
|
|
||||||
int board_uart_read(uint8_t* buf, int len) {
|
int board_uart_read(uint8_t* buf, int len) {
|
||||||
(void) buf;
|
(void) buf;
|
||||||
(void) len;
|
(void) len;
|
||||||
|
@ -16,6 +16,13 @@
|
|||||||
"flasher": "esptool",
|
"flasher": "esptool",
|
||||||
"flasher_sn": "461cb8d7decdeb119be9b506e93fd3f1",
|
"flasher_sn": "461cb8d7decdeb119be9b506e93fd3f1",
|
||||||
"flasher_args": "-b 1500000"
|
"flasher_args": "-b 1500000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "feather_nrf52840_express",
|
||||||
|
"uid": "1F0479CD0F764471",
|
||||||
|
"flasher": "jlink",
|
||||||
|
"flasher_sn": "000682804350",
|
||||||
|
"flasher_args": "-device nrf52840_xxaa"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user