Skip to content

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
@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