You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to port MCUBoot to our C++ based SDK. As a part of the porting process, we planned to provide a forward declaration of struct flash_area and then define the struct in C++ code.
However, doing this causes a compilation error in file bootutil_misc.c, on line 176:
.../third-party/mcuboot/repo/boot/bootutil/src/bootutil_misc.c:176:12: error: invalid use of undefined type 'const struct flash_area'
176 | if (fap->fa_id == FLASH_AREA_IMAGE_SCRATCH) {
If the problematic line is rewritten as below, the issue is solved.
This seems like an obvious oversight, because the PORTING document says that MCUBoot should never access flash_area directly, and instead accessor functions are used. Also in the same bootutil_misc.c file, accessor functions are used, including flash_area_get_id().
While researching the issue, I found a PR about this exact problem #1929. It was reviewed, accepted but then never merged. It is now auto-closed by the bot.
The text was updated successfully, but these errors were encountered:
MCUBoot version: 2.1.0
We are trying to port MCUBoot to our C++ based SDK. As a part of the porting process, we planned to provide a forward declaration of
struct flash_area
and then define the struct in C++ code.However, doing this causes a compilation error in file
bootutil_misc.c
, on line 176:If the problematic line is rewritten as below, the issue is solved.
This seems like an obvious oversight, because the PORTING document says that MCUBoot should never access
flash_area
directly, and instead accessor functions are used. Also in the samebootutil_misc.c
file, accessor functions are used, includingflash_area_get_id()
.While researching the issue, I found a PR about this exact problem #1929. It was reviewed, accepted but then never merged. It is now auto-closed by the bot.
The text was updated successfully, but these errors were encountered: