Skip to content
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

Notify other tasks that OTA is stopped when fail to activate new image. #77

Merged

Conversation

ActoryOu
Copy link
Member

Notify other tasks that OTA is stopped when fail to activate new image.

Description

As #73 discussed (in additional question), when OTA fail to activate new image, we should notify other tasks to continue.

Test Steps

  1. Run OTA test with hacking that OTA pal fail to activate the image like below.
OtaErr_t OTA_ActivateNewImage( void )
{
    // skip for simplify

    if( ( otaAgent.pOtaInterface != NULL ) && ( otaAgent.pOtaInterface->pal.activate != NULL ) )
    {
        // comment out below line to make activation fail to test this scenario.
        // palStatus = otaAgent.pOtaInterface->pal.activate( &( otaAgent.fileContext ) );
    }

    // skip for simplify

    return ( ( palStatus >> OTA_PAL_SUB_BITS ) == ( uint32_t ) OtaPalSuccess ) ? OtaErrNone : OtaErrActivateFailed;
}
  1. Check if publish demo is running normally.

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ActoryOu ActoryOu merged commit c2ce3a5 into FreeRTOS:main Mar 27, 2024
21 checks passed
@ActoryOu ActoryOu deleted the otaStopNotificationWhenActivateFail branch March 27, 2024 01:53
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