Faults = PreciseErr Fault PC = 0x0001C27C = strlen + 12 in section .text = No line number information available for address 0x1c27c <strlen+12> |
void GetDateFromTimestamp(unsigned long time_stamp, RTC_TIME_T * FullTime) { struct tm * time; time = gmtime((const time_t *) &time_stamp); |
r00x00000027 r10x0000007B r20x0000165E r30x00000003 r40x00001661 r50x00000028 r60x0000000D r70x00000258 r80xB6DB7DB3 r90xFFFFF668 r100xF7368B72 r110x1FCF61B4 r120x00000000 sp0x10003F6C lr0x00000CC9 pc0x000188A8 psr0x21000000 flagsnzCvq epsrnone ipsr0 (Base) psp0x27ECE1DC control0x00000000 cycle0x00000000 cycledelta0x00000000 vectpcn/a faultsn/a basepri0x00000000 primask0x00000000 faultmask0x00000000 |
r00x00000027 r10x0000007B r20x0000165E r30x00000003 r40x00001661 r50x00000028 r60x0000000D r70x00000258 r80xB6DB7DB3 r90xFFFFF668 r100xF7368B72 r110x1FCF61B4 r120x00000000 sp0x10003F48 lr0xFFFFFFF9 pc0x000100F6 psr0x21000003 flagsnzCvq epsrnone ipsr3 (HardFault) psp0x27ECE1DC control0x00000000 cycle0x00000000 cycledelta0x00000000 vectpc0x000188A8 faultsUnaligned basepri0x00000000 primask0x00000000 faultmask0x00000000 |
Faults = Unaligned Fault PC = 0x000188A8 = gmtime_r + 112 in section .text = No line number information available for address 0x188a8 <gmtime_r+112> Fault status registers: IPSR = 0x21000003: 3 (HardFault) CFSR = 01000000 (Configurable Fault Status Register) HFSR = 40000000 (Hard Fault Status Register) DFSR = 00000000 (Debug Fault Status Register) MMAR = e000edf8 [INVALID] (MemManage Fault Address Register) BFAR = e000edf8 [INVALID] (Bus Fault Address Register) AFSR = 00000000 (Auxiliary Fault Status Register) Stacked registers: R0 = 00000027 R1 = 0000007b R2 = 0000165e R3 = 00000003 R12 = 00000000 LR = 00000cc9 PC = 000188a8 PSR = 21000200 SP = 10003f48 |
00018874: ldr r5, [pc, #276] ; (0x1898c <gmtime_r+340>) 00018876: ldr r3, [pc, #280] ; (0x18990 <gmtime_r+344>) 00018878: smull r4, r5, r5, r0 0001887c: adds r4, r2, #3 0001887e: smull r8, r9, r4, r3 00018882: add r5, r0 00018884: asrs r3, r0, #31 00018886: rsb r5, r3, r5, asr #5 0001888a: add.w lr, r4, r9 0001888e: asrs r3, r4, #31 00018890: rsb r3, r3, lr, asr #2 00018894: rsb r3, r3, r3, lsl #3 00018898: subs r3, r4, r3 0001889a: rsb r7, r5, r5, lsl #4 0001889e: it mi 000188a0: addmi r3, #7 000188a2: sub.w r0, r0, r7, lsl #2 000188a6: cmp r2, #0 000188a8: stmia.w r1, {r0, r5, r6} |
void execute_user_code(void) { void (*user_code_entry)(void); unsigned *p;// used for loading address of reset handler from user flash /* Change the Vector Table to the USER_FLASH_START in case the user application uses interrupts */ SCB ->VTOR = (USER_FLASH_START& 0x1FFFFF80); // Load contents of second word of user flash - the reset handler address // in the applications vector table p = (unsigned *)(USER_FLASH_START+4); // Set user_code_entry to be the address contained in that second word // of user flash user_code_entry = (void *)*p; if((unsigned int)user_code_entry>USER_FLASH_START){ // Jump to user application user_code_entry(); } else { // The FW is not good. } } |
void execute_user_code(void) { void (*user_code_entry)(void); unsigned *p;// used for loading address of reset handler from user flash /* Change the Vector Table to the USER_FLASH_START in case the user application uses interrupts */ SCB ->VTOR = (USER_FLASH_START& 0x1FFFFF80); // Load contents of second word of user flash - the reset handler address // in the applications vector table p = (unsigned *)(USER_FLASH_START); // Set stack pointer to given address __set_MSP(*p); p++; // Set user_code_entry to be the address contained in that second word // of user flash user_code_entry = (void *)*p; if((unsigned int)user_code_entry>USER_FLASH_START){ // Jump to user application user_code_entry(); } else { // The FW is not good. } } |
char TBuf[128]; char * Bufp = &TBuf[0]; and in a function : snprintf(Bufp, 100, "%d,4", BT_Paired_selected); |