From 3ef4464b65ded7f493f197e716ff38e1b9a90763 Mon Sep 17 00:00:00 2001 From: rbaron Date: Tue, 15 Oct 2024 19:02:35 +0200 Subject: [PATCH 1/9] SDK 2.7.0 -- implicit double promotion warnings fix In [018dbcfd6679c273842084ce34c167295bc6f354](https://github.com/zephyrproject-rtos/zephyr/commit/018dbcfd6679c273842084ce34c167295bc6f354), Zephyr introduced the -Wdouble-promotion compiler flag. We have some debugging logs that implicitly promote floats to double, and it generates a lot of warnings. This commit fixes it. --- code/nrf-connect/prstlib/include/prstlib/macros.h | 2 ++ code/nrf-connect/prstlib/src/adc.c | 7 ++++--- code/nrf-connect/prstlib/src/sensors.c | 8 ++++---- code/nrf-connect/prstlib/src/shtc3.c | 4 ++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/code/nrf-connect/prstlib/include/prstlib/macros.h b/code/nrf-connect/prstlib/include/prstlib/macros.h index 2049d9e..0e93aac 100644 --- a/code/nrf-connect/prstlib/include/prstlib/macros.h +++ b/code/nrf-connect/prstlib/include/prstlib/macros.h @@ -21,4 +21,6 @@ #define UNUSED_OK(expr) (void)expr; +#define DOUBLE_PROMO_OK(expr) (double)(expr) + #endif // _PRST_MACROS_H_ \ No newline at end of file diff --git a/code/nrf-connect/prstlib/src/adc.c b/code/nrf-connect/prstlib/src/adc.c index 33c1df6..e2a26dc 100644 --- a/code/nrf-connect/prstlib/src/adc.c +++ b/code/nrf-connect/prstlib/src/adc.c @@ -97,7 +97,8 @@ static inline float get_soil_moisture_percent(float battery_voltage, const float wet = eval_poly(wet_coeffs, x); const float percent = (raw_adc_output - dry) / (wet - dry); LOG_DBG("Read soil moisture 2: %.2f | Raw %u | Batt: %.2f | Dry: %.2f | Wet: %.2f", - 100.0f * percent, raw_adc_output, x, dry, wet); + DOUBLE_PROMO_OK(100 * percent), + raw_adc_output, DOUBLE_PROMO_OK(x), DOUBLE_PROMO_OK(dry), DOUBLE_PROMO_OK(wet)); return percent; } @@ -177,7 +178,7 @@ int prst_adc_photo_read(float battery_voltage, prst_adc_photo_sensor_t* out) { const float current_sun = 3.59e-3f; const float current = out->adc_read.voltage / phototransistor_resistor; out->brightness = MAX(0, MIN(lux_sun * current / current_sun, UINT16_MAX)); - LOG_DBG("Read phototransistor: %u lx | %.2f V", out->brightness, out->adc_read.voltage); + LOG_DBG("Read phototransistor: %u lx | %.2f V", out->brightness, DOUBLE_PROMO_OK(out->adc_read.voltage)); #elif DT_NODE_EXISTS(DT_NODELABEL(ldr)) RET_IF_ERR(gpio_pin_set_dt(&ldr_enable_dt, 1)); @@ -201,7 +202,7 @@ int prst_adc_photo_read(float battery_voltage, prst_adc_photo_sensor_t* out) { const float pow_value = 1.5832f; out->brightness = MAX(0, MIN(mult_value / powf(photo_resistance, pow_value), UINT16_MAX)); - LOG_DBG("Read LDR: %u lx | %.2f V", out->brightness, out->adc_read.voltage); + LOG_DBG("Read LDR: %u lx | %.2f V", out->brightness, DOUBLE_PROMO_OK(out->adc_read.voltage)); #endif diff --git a/code/nrf-connect/prstlib/src/sensors.c b/code/nrf-connect/prstlib/src/sensors.c index ce9bfd5..1cc6694 100644 --- a/code/nrf-connect/prstlib/src/sensors.c +++ b/code/nrf-connect/prstlib/src/sensors.c @@ -15,12 +15,12 @@ int prst_sensors_read_all(prst_sensors_t *sensors) { RET_IF_ERR(prst_shtc3_read(&sensors->shtc3)) LOG_DBG("Batt: %d mV (%.2f%%)", sensors->batt.adc_read.millivolts, - 100 * sensors->batt.percentage); - LOG_DBG("Soil: %.0f %%", 100 * sensors->soil.percentage); + DOUBLE_PROMO_OK(100 * sensors->batt.percentage)); + LOG_DBG("Soil: %.0f %%", DOUBLE_PROMO_OK(100 * sensors->soil.percentage)); LOG_DBG("Photo: %u lx (%d mV)", sensors->photo.brightness, sensors->photo.adc_read.millivolts); - LOG_DBG("Temp: %f oC", sensors->shtc3.temp_c); - LOG_DBG("Humi: %.0f %%", 100 * sensors->shtc3.rel_humi); + LOG_DBG("Temp: %f oC", DOUBLE_PROMO_OK(sensors->shtc3.temp_c)); + LOG_DBG("Humi: %.0f %%", DOUBLE_PROMO_OK(100 * sensors->shtc3.rel_humi)); LOG_DBG("--------------------------------------------------"); return 0; diff --git a/code/nrf-connect/prstlib/src/shtc3.c b/code/nrf-connect/prstlib/src/shtc3.c index f42e68d..d56629b 100644 --- a/code/nrf-connect/prstlib/src/shtc3.c +++ b/code/nrf-connect/prstlib/src/shtc3.c @@ -46,7 +46,7 @@ int prst_shtc3_read(prst_shtc3_read_t *out) { out->temp_c = -45 + 175 * ((float)((buff[0] << 8) | buff[1])) / (1 << 16); out->rel_humi = ((float)((buff[3] << 8) | buff[4])) / UINT16_MAX; - LOG_DBG("Read temp: %f oC (%d)", out->temp_c, (int)out->temp_c); - LOG_DBG("Read humi: %.0f %%", 100.0 * out->rel_humi); + LOG_DBG("Read temp: %f oC (%d)", DOUBLE_PROMO_OK(out->temp_c), (int)out->temp_c); + LOG_DBG("Read humi: %.0f %%", DOUBLE_PROMO_OK(100.0f * out->rel_humi)); return 0; } \ No newline at end of file From b8eb8473eab9daeb7a1252954852e0114ab77734 Mon Sep 17 00:00:00 2001 From: rbaron Date: Tue, 15 Oct 2024 19:08:47 +0200 Subject: [PATCH 2/9] Remove historical nrf52840dk_nrf52840.overlay This relic of the past was briefly used when I first wrote the nrf-connect firmware and tested it against the nrf52840dk_nrf52840 dev board. --- .../samples/ble/nrf52840dk_nrf52840.overlay | 86 ------------------- 1 file changed, 86 deletions(-) delete mode 100644 code/nrf-connect/samples/ble/nrf52840dk_nrf52840.overlay diff --git a/code/nrf-connect/samples/ble/nrf52840dk_nrf52840.overlay b/code/nrf-connect/samples/ble/nrf52840dk_nrf52840.overlay deleted file mode 100644 index 6e86aaf..0000000 --- a/code/nrf-connect/samples/ble/nrf52840dk_nrf52840.overlay +++ /dev/null @@ -1,86 +0,0 @@ -&pinctrl { - /* Configure pwm0 instance to use pin 5. */ - pwm0_default: pwm0_default { - group1 { - psels = ; - nordic,invert; - }; - }; - - pwm0_sleep: pwm0_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; - - /* Configure i2c0 instance to use pins 24 (SDA) & 13 (SCL). */ - i2c0_default: i2c0_default { - group1 { - psels = , - ; - }; - }; - - i2c0_sleep: i2c0_sleep { - group1 { - psels = , - ; - low-power-enable; - }; - }; -}; - -&i2c0 { - shtc3: shtc3@70 { - compatible = "i2c-device"; - reg = <0x70>; - label = "SHTC3"; - }; -}; - -&adc { - #address-cells = <1>; - #size-cells = <0>; - channel@0 { - reg = <0>; - zephyr,gain = "ADC_GAIN_1_6"; - zephyr,reference = "ADC_REF_INTERNAL"; - zephyr,acquisition-time = ; - // P0.03. - zephyr,input-positive = ; - zephyr,resolution = <10>; - - }; - - channel@1 { - reg = <1>; - zephyr,gain = "ADC_GAIN_1_6"; - zephyr,reference = "ADC_REF_INTERNAL"; - zephyr,acquisition-time = ; - // P0.02. - zephyr,input-positive = ; - zephyr,resolution = <10>; - }; - - channel@2 { - reg = <2>; - zephyr,gain = "ADC_GAIN_1_6"; - zephyr,reference = "ADC_REF_INTERNAL"; - zephyr,acquisition-time = ; - zephyr,input-positive = ; - zephyr,resolution = <10>; - }; -}; - -/ { - zephyr,user { - io-channels = <&adc 0>, <&adc 1>, <&adc 2>; - }; - - soil_pwm: soil_pwm { - compatible = "pwm-fixed"; - pwms = <&pwm0 0 PWM_MSEC(100) PWM_POLARITY_INVERTED>; - pulse = ; - }; -}; \ No newline at end of file From 2a610588664bb5193fc3eaf94d1eb0a67c310ad4 Mon Sep 17 00:00:00 2001 From: rbaron Date: Tue, 15 Oct 2024 19:31:17 +0200 Subject: [PATCH 3/9] Fix double promotion warning in soil-read-loop sample --- code/nrf-connect/samples/soil_read_loop/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nrf-connect/samples/soil_read_loop/src/main.c b/code/nrf-connect/samples/soil_read_loop/src/main.c index 7fc1c08..86ca783 100644 --- a/code/nrf-connect/samples/soil_read_loop/src/main.c +++ b/code/nrf-connect/samples/soil_read_loop/src/main.c @@ -64,6 +64,6 @@ int main(void) { int32_t soil_val_mv = soil_buf; RET_IF_ERR(adc_raw_to_millivolts_dt(&adc_soil_spec, &soil_val_mv)); - LOG_INF("%.2f;%u", batt_val_mv / 1000.0f, soil_buf); + LOG_INF("%.2f;%u", DOUBLE_PROMO_OK(batt_val_mv / 1000.0f), soil_buf); } } From 3db3f900974887ad973e9e82b1b1c9a173253d3a Mon Sep 17 00:00:00 2001 From: rbaron Date: Tue, 15 Oct 2024 20:14:32 +0200 Subject: [PATCH 4/9] Update nrf-sdk and toolchain to 2.7 --- .devcontainer/devcontainer.json | 4 ++-- .github/actions/build/action.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1b78822..d31ab6c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { - "name": "nrf-connect:v2.4", - "image": "nordicplayground/nrfconnect-sdk:v2.5-branch", + "name": "nrf-connect:v2.7", + "image": "nordicplayground/nrfconnect-sdk:v2.7-branch", "features": { }, "customizations": { diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 583bd4a..c156f24 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -18,7 +18,7 @@ runs: steps: - run: | docker run --rm -v ${GITHUB_WORKSPACE}:/repo \ - nordicplayground/nrfconnect-sdk:v2.5-branch \ + nordicplayground/nrfconnect-sdk:v2.7-branch \ west build \ --build-dir /repo/${{ inputs.sample-dir }}/build \ --pristine \ From 89f7d72e51cf00b73a236aa6ee4b4b8746e2a775 Mon Sep 17 00:00:00 2001 From: rbaron Date: Tue, 15 Oct 2024 22:21:30 +0200 Subject: [PATCH 5/9] Update It looks like ZBOSS's macro fiesta introduced a new argument in `ZB_ZCL_SET_ATTR_DESC_*` -- see [git blame](https://github.com/nrfconnect/sdk-nrfxlib/blame/11a7add841663509a20b51c0e208ad8091fe1132/zboss/production/include/zcl/zb_zcl_illuminance_measurement.h#L129) --- .../samples/zigbee/src/prst_zb_soil_moisture_defs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/nrf-connect/samples/zigbee/src/prst_zb_soil_moisture_defs.h b/code/nrf-connect/samples/zigbee/src/prst_zb_soil_moisture_defs.h index 8c01ae2..58a54dc 100644 --- a/code/nrf-connect/samples/zigbee/src/prst_zb_soil_moisture_defs.h +++ b/code/nrf-connect/samples/zigbee/src/prst_zb_soil_moisture_defs.h @@ -26,11 +26,11 @@ void prst_zcl_soil_moisture_init_client(void); #define ZB_SET_ATTR_DESCR_WITH_PRST_ZB_ZCL_ATTR_SOIL_MOISTURE_VALUE_ID(data_ptr) \ { \ - PRST_ZB_ZCL_ATTR_SOIL_MOISTURE_VALUE_ID, \ - ZB_ZCL_ATTR_TYPE_U16, \ - ZB_ZCL_ATTR_ACCESS_READ_ONLY | ZB_ZCL_ATTR_ACCESS_REPORTING, \ - (void*)data_ptr \ - } + PRST_ZB_ZCL_ATTR_SOIL_MOISTURE_VALUE_ID, \ + ZB_ZCL_ATTR_TYPE_U16, \ + ZB_ZCL_ATTR_ACCESS_READ_ONLY | ZB_ZCL_ATTR_ACCESS_REPORTING, \ + (ZB_ZCL_NON_MANUFACTURER_SPECIFIC), \ + (void*)data_ptr} #define PRST_ZB_ZCL_DECLARE_SOIL_MOISTURE_ATTRIB_LIST(attr_list, value) \ ZB_ZCL_START_DECLARE_ATTRIB_LIST_CLUSTER_REVISION(attr_list, PRST_ZB_ZCL_SOIL_MOISTURE) \ From b9c5c0dc45fa7ed5f79bd0ead8b18464f9d3d27a Mon Sep 17 00:00:00 2001 From: rbaron Date: Tue, 15 Oct 2024 22:28:17 +0200 Subject: [PATCH 6/9] clang-format --- .../samples/zigbee/src/prst_zb_soil_moisture_defs.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/nrf-connect/samples/zigbee/src/prst_zb_soil_moisture_defs.h b/code/nrf-connect/samples/zigbee/src/prst_zb_soil_moisture_defs.h index 58a54dc..e0cb070 100644 --- a/code/nrf-connect/samples/zigbee/src/prst_zb_soil_moisture_defs.h +++ b/code/nrf-connect/samples/zigbee/src/prst_zb_soil_moisture_defs.h @@ -26,11 +26,12 @@ void prst_zcl_soil_moisture_init_client(void); #define ZB_SET_ATTR_DESCR_WITH_PRST_ZB_ZCL_ATTR_SOIL_MOISTURE_VALUE_ID(data_ptr) \ { \ - PRST_ZB_ZCL_ATTR_SOIL_MOISTURE_VALUE_ID, \ - ZB_ZCL_ATTR_TYPE_U16, \ - ZB_ZCL_ATTR_ACCESS_READ_ONLY | ZB_ZCL_ATTR_ACCESS_REPORTING, \ - (ZB_ZCL_NON_MANUFACTURER_SPECIFIC), \ - (void*)data_ptr} + PRST_ZB_ZCL_ATTR_SOIL_MOISTURE_VALUE_ID, \ + ZB_ZCL_ATTR_TYPE_U16, \ + ZB_ZCL_ATTR_ACCESS_READ_ONLY | ZB_ZCL_ATTR_ACCESS_REPORTING, \ + (ZB_ZCL_NON_MANUFACTURER_SPECIFIC), \ + (void*)data_ptr \ + } #define PRST_ZB_ZCL_DECLARE_SOIL_MOISTURE_ATTRIB_LIST(attr_list, value) \ ZB_ZCL_START_DECLARE_ATTRIB_LIST_CLUSTER_REVISION(attr_list, PRST_ZB_ZCL_SOIL_MOISTURE) \ From 2962b5be77524147b4b78a062f7f5880ca08301d Mon Sep 17 00:00:00 2001 From: rbaron Date: Wed, 30 Oct 2024 09:01:00 +0100 Subject: [PATCH 7/9] Migrate board definitions to Hardware Model V2 --- .../arm/bparasite_nrf52833/Kconfig.board | 4 ---- .../boards/arm/bparasite_nrf52833/board.cmake | 10 ---------- .../arm/bparasite_nrf52833/revision.cmake | 1 - .../boards/arm/bparasite_nrf52840/Kconfig | 14 -------------- .../arm/bparasite_nrf52840/Kconfig.board | 4 ---- .../arm/bparasite_nrf52840/Kconfig.defconfig | 18 ------------------ .../bparasite_nrf52840_1_0_0.conf | 0 .../arm/bparasite_nrf52840/pre_dt_board.cmake | 7 ------- .../arm/bparasite_nrf52840/revision.cmake | 1 - .../bparasite_nrf52833 => bparasite}/Kconfig | 4 ++-- .../prstlib/boards/bparasite/Kconfig.bparasite | 5 +++++ .../Kconfig.defconfig | 6 +++--- .../board.cmake | 6 ++++++ .../prstlib/boards/bparasite/board.yml | 13 +++++++++++++ .../bparasite_nrf52833-pinctrl.dtsi | 0 .../bparasite_nrf52833.dts | 0 .../boards/bparasite/bparasite_nrf52833.yaml | 2 ++ .../bparasite_nrf52833_1_0_0.overlay | 0 .../bparasite_nrf52833_1_0_0_defconfig} | 0 .../bparasite_nrf52833_1_1_0.overlay | 0 .../bparasite_nrf52833_1_1_0_defconfig} | 0 .../bparasite_nrf52833_1_2_0.overlay | 0 .../bparasite_nrf52833_1_2_0_defconfig} | 0 .../bparasite_nrf52833_2_0_0.overlay | 0 .../bparasite_nrf52833_2_0_0_defconfig} | 0 .../bparasite_nrf52833_defconfig | 5 ----- .../bparasite_nrf52840-pinctrl.dtsi | 0 .../bparasite_nrf52840.dts | 0 .../boards/bparasite/bparasite_nrf52840.yaml | 2 ++ .../bparasite_nrf52840_1_0_0.overlay | 0 .../bparasite_nrf52840_1_0_0_defconfig | 1 + .../bparasite_nrf52840_1_1_0.overlay | 0 .../bparasite_nrf52840_1_1_0_defconfig} | 0 .../bparasite_nrf52840_1_2_0.overlay | 0 .../bparasite_nrf52840_1_2_0_defconfig} | 0 .../bparasite_nrf52840_2_0_0.overlay | 0 .../bparasite_nrf52840_2_0_0_defconfig} | 0 .../bparasite_nrf52840_defconfig | 5 ----- .../pre_dt_board.cmake | 0 39 files changed, 34 insertions(+), 74 deletions(-) delete mode 100644 code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/Kconfig.board delete mode 100644 code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/board.cmake delete mode 100644 code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/revision.cmake delete mode 100644 code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/Kconfig delete mode 100644 code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/Kconfig.board delete mode 100644 code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/Kconfig.defconfig delete mode 100644 code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_1_0_0.conf delete mode 100644 code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/pre_dt_board.cmake delete mode 100644 code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/revision.cmake rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52833 => bparasite}/Kconfig (56%) create mode 100644 code/nrf-connect/prstlib/boards/bparasite/Kconfig.bparasite rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52833 => bparasite}/Kconfig.defconfig (71%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52840 => bparasite}/board.cmake (71%) create mode 100644 code/nrf-connect/prstlib/boards/bparasite/board.yml rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52833 => bparasite}/bparasite_nrf52833-pinctrl.dtsi (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52833 => bparasite}/bparasite_nrf52833.dts (100%) create mode 100644 code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833.yaml rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52833 => bparasite}/bparasite_nrf52833_1_0_0.overlay (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52833/bparasite_nrf52833_1_0_0.conf => bparasite/bparasite_nrf52833_1_0_0_defconfig} (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52833 => bparasite}/bparasite_nrf52833_1_1_0.overlay (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52833/bparasite_nrf52833_1_1_0.conf => bparasite/bparasite_nrf52833_1_1_0_defconfig} (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52833 => bparasite}/bparasite_nrf52833_1_2_0.overlay (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52833/bparasite_nrf52833_1_2_0.conf => bparasite/bparasite_nrf52833_1_2_0_defconfig} (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52833 => bparasite}/bparasite_nrf52833_2_0_0.overlay (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52833/bparasite_nrf52833_2_0_0.conf => bparasite/bparasite_nrf52833_2_0_0_defconfig} (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52833 => bparasite}/bparasite_nrf52833_defconfig (65%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52840 => bparasite}/bparasite_nrf52840-pinctrl.dtsi (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52840 => bparasite}/bparasite_nrf52840.dts (100%) create mode 100644 code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840.yaml rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52840 => bparasite}/bparasite_nrf52840_1_0_0.overlay (100%) create mode 100644 code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_1_0_0_defconfig rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52840 => bparasite}/bparasite_nrf52840_1_1_0.overlay (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52840/bparasite_nrf52840_1_1_0.conf => bparasite/bparasite_nrf52840_1_1_0_defconfig} (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52840 => bparasite}/bparasite_nrf52840_1_2_0.overlay (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52840/bparasite_nrf52840_1_2_0.conf => bparasite/bparasite_nrf52840_1_2_0_defconfig} (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52840 => bparasite}/bparasite_nrf52840_2_0_0.overlay (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52840/bparasite_nrf52840_2_0_0.conf => bparasite/bparasite_nrf52840_2_0_0_defconfig} (100%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52840 => bparasite}/bparasite_nrf52840_defconfig (65%) rename code/nrf-connect/prstlib/boards/{arm/bparasite_nrf52833 => bparasite}/pre_dt_board.cmake (100%) diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/Kconfig.board b/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/Kconfig.board deleted file mode 100644 index b0dca24..0000000 --- a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/Kconfig.board +++ /dev/null @@ -1,4 +0,0 @@ - -config BOARD_BPARASITE_NRF52833 - bool "b-parasite nRF52833 board" - depends on SOC_NRF52833_QIAA \ No newline at end of file diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/board.cmake b/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/board.cmake deleted file mode 100644 index 3475202..0000000 --- a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/board.cmake +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -board_runner_args(jlink "--device=nRF52833_xxAA" "--speed=4000") -board_runner_args(pyocd "--target=nrf52833" "--frequency=4000000") -# set(OPENOCD_NRF5_SUBFAMILY "nrf52") -include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) -include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) -include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) -include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake) -include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake) \ No newline at end of file diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/revision.cmake b/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/revision.cmake deleted file mode 100644 index 9b7df2d..0000000 --- a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/revision.cmake +++ /dev/null @@ -1 +0,0 @@ -board_check_revision(FORMAT MAJOR.MINOR.PATCH) \ No newline at end of file diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/Kconfig b/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/Kconfig deleted file mode 100644 index 4ce925f..0000000 --- a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/Kconfig +++ /dev/null @@ -1,14 +0,0 @@ - -if BOARD_BPARASITE_NRF52840 - -config BOARD_ENABLE_DCDC - bool "DCDC mode" - select SOC_DCDC_NRF52X - default y - -config BOARD_ENABLE_DCDC_HV - bool "High Voltage DCDC converter" - select SOC_DCDC_NRF52X_HV - default y - -endif # BOARD_BPARASITE_NRF52840 diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/Kconfig.board b/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/Kconfig.board deleted file mode 100644 index a72a7a2..0000000 --- a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/Kconfig.board +++ /dev/null @@ -1,4 +0,0 @@ - -config BOARD_BPARASITE_NRF52840 - bool "b-parasite nRF52840 board" - depends on SOC_NRF52840_QIAA \ No newline at end of file diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/Kconfig.defconfig b/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/Kconfig.defconfig deleted file mode 100644 index 969d54d..0000000 --- a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/Kconfig.defconfig +++ /dev/null @@ -1,18 +0,0 @@ - -if BOARD_BPARASITE_NRF52840 - -config BOARD - default "bparasite_nrf52840" - -config BOARD_REVISION - string "Board revision." - default "1.0.0" - -config BOARD_REVISION_CODE - int "Board revision code. An integer representation of the board revision." - default 1 - -config BT_CTLR - default BT - -endif # BOARD_BPARASITE_NRF52840 \ No newline at end of file diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_1_0_0.conf b/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_1_0_0.conf deleted file mode 100644 index e69de29..0000000 diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/pre_dt_board.cmake b/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/pre_dt_board.cmake deleted file mode 100644 index 3369c21..0000000 --- a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/pre_dt_board.cmake +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (c) 2022 Nordic Semiconductor -# SPDX-License-Identifier: Apache-2.0 - -# Suppress "unique_unit_address_if_enabled" to handle the following overlaps: -# - power@40000000 & clock@40000000 & bprot@40000000 -# - acl@4001e000 & flash-controller@4001e000 -list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled") diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/revision.cmake b/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/revision.cmake deleted file mode 100644 index 9b7df2d..0000000 --- a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/revision.cmake +++ /dev/null @@ -1 +0,0 @@ -board_check_revision(FORMAT MAJOR.MINOR.PATCH) \ No newline at end of file diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/Kconfig b/code/nrf-connect/prstlib/boards/bparasite/Kconfig similarity index 56% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/Kconfig rename to code/nrf-connect/prstlib/boards/bparasite/Kconfig index a0c83d3..68a42a6 100644 --- a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/Kconfig +++ b/code/nrf-connect/prstlib/boards/bparasite/Kconfig @@ -1,9 +1,9 @@ -if BOARD_BPARASITE_NRF52833 +if BOARD_BPARASITE config BOARD_ENABLE_DCDC bool "DCDC mode" select SOC_DCDC_NRF52X default y -endif # BOARD_BPARASITE_NRF52833 +endif # BOARD_BPARASITE diff --git a/code/nrf-connect/prstlib/boards/bparasite/Kconfig.bparasite b/code/nrf-connect/prstlib/boards/bparasite/Kconfig.bparasite new file mode 100644 index 0000000..10715c3 --- /dev/null +++ b/code/nrf-connect/prstlib/boards/bparasite/Kconfig.bparasite @@ -0,0 +1,5 @@ + +config BOARD_BPARASITE + bool "b-parasite board" + select SOC_NRF52833_QIAA if BOARD_BPARASITE_NRF52833 + select SOC_NRF52840_QIAA if BOARD_BPARASITE_NRF52840 \ No newline at end of file diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/Kconfig.defconfig b/code/nrf-connect/prstlib/boards/bparasite/Kconfig.defconfig similarity index 71% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/Kconfig.defconfig rename to code/nrf-connect/prstlib/boards/bparasite/Kconfig.defconfig index 637d11c..703c865 100644 --- a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/Kconfig.defconfig +++ b/code/nrf-connect/prstlib/boards/bparasite/Kconfig.defconfig @@ -1,8 +1,8 @@ -if BOARD_BPARASITE_NRF52833 +if BOARD_BPARASITE config BOARD - default "bparasite_nrf52833" + default "bparasite" config BOARD_REVISION string "Board revision." @@ -15,4 +15,4 @@ config BOARD_REVISION_CODE config BT_CTLR default BT -endif # BOARD_BPARASITE_NRF52833 \ No newline at end of file +endif # BOARD_BPARASITE \ No newline at end of file diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/board.cmake b/code/nrf-connect/prstlib/boards/bparasite/board.cmake similarity index 71% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/board.cmake rename to code/nrf-connect/prstlib/boards/bparasite/board.cmake index c374699..7ff801a 100644 --- a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/board.cmake +++ b/code/nrf-connect/prstlib/boards/bparasite/board.cmake @@ -1,7 +1,13 @@ # SPDX-License-Identifier: Apache-2.0 +if (CONFIG_BPARASITE_NRF52833) +board_runner_args(jlink "--device=nRF52833_xxAA" "--speed=4000") +board_runner_args(pyocd "--target=nrf52833" "--frequency=4000000") +elseif (CONFIG_BPARASITE_NRF52840) board_runner_args(jlink "--device=nRF52840_xxAA" "--speed=4000") board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000") +endif() + # set(OPENOCD_NRF5_SUBFAMILY "nrf52") include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) diff --git a/code/nrf-connect/prstlib/boards/bparasite/board.yml b/code/nrf-connect/prstlib/boards/bparasite/board.yml new file mode 100644 index 0000000..fcde161 --- /dev/null +++ b/code/nrf-connect/prstlib/boards/bparasite/board.yml @@ -0,0 +1,13 @@ +board: + name: bparasite + socs: + - name: nrf52833 + - name: nrf52840 + revision: + format: major.minor.patch + default: "2.0.0" + revisions: + - name: "1.0.0" + - name: "1.1.0" + - name: "1.2.0" + - name: "2.0.0" diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833-pinctrl.dtsi b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833-pinctrl.dtsi similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833-pinctrl.dtsi rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833-pinctrl.dtsi diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833.dts b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833.dts similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833.dts rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833.dts diff --git a/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833.yaml b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833.yaml new file mode 100644 index 0000000..4356893 --- /dev/null +++ b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833.yaml @@ -0,0 +1,2 @@ +identifier: bparasite/nrf52833 +name: "b-parasite nRF52833" diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_1_0_0.overlay b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_1_0_0.overlay similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_1_0_0.overlay rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_1_0_0.overlay diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_1_0_0.conf b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_1_0_0_defconfig similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_1_0_0.conf rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_1_0_0_defconfig diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_1_1_0.overlay b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_1_1_0.overlay similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_1_1_0.overlay rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_1_1_0.overlay diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_1_1_0.conf b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_1_1_0_defconfig similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_1_1_0.conf rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_1_1_0_defconfig diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_1_2_0.overlay b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_1_2_0.overlay similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_1_2_0.overlay rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_1_2_0.overlay diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_1_2_0.conf b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_1_2_0_defconfig similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_1_2_0.conf rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_1_2_0_defconfig diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_2_0_0.overlay b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_2_0_0.overlay similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_2_0_0.overlay rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_2_0_0.overlay diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_2_0_0.conf b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_2_0_0_defconfig similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_2_0_0.conf rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_2_0_0_defconfig diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_defconfig b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_defconfig similarity index 65% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_defconfig rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_defconfig index f18797f..9e4e9e3 100644 --- a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/bparasite_nrf52833_defconfig +++ b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52833_defconfig @@ -1,8 +1,3 @@ - -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52833_QIAA=y -CONFIG_BOARD_BPARASITE_NRF52833=y - # Enable MPU CONFIG_ARM_MPU=y diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840-pinctrl.dtsi b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840-pinctrl.dtsi similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840-pinctrl.dtsi rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840-pinctrl.dtsi diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840.dts b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840.dts similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840.dts rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840.dts diff --git a/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840.yaml b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840.yaml new file mode 100644 index 0000000..7f16be2 --- /dev/null +++ b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840.yaml @@ -0,0 +1,2 @@ +identifier: bparasite/nrf52840 +name: "b-parasite nRF52840" diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_1_0_0.overlay b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_1_0_0.overlay similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_1_0_0.overlay rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_1_0_0.overlay diff --git a/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_1_0_0_defconfig b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_1_0_0_defconfig new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_1_0_0_defconfig @@ -0,0 +1 @@ + diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_1_1_0.overlay b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_1_1_0.overlay similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_1_1_0.overlay rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_1_1_0.overlay diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_1_1_0.conf b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_1_1_0_defconfig similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_1_1_0.conf rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_1_1_0_defconfig diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_1_2_0.overlay b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_1_2_0.overlay similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_1_2_0.overlay rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_1_2_0.overlay diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_1_2_0.conf b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_1_2_0_defconfig similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_1_2_0.conf rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_1_2_0_defconfig diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_2_0_0.overlay b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_2_0_0.overlay similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_2_0_0.overlay rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_2_0_0.overlay diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_2_0_0.conf b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_2_0_0_defconfig similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_2_0_0.conf rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_2_0_0_defconfig diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_defconfig b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_defconfig similarity index 65% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_defconfig rename to code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_defconfig index 386002b..9e4e9e3 100644 --- a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52840/bparasite_nrf52840_defconfig +++ b/code/nrf-connect/prstlib/boards/bparasite/bparasite_nrf52840_defconfig @@ -1,8 +1,3 @@ - -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BPARASITE_NRF52840=y - # Enable MPU CONFIG_ARM_MPU=y diff --git a/code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/pre_dt_board.cmake b/code/nrf-connect/prstlib/boards/bparasite/pre_dt_board.cmake similarity index 100% rename from code/nrf-connect/prstlib/boards/arm/bparasite_nrf52833/pre_dt_board.cmake rename to code/nrf-connect/prstlib/boards/bparasite/pre_dt_board.cmake From 2673d2a5b5c2a62a2d67ee8404d562a113afcb47 Mon Sep 17 00:00:00 2001 From: rbaron Date: Wed, 30 Oct 2024 09:04:54 +0100 Subject: [PATCH 8/9] Update github actions for sdk 2.7 --- .github/actions/build/action.yml | 8 ++++---- .github/workflows/b-parasite.yml | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index c156f24..7e22832 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -4,9 +4,9 @@ inputs: sample-dir: description: "Sample directory to build" required: true - board: - description: "Board definition to use" - default: bparasite_nrf52840 + soc: + description: "SoC to use" + default: nrf52840 revision: description: "Board revision use" default: "2.0.0" @@ -22,6 +22,6 @@ runs: west build \ --build-dir /repo/${{ inputs.sample-dir }}/build \ --pristine \ - --board ${{ inputs.board }}@${{ inputs.revision }} \ + --board bparasite@${{ inputs.revision }}/${{ inputs.soc }} \ /repo/${{ inputs.sample-dir }} -- ${{ inputs.cmake-extra }} shell: bash diff --git a/.github/workflows/b-parasite.yml b/.github/workflows/b-parasite.yml index 9720cea..8ec7d64 100644 --- a/.github/workflows/b-parasite.yml +++ b/.github/workflows/b-parasite.yml @@ -32,7 +32,7 @@ jobs: uses: ./.github/actions/build with: sample-dir: code/nrf-connect/samples/blinky - board: bparasite_nrf52840 + soc: nrf52840 revision: 2.0.0 output-bin: blinky_nrf52840.hex @@ -48,7 +48,7 @@ jobs: uses: ./.github/actions/build with: sample-dir: code/nrf-connect/samples/input - board: bparasite_nrf52840 + soc: nrf52840 revision: 2.0.0 output-bin: input_nrf52840.hex @@ -64,7 +64,7 @@ jobs: uses: ./.github/actions/build with: sample-dir: code/nrf-connect/samples/soil_read_loop - board: bparasite_nrf52840 + soc: nrf52840 revision: 2.0.0 output-bin: soil_read_loop_nrf52840.hex @@ -84,7 +84,7 @@ jobs: uses: ./.github/actions/build with: sample-dir: code/nrf-connect/samples/ble - board: bparasite_${{ matrix.soc }} + soc: ${{ matrix.soc }} revision: ${{ matrix.revision }} cmake-extra: -DCONFIG_PRST_BLE_ENCODING_BTHOME_V2=y -DCONFIG_PRST_SLEEP_DURATION_MSEC=1000 -DCONFIG_PRSTLIB_LOG_LEVEL_DBG=y output-bin: ble_${{ matrix.soc }}_${{ matrix.revision }}_debug.hex @@ -105,7 +105,7 @@ jobs: uses: ./.github/actions/build with: sample-dir: code/nrf-connect/samples/zigbee - board: bparasite_${{ matrix.soc }} + soc: ${{ matrix.soc }} revision: ${{ matrix.revision }} cmake-extra: -DCONFIG_PRSTLIB_LOG_LEVEL_DBG=y output-bin: zigbee_${{ matrix.soc }}_${{ matrix.revision }}_debug.hex From bbeb3592cc5a8132ac851b14ad2148f6bffe7389 Mon Sep 17 00:00:00 2001 From: rbaron Date: Wed, 30 Oct 2024 09:13:28 +0100 Subject: [PATCH 9/9] Separate build directories for each soc/revision variation --- .github/actions/build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 7e22832..c6190a5 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -20,7 +20,7 @@ runs: docker run --rm -v ${GITHUB_WORKSPACE}:/repo \ nordicplayground/nrfconnect-sdk:v2.7-branch \ west build \ - --build-dir /repo/${{ inputs.sample-dir }}/build \ + --build-dir /repo/${{ inputs.sample-dir }}/build_${{ inputs.soc }}_${{ inputs.revision }} \ --pristine \ --board bparasite@${{ inputs.revision }}/${{ inputs.soc }} \ /repo/${{ inputs.sample-dir }} -- ${{ inputs.cmake-extra }}