This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Getting SDK 15_3 working

All examples shipped with the SDK have the same compile problem 

components\libraries\util\app_error_handler_keil.c(47): error: A1198E: Unknown operand

The offending line is 

PRESERVE8 {TRUE}

I have commented out the {TRUE} and it compiles but does not work.

I have re-downloaded the SDK but get the same behaviour. 

I am using Keil as the IDE, and older SDK version still works as they did before. Can anybody please enlighten me am sure its something simple that I have forgotten as there are no other posts on the subject

Parents
  • Hi,

    I am affraid you might have different Keil version than supported by our SDK.

    There is quite an easy fix for your problem. Remove __ASM void app_error_handler function (keep only C implementation) and remove #if defs.

    #include "sdk_common.h"                                                                                                    
    #include "compiler_abstraction.h"                                                                                          
    #include "app_error.h"                                                                                                     
                                                                                                                               
    void app_error_handler(ret_code_t error_code, uint32_t line_num, const uint8_t * p_file_name)                              
    {                                                                                                                          
        error_info_t error_info = {                                                                                            
            .line_num    = line_num,                                                                                           
            .p_file_name = p_file_name,                                                                                        
            .err_code    = error_code,                                                                                         
        };                                                                                                                     
        app_error_fault_handler(NRF_FAULT_ID_SDK_ERROR, 0, (uint32_t)(&error_info));                                           
                                                                                                                               
        UNUSED_VARIABLE(error_info);                                                                                           
    }

Reply
  • Hi,

    I am affraid you might have different Keil version than supported by our SDK.

    There is quite an easy fix for your problem. Remove __ASM void app_error_handler function (keep only C implementation) and remove #if defs.

    #include "sdk_common.h"                                                                                                    
    #include "compiler_abstraction.h"                                                                                          
    #include "app_error.h"                                                                                                     
                                                                                                                               
    void app_error_handler(ret_code_t error_code, uint32_t line_num, const uint8_t * p_file_name)                              
    {                                                                                                                          
        error_info_t error_info = {                                                                                            
            .line_num    = line_num,                                                                                           
            .p_file_name = p_file_name,                                                                                        
            .err_code    = error_code,                                                                                         
        };                                                                                                                     
        app_error_fault_handler(NRF_FAULT_ID_SDK_ERROR, 0, (uint32_t)(&error_info));                                           
                                                                                                                               
        UNUSED_VARIABLE(error_info);                                                                                           
    }

Children
Related