How to use the valid user code checksum on LPC55

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use the valid user code checksum on LPC55

25 Views
andrewjfox
Contributor I

I've previously used other LPC devices and understand how the valid user code checksum works, but now using the LPC55 (Cortex-M33) device in new project, and doesn't look like it uses the valid user code checksum. The linker map shows it being generated, and startup code has the declaration, but it's not getting put into the vector table. The vector table seems to have another entry for SecureFault_Handler where the checksum is normally placed. And when I inspect the hex file, the 8th entry is location of SecureFault_Handler from linker map.

Does the LPC55xx / Cortex-M33 use the valid user code checksum, and if not is there another similar option to verify the vector table is valid ? 

WEAK extern void __valid_user_code_checksum();
extern void _vStackBase(void);

//*****************************************************************************
//*****************************************************************************
#if defined (__cplusplus)
} // extern "C"
#endif
//*****************************************************************************
// The vector table.
// This relies on the linker script to place at correct location in memory.
//*****************************************************************************



extern void (* const g_pfnVectors[])(void);
extern void * __Vectors __attribute__ ((alias ("g_pfnVectors")));

__attribute__ ((used, section(".isr_vector")))
void (* const g_pfnVectors[])(void) = {
    // Core Level - CM33
    &_vStackTop,                       // The initial stack pointer
    ResetISR,                          // The reset handler
    NMI_Handler,                       // The NMI handler
    HardFault_Handler,                 // The hard fault handler
    MemManage_Handler,                 // The MPU fault handler
    BusFault_Handler,                  // The bus fault handler
    UsageFault_Handler,                // The usage fault handler
    SecureFault_Handler,               // The secure fault handler
    0,                                 // ECRP
    0,                                 // Reserved
    0,                                 // Reserved
    SVC_Handler,                       // SVCall handler
    DebugMon_Handler,                  // Debug monitor handler
    0,                                 // Reserved

 

Labels (1)
0 Kudos
Reply
0 Replies