Skip to content

Conversation

tomchy
Copy link
Collaborator

@tomchy tomchy commented May 23, 2025

Remove redundant application size calculations in favor of a swap-specific function, implemented inside swap_<type>.c. In this way, slot sizes use the same restrictions as image validation.

This change is a follow-up PR to the discussion in the #2283.

@tomchy tomchy force-pushed the bugfix/swap/Unify_max_app_size_methods branch 3 times, most recently from 0a7e9a6 to 84cf14a Compare May 27, 2025 08:35
@ahasztag ahasztag force-pushed the bugfix/swap/Unify_max_app_size_methods branch from 84cf14a to ade4b0d Compare July 3, 2025 09:38
@tomchy tomchy force-pushed the bugfix/swap/Unify_max_app_size_methods branch from f7abf5d to c06e0c3 Compare July 4, 2025 09:46
@tomchy tomchy marked this pull request as ready for review July 4, 2025 09:46
@tomchy tomchy requested a review from davidvincze as a code owner July 4, 2025 09:46
@tomchy tomchy force-pushed the bugfix/swap/Unify_max_app_size_methods branch 14 times, most recently from f68249e to 862d9fa Compare July 7, 2025 13:03
@de-nordic de-nordic added the area: core Affects core functionality label Jul 8, 2025
@de-nordic de-nordic requested review from nordicjm and de-nordic July 8, 2025 10:43
Copy link
Collaborator

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swap using move/offset OK, no clue about swap using scratch, defer to @taltenbach

Copy link
Contributor

@taltenbach taltenbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes regarding swap-scratch LGTM, only minor comments. Thanks for the detailed explanation in app_max_size_adjust_to_trailer, it's now much clearer than before!

Remove redundant application size calculations in favor of
a swap-specific function, implemented inside swap_<type>.c.
In this way, slot sizes use the same restrictions as image validation.

Signed-off-by: Tomasz Chyrowicz <[email protected]>
@tomchy tomchy force-pushed the bugfix/swap/Unify_max_app_size_methods branch from 862d9fa to 5254b75 Compare July 9, 2025 07:57
@tomchy tomchy requested a review from taltenbach July 9, 2025 08:00
@taltenbach
Copy link
Contributor

LGTM, @tomchy feel free resolve all open threads (I can't do it myself)

@nordicjm nordicjm merged commit f9db019 into mcu-tools:main Jul 14, 2025
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Affects core functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants