-
Notifications
You must be signed in to change notification settings - Fork 697
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
find_last_sector_idx never returning #2151
Comments
This code works fine on zephyr and mynewt so you have a problem with your deprecated and unsupported mbedos code which is outside the scope of MCUboot |
swap_scratch.c is part of bootutil and has nothing to do with mbed. @multiplemonomials asked to restart the mbed-ce support in pull/2152 becasue we have our community fork of mbed-os. |
The code above adds sector sizes to a count value and that code is definitely coming from mbed, mcuboot has to query it somehow so your mbed code has an issue there (i.e. maybe it is returning 0 if you enter an infinite loop)
Interesting, if they're willing to maintain support for it and look into the issue then that's fine |
I do not see any mbed references in this code:
|
After calling
boot_read_image_header(&state, 0, &hdr, &status);
there is a callfind_swap_count(state, swap_size);
andfind_last_sector_idx(state, copy_size);
with copy_size = 76040.This code part is never converging and crashes (line 481 of swap_scratch.c):
It should look more logical that this must be:
Then I have only one iteration:
The piece of code should better have a check to assert before crashing/hanging.
Reproduction:
The text was updated successfully, but these errors were encountered: