Explorar o código

2020春节备份

hyl595138788 %!s(int64=5) %!d(string=hai) anos
pai
achega
dff0801f61
Modificáronse 3 ficheiros con 86 adicións e 40 borrados
  1. 72 29
      MDK-ARM/JLinkLog.txt
  2. 8 9
      MDK-ARM/Project.uvgui.HGS
  3. 6 2
      USER/auth.c

+ 72 - 29
MDK-ARM/JLinkLog.txt

@@ -1,27 +1,28 @@
-T1BB4 054:406 SEGGER J-Link V5.02f Log File (0001ms, 10497ms total)
-T1BB4 054:406 DLL Compiled: Oct  2 2015 20:51:34 (0001ms, 10497ms total)
-T1BB4 054:406 Logging started @ 2019-08-14 10:08 (0001ms, 10497ms total)
-T1BB4 054:407 JLINK_SetWarnOutHandler(...) (0000ms, 10497ms total)
-T1BB4 054:407 JLINK_OpenEx(...)
+
+T18A8 001:588 SEGGER J-Link V5.02f Log File (0001ms, 0298ms total)
+T18A8 001:588 DLL Compiled: Oct  2 2015 20:51:34 (0001ms, 0298ms total)
+T18A8 001:588 Logging started @ 2019-12-30 14:43 (0001ms, 0298ms total)
+T18A8 001:589 JLINK_SetWarnOutHandler(...) (0000ms, 0298ms total)
+T18A8 001:589 JLINK_OpenEx(...)
 Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
 Hardware: V7.00
-S/N: 20090928
-Feature(s): RDI,FlashDL,FlashBP,JFlash,GDBFull  returns O.K. (0276ms, 10773ms total)
-T1BB4 054:683 JLINK_SetErrorOutHandler(...) (0000ms, 10773ms total)
-T1BB4 054:685 JLINK_ExecCommand("ProjectFile = "D:\work software\IAP_M20\MDK-ARM\JLinkSettings.ini"", ...)  returns 0x00 (0001ms, 10774ms total)
-T1BB4 054:686 JLINK_ExecCommand("Device = STM32F105RB", ...)Device "STM32F105RB" selected.  returns 0x00 (0000ms, 10774ms total)
-T1BB4 054:686 JLINK_ExecCommand("DisableConnectionTimeout", ...)  returns 0x01 (0000ms, 10775ms total)
-T1BB4 054:687 JLINK_GetHardwareVersion()  returns 0x11170 (0000ms, 10775ms total)
-T1BB4 054:687 JLINK_GetDLLVersion()  returns 50206 (0000ms, 10775ms total)
-T1BB4 054:687 JLINK_GetFirmwareString(...) (0000ms, 10775ms total)
-T1BB4 054:687 JLINK_GetDLLVersion()  returns 50206 (0000ms, 10775ms total)
-T1BB4 054:687 JLINK_GetCompileDateTime() (0000ms, 10775ms total)
-T1BB4 054:687 JLINK_GetFirmwareString(...) (0000ms, 10775ms total)
-T1BB4 054:687 JLINK_GetHardwareVersion()  returns 0x11170 (0000ms, 10775ms total)
-T1BB4 054:687 JLINK_TIF_Select(JLINKARM_TIF_SWD)  returns 0x00 (0003ms, 10778ms total)
-T1BB4 054:690 JLINK_SetSpeed(5000) (0001ms, 10779ms total)
-T1BB4 054:692 JLINK_SetResetType(JLINKARM_RESET_TYPE_NORMAL)  returns JLINKARM_RESET_TYPE_NORMAL (0000ms, 10779ms total)
-T1BB4 054:692 JLINK_Reset() >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF>STM32 (connect): Can not attach to CPU. Trying connect under reset. >0x108 TIF> >0x108 TIF>
+S/N: 20090937
+Feature(s): RDI,FlashDL,FlashBP,JFlash,GDBFull  returns O.K. (0287ms, 0585ms total)
+T18A8 001:876 JLINK_SetErrorOutHandler(...) (0000ms, 0585ms total)
+T18A8 001:876 JLINK_ExecCommand("ProjectFile = "D:\work software\IAP_M20\MDK-ARM\JLinkSettings.ini"", ...)  returns 0x00 (0001ms, 0586ms total)
+T18A8 001:877 JLINK_ExecCommand("Device = STM32F105RB", ...)Device "STM32F105RB" selected.  returns 0x00 (0000ms, 0586ms total)
+T18A8 001:877 JLINK_ExecCommand("DisableConnectionTimeout", ...)  returns 0x01 (0000ms, 0586ms total)
+T18A8 001:877 JLINK_GetHardwareVersion()  returns 0x11170 (0000ms, 0586ms total)
+T18A8 001:877 JLINK_GetDLLVersion()  returns 50206 (0000ms, 0586ms total)
+T18A8 001:877 JLINK_GetFirmwareString(...) (0000ms, 0586ms total)
+T18A8 001:877 JLINK_GetDLLVersion()  returns 50206 (0000ms, 0586ms total)
+T18A8 001:877 JLINK_GetCompileDateTime() (0001ms, 0587ms total)
+T18A8 001:878 JLINK_GetFirmwareString(...) (0000ms, 0587ms total)
+T18A8 001:878 JLINK_GetHardwareVersion()  returns 0x11170 (0000ms, 0587ms total)
+T18A8 001:878 JLINK_TIF_Select(JLINKARM_TIF_SWD)  returns 0x00 (0003ms, 0590ms total)
+T18A8 001:881 JLINK_SetSpeed(5000) (0001ms, 0591ms total)
+T18A8 001:883 JLINK_SetResetType(JLINKARM_RESET_TYPE_NORMAL)  returns JLINKARM_RESET_TYPE_NORMAL (0000ms, 0591ms total)
+T18A8 001:883 JLINK_Reset() >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF>STM32 (connect): Can not attach to CPU. Trying connect under reset. >0x108 TIF> >0x108 TIF>
   ***** Error: STM32: Connecting to CPU via connect under reset failed.
                 JLINK_EMU_HasCapEx(0x0000002C)  returns 0x00 (0000ms, 0000ms total)
                 JLINK_EMU_HasCapEx(0x0000002C)  returns 0x00 (0000ms, 0000ms total)
@@ -29,12 +30,54 @@ T1BB4 054:692 JLINK_Reset() >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x108 TIF> >0x1
   ***** Error: STM32: Connecting to CPU via connect under reset failed.
                 JLINK_EMU_HasCapEx(0x0000002C)  returns 0x00 (0000ms, 0000ms total)
                 JLINK_EMU_HasCapEx(0x0000002C)  returns 0x00 (0000ms, 0000ms total)
-                returns 0x00000000 (0315ms, 11937ms total)
-T1BB4 055:851 JLINK_GetId() >0x108 TIF> >0x108 TIF>STM32 (connect): Can not attach to CPU. Trying connect under reset. >0x108 TIF> >0x108 TIF>
+                returns 0x00000000 (0316ms, 1749ms total)
+T18A8 003:042 JLINK_GetId() >0x108 TIF> >0x108 TIF>STM32 (connect): Can not attach to CPU. Trying connect under reset. >0x108 TIF> >0x108 TIF>
   ***** Error: STM32: Connecting to CPU via connect under reset failed.
                 JLINK_EMU_HasCapEx(0x0000002C)  returns 0x00 (0000ms, 0000ms total)
-                returns 0x00000000 (0316ms, 12253ms total)
-T1BB4 056:167 JLINK_GetFirmwareString(...) (0000ms, 12253ms total)
-T1BB4 095:833 JLINK_Close() (0001ms, 12254ms total)
-T1BB4 095:833  (0001ms, 12254ms total)
-T1BB4 095:833 Closed (0001ms, 12254ms total)
+                returns 0x00000000 (0316ms, 2065ms total)
+T18A8 003:363 JLINK_GetFirmwareString(...) (0001ms, 2066ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (3475ms, 5541ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (9501ms, 11567ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (23904ms, 25970ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (25929ms, 27995ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (27754ms, 29820ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (29129ms, 31195ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (30354ms, 32420ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (34254ms, 36320ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (35179ms, 37245ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (83408ms, 85474ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (85008ms, 87074ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (88358ms, 90424ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (89983ms, 92049ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (91933ms, 93999ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (94684ms, 96750ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (95509ms, 97575ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (97384ms, 99450ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (102009ms, 104075ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (104459ms, 106525ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (110860ms, 112926ms total)
+T1488 003:363 
+  ***** Error: Connection to emulator lost! (117335ms, 119401ms total)
+T18A8 433:454 JLINK_Close() (0000ms, 2066ms total)
+T18A8 433:454  (0000ms, 2066ms total)
+T18A8 433:454 Closed (0000ms, 2066ms total)

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 8 - 9
MDK-ARM/Project.uvgui.HGS


+ 6 - 2
USER/auth.c

@@ -36,7 +36,7 @@ unsigned int mcustartAddr[STM_END]=
 
 void GetSTM32_McuID(unsigned char *id,STM32_MCU_DEF type)
 {
-	unsigned char testSTM32[12]={1,2,3,4,5,6,7,8,9,10,11,1};
+	//unsigned char testSTM32[12]={1,2,3,4,5,6,7,8,9,10,11,1};
 	unsigned char i;
 	if(id==NULL) return;
 	
@@ -202,6 +202,7 @@ void GetStartAddrByFlashSize(void)
 	iap_temp_addr=auth_seg_addr+this_dev_page_size;
 	//取得APP应用起始地址
 	app_seg_addr=iap_temp_addr+this_dev_page_size;
+	
 	if(app_seg_addr % 2048) app_seg_addr += 1024;//跳转地址需要是页大小的倍数
 	//printf("addr:%08x,%08x,%08x\r\n",auth_seg_addr,iap_temp_addr,app_seg_addr);
 }
@@ -244,10 +245,12 @@ void authCheck(void)
 	printf("try auth\r\n");
 #endif
 	reInitUart1();
+	
 	i=0;
 	while(1){
 		if(i==0) authSendCmd(PRO_AUTH_REQ,id,UNIQUE_ID_BYTES);
-		if(++i >= 1000*3000) i=0;
+		if(++i >= 1000*3000) i=0;	
+		
 		//Handle uart data
 		if(rx1_len==0) continue;
 		ret=decodeAuthInfo(RxBuffer1,rx1_len,encodeValue,&authInfo);
@@ -273,6 +276,7 @@ void takeNoteThatFlushAppCompleteOrNot(char status)
 	else flushStatus=APP_UPDATE_COMPLETED;//已完成APP的更新
 	
 	ReadFlashData(iap_temp_addr, (unsigned char *)&currentStatus, 4);
+	
 	if(currentStatus == flushStatus) return;
 	WritePageData(iap_temp_addr, (unsigned char *)&flushStatus, 4);
 }

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio