zhangbo преди 3 години
родител
ревизия
c410b83080
променени са 8 файла, в които са добавени 25 реда и са изтрити 9 реда
  1. 7 0
      .gitignore
  2. 0 0
      app/AuthLicense/AuthLicense.h
  3. 0 0
      app/bmc/AuthLicense.h
  4. BIN
      app/bmc/bmc_app
  5. 16 8
      app/bmc/iflash.c
  6. 1 1
      app/bmc/iflash.h
  7. 1 0
      app/bmc/main.c
  8. BIN
      app/ipmitool-1.8.18.tar.gz

+ 7 - 0
.gitignore

@@ -6,3 +6,10 @@ app/goahead-3.6.5/build/
 #ignore switch file
 *~
 *.swp
+app/bmc/bmc_app
+app/NCP81111_config/ncp81111_cfg
+app/ipmitool-1.8.18/ipmitool
+app/i2c_scan/i2c-scan
+app/AuthLicense/authlicense
+app/UpdateFirmware/updateFW_app
+app/test_app/test_app

+ 0 - 0
app/AuthLicense/AuthLicense..h → app/AuthLicense/AuthLicense.h


+ 0 - 0
app/bmc/AuthLicense..h → app/bmc/AuthLicense.h


BIN
app/bmc/bmc_app


+ 16 - 8
app/bmc/iflash.c

@@ -159,9 +159,8 @@ void FLASH_Lock(void);
 
 
 /*准备写入的测试数据*/
-#define DATA_32                 ((uint32_t)0x13246578)
-#define BUFLENGTH 32
-uint32_t wrbuf[BUFLENGTH] = {0xabcdef12};  
+
+
 
 /* Exported types ------------------------------------------------------------*/
 /* Exported constants --------------------------------------------------------*/
@@ -176,7 +175,7 @@ uint32_t wrbuf[BUFLENGTH] = {0xabcdef12};
   * @param  None
   * @retval None
   */
-int InternalFlash_Test(void)
+int InternalFlash_WriteBuf(const uint8_t* data, uint32_t length)
 {
 	/*要擦除的起始扇区(包含)及结束扇区(不包含),如8-12,表示擦除8、9、10、11扇区*/
 	uint32_t uwStartSector = 0;
@@ -187,8 +186,16 @@ int InternalFlash_Test(void)
 
 	// __IO uint32_t uwData32 = 0;
 	__IO uint32_t uwMemoryProgramStatus = 0;
+  __IO uint32_t rr=0;
+
+  uint8_t* pbuf = data;
+  //pbuf = (uint8_t*)malloc(length*sizeof(uint8_t));
+
+
+
+	static uint32_t i = 0;
+
 
-	int i = 0;
 	
   /* FLASH 解锁 ********************************/
   /* 使能访问FLASH控制寄存器 */
@@ -232,11 +239,12 @@ int InternalFlash_Test(void)
   uwAddress = FLASH_USER_START_ADDR;
 
 
-  for (i=0;i < BUFLENGTH;i++)
+  for (i=0;i < length;i++)
   {
-    if (FLASH_ProgramWord(uwAddress, DATA_32) == FLASH_COMPLETE)
+    rr = pbuf[i];
+    if (FLASH_ProgramByte(uwAddress, rr) == FLASH_COMPLETE)
     {
-      uwAddress = uwAddress + 4;
+      uwAddress = uwAddress + 1;
     }
     else
     { 

+ 1 - 1
app/bmc/iflash.h

@@ -3,6 +3,6 @@
 #include <stdio.h>
 #include <stdint.h>
 
-//int InternalFlash_Test(void);
+int InternalFlash_WriteBuf(const uint8_t* const data, uint32_t length);
 
 #endif /* __IFLASH_H__ */

+ 1 - 0
app/bmc/main.c

@@ -38,6 +38,7 @@
 #include "driver.h"
 #include "sensor_tbl.h"
 #include "com_IPMI_SDRRecord.h"
+#include "AuthLicense.h"
 
 
 /* gloabl varible */

BIN
app/ipmitool-1.8.18.tar.gz