アップデータを修正

書き換え失敗時、(中断ではなく、データ異常など)復旧を試みる
 無限ループや暴走はまずい...

git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_mcu@120 013db118-44a6-b54f-8bf7-843cb86687b1
This commit is contained in:
fujita_ryohei 2010-04-02 08:02:51 +00:00
parent 4918ca455d
commit 3db185ef19
3 changed files with 9 additions and 8 deletions

View File

@ -6,7 +6,7 @@
#define MCU_VER_MAJOR 0x00 #define MCU_VER_MAJOR 0x00
#define MCU_VER_MINOR 0x10 #define MCU_VER_MINOR 0x14
#define _OVERCLOCK_ #define _OVERCLOCK_

View File

@ -13,7 +13,8 @@ __far static const unsigned char MGC_LOAD[] = __TIME__;
static const unsigned char MGC_HEAD[] = __TIME__; static const unsigned char MGC_HEAD[] = __TIME__;
#pragma section @@CNST MGC_TAIL AT 0x4FF6 #pragma section @@CNST MGC_TAIL AT 0x4FF6
static const unsigned char MGC_TAIL[] = __TIME__; //static const unsigned char MGC_TAIL[] = __TIME__;
static const unsigned char MGC_TAIL[] = "fuga_";
// 0Dまでこれを使用 // 0Dまでこれを使用

View File

@ -163,8 +163,8 @@ err firm_update( )
{ {
// 書き込み後のチェックエラー // 書き込み後のチェックエラー
// リブートののち、リストア // リブートののち、リストア
FSL_ForceReset(); // リセット // FSL_ForceReset(); // リセット
// FSL_SwapBootCluster( ); FSL_SwapBootCluster( );
// FSL_Close( ); // FSL_Close( );
return ( ERR_ERR ); return ( ERR_ERR );
} }
@ -206,8 +206,8 @@ err firm_update( )
{ {
// データエラー // データエラー
// リブートののち、リストア // リブートののち、リストア
FSL_ForceReset(); // リセット // FSL_ForceReset(); // リセット
// FSL_SwapBootCluster( ); FSL_SwapBootCluster( );
// FSL_Close( ); // FSL_Close( );
// 戻ってこない // // 戻ってこない //
} }
@ -239,8 +239,8 @@ err firm_restore( )
// リブート // リブート
// スワップは不要です! // スワップは不要です!
// FSL_SwapBootCluster(); FSL_SwapBootCluster();
FSL_ForceReset( ); // FSL_ForceReset( );
return ( ERR_SUCCESS ); return ( ERR_SUCCESS );
} }