Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Bug in a header file of sdk nRF5_SDK_17.0.2_d674dde\components\libraries\util\app_error_handler_gcc.c

hello,

 i find a mistake line 62

    "ldr r0, =%4                    \n"      ->>>>>  The  '='  should be removed .

void app_error_handler(ret_code_t error_code, uint32_t line_num, const uint8_t * p_file_name)
{
    __ASM volatile(

    "push {lr}                      \n"

    /* reserve space on stack for error_info_t struct - preserve 8byte stack aligment */
    "sub sp, sp, %0                 \n"

    /* prepare error_info_t struct */
    "str r0, [sp, %1]               \n"
    "str r1, [sp, %3]               \n"
    "str r2, [sp, %2]               \n"

    /* prepare arguments and call function: app_error_fault_handler */
    "ldr r0, =%4                    \n"
    "mov r1, lr                     \n"
    "mov r2, sp                     \n"
    "bl  %5                         \n"

    /* release stack */
    "add sp, sp, %0                 \n"

    "pop {pc}                       \n"
    ".ltorg                         \n"

    : /* Outputs */
    : /* Inputs */
    "I" (APP_ERROR_ERROR_INFO_SIZE_ALIGNED_8BYTE),
    "I" (APP_ERROR_ERROR_INFO_OFFSET_ERR_CODE),
    "I" (APP_ERROR_ERROR_INFO_OFFSET_P_FILE_NAME),
    "I" (APP_ERROR_ERROR_INFO_OFFSET_LINE_NUM),
    "X" (NRF_FAULT_ID_SDK_ERROR),
    "X" (app_error_fault_handler)
    : /* Clobbers */
    "r0", "r1", "r2"
    );
}

thank's

Parents Reply Children
No Data
Related