QuakeGod
2024-02-25 95322c84888cbe2e92024d4d65698f59b016cb52
ComLib/Src/KMachine.c
@@ -30,7 +30,7 @@
{
//   sizeof(stKMInfoBlock),
   (BOARD_TYPE<<8) + BOARD_VER,         //nDeviceType    BOARD_VER,         //nDevieVer
   0x0104,         //ProgVer
   0x0107,         //ProgVer
   0x0100,         //KLinkVer
   0x0100,         //KBusVer
//   0x0100,         //KNetVer
@@ -54,9 +54,10 @@
   0,               //nAbility;
   6,               //nSwitchBits;
};
const char VersionStr[] __attribute__((at(FLASH_BASE + 0X1000))) //__attribute__((at(0X8001000)))
/*
const char VersionStr[] __attribute__((at(FLASH_BASE + 0X2000))) //__attribute__((at(0X8001000)))
   = "3.00";
*/
const stStoredKMSysCfg KMDefaultSysCfg /*__attribute__((at(STORECFGBASE)))*/ =
{
   START_SIGN,
@@ -181,7 +182,7 @@
   res = HAL_FLASH_Unlock();
   uint32_t ErrNo;   
   FLASH_EraseInitTypeDef erase1;
   erase1.NbPages=1;
   erase1.NbPages=(nByteSize-1) / FLASH_PAGESIZE + 1;;
   erase1.PageAddress=(unsigned int)pAddrFlash;
   erase1.TypeErase=FLASH_TYPEERASE_PAGES;
   res = HAL_FLASHEx_Erase(&erase1,&ErrNo);