summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-12-12 11:59:37 +0700
committerhathach <[email protected]>2023-12-12 11:59:37 +0700
commitb5448a7987cc321607f0641ba3922c5b322e3bb4 (patch)
tree4a3a3f45f4a829d2927bc2e36c77d1ef71eb0cef
parent24c5e6ab451a002d2e9a86a39acc11476250d1a5 (diff)
add feather nrf52840 express to hil pool
-rw-r--r--.github/workflows/cmake_arm.yml16
-rw-r--r--hw/bsp/nrf/family.c12
-rw-r--r--test/hil/hil_pi4.json7
3 files changed, 32 insertions, 3 deletions
diff --git a/.github/workflows/cmake_arm.yml b/.github/workflows/cmake_arm.yml
index 535244c47..0df51a3ca 100644
--- a/.github/workflows/cmake_arm.yml
+++ b/.github/workflows/cmake_arm.yml
@@ -86,14 +86,23 @@ jobs:
# for rp2040, there is no harm if defined for other families
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
- - name: Upload Artifacts for Hardware Testing
- if: contains(matrix.family,'rp2040') && github.repository_owner == 'hathach'
+ - name: Upload Artifacts for Hardware Testing (rp2040)
+ if: matrix.family == 'rp2040' && github.repository_owner == 'hathach'
uses: actions/upload-artifact@v3
with:
name: raspberry_pi_pico
path: |
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)
# 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
if: github.repository_owner == 'hathach'
needs: build-arm
- runs-on: [self-hosted, rp2040, hardware-in-the-loop]
+ runs-on: [self-hosted, rp2040, nrf52840, hardware-in-the-loop]
strategy:
fail-fast: false
matrix:
board:
- 'raspberry_pi_pico'
+ - 'feather_nrf52840_express'
steps:
- name: Clean workspace
run: |
diff --git a/hw/bsp/nrf/family.c b/hw/bsp/nrf/family.c
index 6e0cd85c3..5b0ddc69f 100644
--- a/hw/bsp/nrf/family.c
+++ b/hw/bsp/nrf/family.c
@@ -203,6 +203,18 @@ uint32_t board_button_read(void) {
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 device_id = (uintptr_t) NRF_FICR->INFO.DEVICEID;
+#else
+ uintptr_t device_id = (uintptr_t) NRF_FICR->DEVICEID;
+#endif
+ memcpy(id, (void*) device_id, 8);
+ return 8;
+}
+
int board_uart_read(uint8_t* buf, int len) {
(void) buf;
(void) len;
diff --git a/test/hil/hil_pi4.json b/test/hil/hil_pi4.json
index e9a6721ea..560c3964e 100644
--- a/test/hil/hil_pi4.json
+++ b/test/hil/hil_pi4.json
@@ -16,6 +16,13 @@
"flasher": "esptool",
"flasher_sn": "461cb8d7decdeb119be9b506e93fd3f1",
"flasher_args": "-b 1500000"
+ },
+ {
+ "name": "feather_nrf52840_express",
+ "uid": "1F0479CD0F764471",
+ "flasher": "jlink",
+ "flasher_sn": "000682804350",
+ "flasher_args": "-device nrf52840_xxaa"
}
]
}