Skip to content

boot: zephyr: Refactor USB DFU entry logic #2277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2025

Conversation

sayooj-aerlync
Copy link
Contributor

Consolidates USB DFU entry logic by unifying GPIO and timeout-based DFU triggers under a common flag. This avoids code duplication and improves maintainability.
Also improves log clarity for different DFU exit conditions.

@sayooj-aerlync
Copy link
Contributor Author

Hi @nordicjm @de-nordic

The tests are failing with the following logs:

+ git clone https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git
~/work/mcuboot ~/work/mcuboot/mcuboot
Cloning into 'trusted-firmware-m'...
fatal: unable to access 'https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/': The requested URL returned error: 502

What shall I do to make it clone?

@nordicjm
Copy link
Collaborator

Hi @nordicjm @de-nordic

The tests are failing with the following logs:

+ git clone https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git
~/work/mcuboot ~/work/mcuboot/mcuboot
Cloning into 'trusted-firmware-m'...
fatal: unable to access 'https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/': The requested URL returned error: 502

What shall I do to make it clone?

FIH hardening tests can be ignored, these are failing due to a problem with the TFM git server

@sayooj-aerlync
Copy link
Contributor Author

Please have a look into this @de-nordic @nordicjm

@nordicjm
Copy link
Collaborator

nordicjm commented May 6, 2025

Will look at it after the current 2.2.0 release concludes, currently bug fixes only

@sayooj-aerlync
Copy link
Contributor Author

Could you please check this?

@sayooj-aerlync
Copy link
Contributor Author

I think the build failure is not related to this change:

warning: MBEDTLS_KEY_EXCHANGE_RSA_ENABLED (defined at modules/mbedtls/Kconfig.mbedtls:102, modules/mbedtls/Kconfig.mbedtls:102) has direct dependencies (MBEDTLS_MD && (PSA_CRYPTO_CLIENT || MBEDTLS_PKCS1_V15 || MBEDTLS_PKCS1_V21) && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-mbedtls.h" && MBEDTLS) || (MBEDTLS_MD && (PSA_CRYPTO_CLIENT || MBEDTLS_PKCS1_V15 || MBEDTLS_PKCS1_V21) && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-mbedtls.h" && MBEDTLS && 0) with value n, but is currently being y-selected by the following symbols:
 - BOOT_SIGNATURE_TYPE_RSA (defined at /__w/mcuboot/mcuboot/repos/bootloader/mcuboot/boot/zephyr/Kconfig:211), with value y, direct dependencies <choice BOOT_SIGNATURE_TYPE> (value: y), and select condition MBEDTLS_BUILTIN && <choice BOOT_SIGNATURE_TYPE> (value: y)

@nordicjm
Copy link
Collaborator

can you rebase your branch on main? Should fix CI

Consolidates USB DFU entry logic by unifying GPIO and timeout-based
DFU triggers under a common flag. This avoids code duplication and
improves maintainability.
Also improves log clarity for different DFU exit conditions.

Signed-off-by: Sayooj K Karun <[email protected]>
@sayooj-aerlync
Copy link
Contributor Author

can you rebase your branch on main? Should fix CI

Done!

@nordicjm nordicjm merged commit 402d3f7 into mcu-tools:main Jun 18, 2025
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants