Environment: simplelink_cc13x2_26x2_sdk_4_10_00_78, but the newer simplelink_cc13x2_26x2_sdk_5_20_00_52 has the identical function.
In my setup, function oadFindExtFlImgAddr() in oad.c may enter an endless loop and never return.
What happens is that oadFindleastRecentlyUsedIdx() doesn't find anything and returns EFL_META_PG_INVALID, however, that value is not being expected/checked in the calling function.
Please advise
PS: I figure some code ought to be added there:
while()
{
...
uint8_t leastRecentlyUsedIdx = oadFindleastRecentlyUsedIdx(extImgInfo,
OAD_EFL_MAX_META);
if (leastRecentlyUsedIdx < OAD_EFL_MAX_META)
{
...
}
// NEW CODE to handle invalid Idx
else
{
// do something
break; // leave loop
}
}