- added seed/key security functionality.

git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@102 5dc33758-31d5-4daf-9ae8-b24bf3d40d73
This commit is contained in:
Frank Voorburg 2014-07-24 09:31:17 +00:00
parent 24e3a16dce
commit c975878037
120 changed files with 8059 additions and 5816 deletions

BIN
Host/FeaserKey.dll Normal file

Binary file not shown.

View File

@ -104,6 +104,11 @@ const kErrFsrResourceUnavailable = $81; // Resource needed but not available
const kErrFsrSeedKeyDllInvalid = $82; // Seed/Key DLL is invalid
const kErrFsrKeyAlgoMissing = $83; // Key computation algorithm is missing
// Start programming session return codes
const kProgSessionStarted = 0;
const kProgSessionUnlockError = 1;
const kProgSessionGenericError = 2;
//***************************************************************************************
// Type Definitions
@ -148,7 +153,7 @@ type
function Connect : Boolean;
function IsComError : Boolean;
procedure Disconnect;
function StartProgrammingSession : Boolean;
function StartProgrammingSession : Byte;
function StopProgrammingSession : Boolean;
function ClearMemory(addr : LongWord; len : LongWord) : Boolean;
function WriteData(addr : LongWord; len : LongWord; data : PByteArray) : Boolean;
@ -1073,7 +1078,8 @@ end; //*** end of CmdProgramClear ***
//***************************************************************************************
// NAME: StartProgrammingSession
// PARAMETER: none
// RETURN VALUE: True is successful, False otherwise
// RETURN VALUE: kProgSessionStarted if successful, kProgSessionUnlockError in case
// the PGM resource could not be unlocked or kProgSessionGenericError.
// DESCRIPTION: Starts the programming session using the following XCP command
// sequence:
// * CONNECT
@ -1083,7 +1089,7 @@ end; //*** end of CmdProgramClear ***
// * PROGRAM_START
//
//***************************************************************************************
function TXcpLoader.StartProgrammingSession : Boolean;
function TXcpLoader.StartProgrammingSession : Byte;
var
xcpProtection : TXcpProtection;
supportedRes : Byte;
@ -1092,21 +1098,27 @@ var
keyData : array[0..5] of Byte;
keyLen : byte;
begin
// init return value
result := false;
// send the CONNECT command
if not CmdConnect then Exit;
if not CmdConnect then
begin
result := kProgSessionGenericError;
Exit;
end;
// make sure the programming resource is supported
if (FResources and kResPGM) <> kResPGM then
begin
FLastError := kErrFsrResourceUnavailable;
result := kProgSessionGenericError;
Exit;
end;
// send the GET_STATUS command
if not CmdGetStatus then Exit;
if not CmdGetStatus then
begin
result := kProgSessionGenericError;
Exit;
end;
// check if we need to unlock the programming resource
if (FProtection and kResPGM) = kResPGM then
@ -1118,12 +1130,14 @@ begin
if xcpProtection.GetPrivileges(@supportedRes) <> 0 then
begin
FLastError := kErrFsrSeedKeyDllInvalid; // error calling DLL function
result := kProgSessionUnlockError;
xcpProtection.Free; // release the object
Exit;
end;
if (supportedRes and kResPGM) <> kResPGM then
begin
FLastError := kErrFsrKeyAlgoMissing; // key algorithm not present
result := kProgSessionUnlockError;
xcpProtection.Free; // release the object
Exit;
end;
@ -1131,6 +1145,7 @@ begin
// obtain the seed for the programming resource
if not CmdGetSeed(@seedData, kResPGM, seedLen) then
begin
result := kProgSessionUnlockError;
xcpProtection.Free; // release the object
Exit;
end;
@ -1140,6 +1155,7 @@ begin
if xcpProtection.ComputKeyFromSeed(kResPGM, seedLen, @seedData, @keyLen, @keyData) <> 0 then
begin
FLastError := kErrFsrSeedKeyDllInvalid; // error calling DLL function
result := kProgSessionUnlockError;
xcpProtection.Free; // release the object
Exit;
end;
@ -1148,21 +1164,30 @@ begin
xcpProtection.Free;
// we have the key so now unlock the resource
if not CmdUnlock(@keyData, keyLen) then Exit;
if not CmdUnlock(@keyData, keyLen) then
begin
result := kProgSessionUnlockError;
Exit;
end;
// make sure the PGM resource is really unprotected now
if (FProtection and kResPGM) = kResPGM then
begin
FLastError := kErrACCESS_LOCKED;
result := kProgSessionUnlockError;
Exit;
end;
end;
// send the PROGRAM_START command
if not CmdProgramStart then Exit;
if not CmdProgramStart then
begin
result := kProgSessionGenericError;
Exit;
end;
// successfully started the programming session
result := true;
result := kProgSessionStarted;
end; //*** end of StartProgrammingSession ***

View File

@ -254,6 +254,7 @@ var
progress : longword;
regionCnt : longword;
currentWriteCnt : word;
sessionStartResult : byte;
bufferOffset : longword;
addr : longword;
len : longword;
@ -278,7 +279,16 @@ begin
// try initial connect via XCP. if the user program is able to reactivate the bootloader
// it will do so now
if not loader.StartProgrammingSession then
sessionStartResult := loader.StartProgrammingSession;
if sessionStartResult = kProgSessionUnlockError then
begin
MbiCallbackOnLog('Security issue. Could not unprotect the programming resource. Check your configured XCP protection DLL. t='+TimeToStr(Time));
MbiCallbackOnError('Security issue. Could not unprotect the programming resource.');
loader.Disconnect;
Exit;
end;
// try initial connect via XCP
if sessionStartResult <> kProgSessionStarted then
begin
// update the user info
MbiCallbackOnInfo('Could not connect. Retrying. Reset your target if this takes a long time.');
@ -290,8 +300,10 @@ begin
// should be at least 2.5x this.
Sleep(200);
// continuously try to connect via XCP true the backdoor
while not loader.StartProgrammingSession do
sessionStartResult := kProgSessionGenericError;
while sessionStartResult <> kProgSessionStarted do
begin
sessionStartResult := loader.StartProgrammingSession;
Application.ProcessMessages;
Sleep(5);
// if the is in reset of otherwise does not have the CAN controller synchronized to
@ -310,7 +322,15 @@ begin
end;
Sleep(200);
end;
// don't retry if the error was caused by not being able to unprotect the programming resource
if sessionStartResult = kProgSessionUnlockError then
begin
MbiCallbackOnLog('Security issue. Could not unprotect the programming resource. Check your configured XCP protection DLL. t='+TimeToStr(Time));
MbiCallbackOnError('Security issue. Could not unprotect the programming resource.');
Exit;
end;
// check if the user cancelled
if stopRequest then
begin
MbiCallbackOnError('Programming session cancelled by user.');

View File

@ -254,6 +254,7 @@ var
progress : longword;
regionCnt : longword;
currentWriteCnt : word;
sessionStartResult : byte;
bufferOffset : longword;
addr : longword;
len : longword;
@ -278,7 +279,16 @@ begin
// try initial connect via XCP. if the user program is able to reactivate the bootloader
// it will do so now
if not loader.StartProgrammingSession then
sessionStartResult := loader.StartProgrammingSession;
if sessionStartResult = kProgSessionUnlockError then
begin
MbiCallbackOnLog('Security issue. Could not unprotect the programming resource. Check your configured XCP protection DLL. t='+TimeToStr(Time));
MbiCallbackOnError('Security issue. Could not unprotect the programming resource.');
loader.Disconnect;
Exit;
end;
// try initial connect via XCP
if sessionStartResult <> kProgSessionStarted then
begin
// update the user info
MbiCallbackOnInfo('Could not connect. Retrying. Reset your target if this takes a long time.');
@ -290,8 +300,10 @@ begin
// should be at least 2.5x this.
Sleep(200);
// continuously try to connect via XCP true the backdoor
while not loader.StartProgrammingSession do
sessionStartResult := kProgSessionGenericError;
while sessionStartResult <> kProgSessionStarted do
begin
sessionStartResult := loader.StartProgrammingSession;
Application.ProcessMessages;
Sleep(5);
// if the is in reset of otherwise does not have the CAN controller synchronized to
@ -310,7 +322,15 @@ begin
end;
Sleep(200);
end;
// don't retry if the error was caused by not being able to unprotect the programming resource
if sessionStartResult = kProgSessionUnlockError then
begin
MbiCallbackOnLog('Security issue. Could not unprotect the programming resource. Check your configured XCP protection DLL. t='+TimeToStr(Time));
MbiCallbackOnError('Security issue. Could not unprotect the programming resource.');
Exit;
end;
// check if the user cancelled
if stopRequest then
begin
MbiCallbackOnError('Programming session cancelled by user.');

View File

@ -253,6 +253,7 @@ var
progress : longword;
regionCnt : longword;
currentWriteCnt : word;
sessionStartResult : byte;
bufferOffset : longword;
addr : longword;
len : longword;
@ -287,7 +288,16 @@ begin
// we now have a socket connected to the target. next attempt to connect to the target
// via XCP.
MbiCallbackOnLog('Starting the programming session. t='+TimeToStr(Time));
if not loader.StartProgrammingSession then
sessionStartResult := loader.StartProgrammingSession;
if sessionStartResult = kProgSessionUnlockError then
begin
MbiCallbackOnLog('Security issue. Could not unprotect the programming resource. Check your configured XCP protection DLL. t='+TimeToStr(Time));
MbiCallbackOnError('Security issue. Could not unprotect the programming resource.');
loader.Disconnect;
Exit;
end;
if sessionStartResult <> kProgSessionStarted then
begin
// note that a running user program might have received the connect command and
// performed a software reset to activate the bootloader. this causes a reconfigu-
@ -322,17 +332,38 @@ begin
//---------------- start the programming session --------------------------------------
MbiCallbackOnLog('Starting the programming session. t='+TimeToStr(Time));
// try initial connect via XCP
if not loader.StartProgrammingSession then
sessionStartResult := loader.StartProgrammingSession;
if sessionStartResult = kProgSessionUnlockError then
begin
MbiCallbackOnLog('Security issue. Could not unprotect the programming resource. Check your configured XCP protection DLL. t='+TimeToStr(Time));
MbiCallbackOnError('Security issue. Could not unprotect the programming resource.');
loader.Disconnect;
Exit;
end;
if sessionStartResult <> kProgSessionStarted then
begin
// update the user info
MbiCallbackOnInfo('Could not connect. Please reset your target...');
MbiCallbackOnLog('Connect failed. Switching to backdoor entry mode. t='+TimeToStr(Time));
Application.ProcessMessages;
// continuously try to connect via XCP true the backdoor
while not loader.StartProgrammingSession do
sessionStartResult := kProgSessionGenericError;
while sessionStartResult <> kProgSessionStarted do
begin
sessionStartResult := loader.StartProgrammingSession;
Application.ProcessMessages;
Sleep(5);
// don't retry if the error was caused by not being able to unprotect the programming resource
if sessionStartResult = kProgSessionUnlockError then
begin
MbiCallbackOnLog('Security issue. Could not unprotect the programming resource. Check your configured XCP protection DLL. t='+TimeToStr(Time));
MbiCallbackOnError('Security issue. Could not unprotect the programming resource.');
Exit;
end;
// check if the user cancelled
if stopRequest then
begin
MbiCallbackOnError('Programming session cancelled by user.');

View File

@ -253,6 +253,7 @@ var
progress : longword;
regionCnt : longword;
currentWriteCnt : word;
sessionStartResult : byte;
bufferOffset : longword;
addr : longword;
len : longword;
@ -276,17 +277,28 @@ begin
MbiCallbackOnLog('Starting the programming session. t='+TimeToStr(Time));
// try initial connect via XCP
if not loader.StartProgrammingSession then
if loader.StartProgrammingSession <> kProgSessionStarted then
begin
// update the user info
MbiCallbackOnInfo('Could not connect. Retrying. Reset your target if this takes a long time.');
MbiCallbackOnLog('Connect failed. Switching to backdoor entry mode. t='+TimeToStr(Time));
Application.ProcessMessages;
// continuously try to connect via XCP true the backdoor
while not loader.StartProgrammingSession do
sessionStartResult := kProgSessionGenericError;
while sessionStartResult <> kProgSessionStarted do
begin
sessionStartResult := loader.StartProgrammingSession;
Application.ProcessMessages;
Sleep(5);
// don't retry if the error was caused by not being able to unprotect the programming resource
if sessionStartResult = kProgSessionUnlockError then
begin
MbiCallbackOnLog('Security issue. Could not unprotect the programming resource. Check your configured XCP protection DLL. t='+TimeToStr(Time));
MbiCallbackOnError('Security issue. Could not unprotect the programming resource.');
Exit;
end;
// check if the user cancelled
if stopRequest then
begin
MbiCallbackOnError('Programming session cancelled by user.');

View File

@ -253,6 +253,7 @@ var
progress : longword;
regionCnt : longword;
currentWriteCnt : word;
sessionStartResult : byte;
bufferOffset : longword;
addr : longword;
len : longword;
@ -288,17 +289,28 @@ begin
MbiCallbackOnLog('Starting the programming session. t='+TimeToStr(Time));
// try initial connect via XCP
if not loader.StartProgrammingSession then
if loader.StartProgrammingSession <> kProgSessionStarted then
begin
// update the user info
MbiCallbackOnInfo('Could not connect. Please reset your target...');
MbiCallbackOnInfo('Could not connect. Retrying. Reset your target if this takes a long time.');
MbiCallbackOnLog('Connect failed. Switching to backdoor entry mode. t='+TimeToStr(Time));
Application.ProcessMessages;
// continuously try to connect via XCP true the backdoor
while not loader.StartProgrammingSession do
sessionStartResult := kProgSessionGenericError;
while sessionStartResult <> kProgSessionStarted do
begin
sessionStartResult := loader.StartProgrammingSession;
Application.ProcessMessages;
Sleep(5);
// don't retry if the error was caused by not being able to unprotect the programming resource
if sessionStartResult = kProgSessionUnlockError then
begin
MbiCallbackOnLog('Security issue. Could not unprotect the programming resource. Check your configured XCP protection DLL. t='+TimeToStr(Time));
MbiCallbackOnError('Security issue. Could not unprotect the programming resource.');
Exit;
end;
// check if the user cancelled
if stopRequest then
begin
MbiCallbackOnError('Programming session cancelled by user.');

View File

@ -0,0 +1,126 @@
/************************************************************************************//**
* \file SeedNKey.cpp
* \brief XCP Seed/Key algorithms
* \internal
*----------------------------------------------------------------------------------------
* C O P Y R I G H T
*----------------------------------------------------------------------------------------
* Copyright (c) 2014 by Feaser http://www.feaser.com All rights reserved
*
*----------------------------------------------------------------------------------------
* L I C E N S E
*----------------------------------------------------------------------------------------
* This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with OpenBLT.
* If not, see <http://www.gnu.org/licenses/>.
*
* A special exception to the GPL is included to allow you to distribute a combined work
* that includes OpenBLT without being obliged to provide the source code for any
* proprietary components. The exception text is included at the bottom of the license
* file <license.html>.
*
* \endinternal
****************************************************************************************/
#ifdef __cplusplus
extern "C"
{
#endif
/****************************************************************************************
* Type definitions
****************************************************************************************/
typedef unsigned char BYTE;
typedef unsigned long DWORD;
/****************************************************************************************
* Defines
****************************************************************************************/
/* XCP dll function type info */
#define XCP_DLL_EXPORT __declspec(dllexport) __cdecl
/* XCP supported resources */
#define kXcpResPGM 0x10 /* ProGraMing */
#define kXcpResSTIM 0x08 /* data STIMulation */
#define kXcpResDAQ 0x04 /* Data AcQuisition */
#define kXcpResCALPAG 0x01 /* CALibration and PAGing */
/****************************************************************************************
** NAME: XCP_ComputeKeyFromSeed
** PARAMETER: resource : resource for which the unlock key is requested
** seedLen : length of the seed
** seedPtr : pointer to the seed data
** keyLenPtr: pointer where to store the key length
** keyPtr : pointer where to store the key data
** RETURN VALUE: 0: success, 1: error
** DESCRIPTION: Computes the key for the requested resource.
**
****************************************************************************************/
/************************************************************************************//**
** \brief Computes the key for the requested resource.
** \param resource resource for which the unlock key is requested
** \param seedLen length of the seed
** \param seedPtr pointer to the seed data
** \param keyLenPtr pointer where to store the key length
** \param keyPtr pointer where to store the key data
** \return 0 on success, otherwise 1.
**
****************************************************************************************/
DWORD XCP_DLL_EXPORT XCP_ComputeKeyFromSeed( BYTE resource, BYTE seedLen, BYTE *seedPtr,
BYTE *keyLenPtr, BYTE *keyPtr)
{
BYTE i;
/* Feaser XCP driver example key algorithm for PGM simply
* decrements the value of each seed by 1
*/
if ( resource == kXcpResPGM )
{
/* compute the key */
for ( i=0; i<seedLen; i++)
{
keyPtr[i] = seedPtr[i] - 1;
}
/* set the key length */
*keyLenPtr = seedLen;
/* done */
return 0;
}
/* still here, so the resource was unsupported */
return 1;
} /*** end of XCP_ComputeKeyFromSeed ***/
/************************************************************************************//**
** \brief Computes the key for the requested resource.
** \param resourcePtr pointer where to store the supported resources for the key
** computation.
** \return 0 on success, otherwise 1.
**
****************************************************************************************/
DWORD XCP_DLL_EXPORT XCP_GetAvailablePrivileges( BYTE *resourcePtr)
{
/* this dll supports key computation algorithm for the PGM resource */
*resourcePtr = (kXcpResPGM);
return 0;
} /*** end of XCP_GetAvailablePrivileges ***/
#ifdef __cplusplus
}
#endif
/*********************************** end of SeedNKey.cpp *******************************/

View File

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SeedNKey", "SeedNKey.vcproj", "{AED6715E-93C0-49A9-8891-AACC5A9B262F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AED6715E-93C0-49A9-8891-AACC5A9B262F}.Debug|Win32.ActiveCfg = Debug|Win32
{AED6715E-93C0-49A9-8891-AACC5A9B262F}.Debug|Win32.Build.0 = Debug|Win32
{AED6715E-93C0-49A9-8891-AACC5A9B262F}.Release|Win32.ActiveCfg = Release|Win32
{AED6715E-93C0-49A9-8891-AACC5A9B262F}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,233 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="SeedNKey"
ProjectGUID="{AED6715E-93C0-49A9-8891-AACC5A9B262F}"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/SeedNKey.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SEEDNKEY_EXPORTS"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/SeedNKey.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile=".\Release/SeedNKey.dll"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile=".\Release/SeedNKey.pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary=".\Release/SeedNKey.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Release/SeedNKey.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/SeedNKey.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SEEDNKEY_EXPORTS"
MinimalRebuild="true"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/SeedNKey.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="./../../../FeaserKey.dll"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/FeaserKey.pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary=".\Debug/FeaserKey.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Debug/SeedNKey.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="SeedNKey.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

Binary file not shown.

View File

@ -6,7 +6,7 @@ extended=0
txid=1639
rxid=2017
[xcp]
seedkey=
seedkey=FeaserKey.dll
t1=1000
t3=2000
t4=10000

Binary file not shown.

View File

@ -6,7 +6,7 @@ extended=0
txid=1639
rxid=2017
[xcp]
seedkey=
seedkey=FeaserKey.dll
t1=1000
t3=2000
t4=10000

Binary file not shown.

View File

@ -3,7 +3,7 @@ hostname=169.254.19.63
port=1000
retry=1
[xcp]
seedkey=
seedkey=FeaserKey.dll
t1=1000
t3=2000
t4=10000

Binary file not shown.

View File

@ -2,7 +2,7 @@
port=3
baudrate=8
[xcp]
seedkey=
seedkey=FeaserKey.dll
t1=1000
t3=2000
t4=10000

Binary file not shown.

View File

@ -1,5 +1,5 @@
[xcp]
seedkey=
seedkey=FeaserKey.dll
t1=1000
t3=2000
t4=10000

View File

@ -155,5 +155,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -227,4 +227,64 @@ void CopServiceHook(void)
#endif /* BOOT_COP_HOOKS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -51,12 +51,12 @@
<Watches active="0" update="Never" />
</Watch4>
<Files>
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARM7_LPC2000_Olimex_LPC_L2294_Crossworks\Boot\main.c" y="53" path="C:\Work\software\OpenBLT\Target\Demo\ARM7_LPC2000_Olimex_LPC_L2294_Crossworks\Boot\main.c" left="0" selected="0" name="unnamed" top="45" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\Crossworks\cstart.s" y="336" path="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\Crossworks\cstart.s" left="18" selected="0" name="unnamed" top="319" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARM7_LPC2000_Olimex_LPC_L2294_Crossworks\Boot\blt_conf.h" y="51" path="C:\Work\software\OpenBLT\Target\Demo\ARM7_LPC2000_Olimex_LPC_L2294_Crossworks\Boot\blt_conf.h" left="0" selected="0" name="unnamed" top="29" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\Crossworks\flash.h" y="44" path="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\Crossworks\flash.h" left="18" selected="0" name="unnamed" top="9" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\Crossworks\flash.c" y="412" path="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\Crossworks\flash.c" left="18" selected="0" name="unnamed" top="399" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\cpu.c" y="43" path="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\cpu.c" left="18" selected="1" name="unnamed" top="43" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARM7_LPC2000_Olimex_LPC_L2294_Crossworks\Boot\main.c" y="53" path="C:\Work\software\OpenBLT\Target\Demo\ARM7_LPC2000_Olimex_LPC_L2294_Crossworks\Boot\main.c" left="18" selected="0" name="unnamed" top="45" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\Crossworks\cstart.s" y="336" path="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\Crossworks\cstart.s" left="0" selected="0" name="unnamed" top="319" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARM7_LPC2000_Olimex_LPC_L2294_Crossworks\Boot\blt_conf.h" y="51" path="C:\Work\software\OpenBLT\Target\Demo\ARM7_LPC2000_Olimex_LPC_L2294_Crossworks\Boot\blt_conf.h" left="18" selected="0" name="unnamed" top="29" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\Crossworks\flash.h" y="44" path="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\Crossworks\flash.h" left="0" selected="0" name="unnamed" top="9" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\Crossworks\flash.c" y="412" path="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\Crossworks\flash.c" left="0" selected="0" name="unnamed" top="399" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\cpu.c" y="43" path="C:\Work\software\OpenBLT\Target\Source\ARM7_LPC2000\cpu.c" left="0" selected="1" name="unnamed" top="43" />
</Files>
<ARMCrossStudioWindow activeProject="openbtl_olimex_lpc_l2294_20mhz" autoConnectTarget="SEGGER J-Link" debugSearchFileMap="" fileDialogInitialDirectory="C:\Work\software\OpenBLT\Target\Demo\ARM7_LPC2000_Olimex_LPC_L2294_Crossworks\Boot" fileDialogDefaultFilter="*.c" autoConnectCapabilities="388479" debugSearchPath="" buildConfiguration="ARM Flash Debug" />
</session>

View File

@ -155,5 +155,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -227,4 +227,64 @@ void CopServiceHook(void)
#endif /* BOOT_COP_HOOKS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -128,5 +128,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -213,4 +213,64 @@ void CopServiceHook(void)
#endif /* BOOT_COP_HOOKS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -51,7 +51,7 @@
<Watches active="0" update="Never" />
</Watch4>
<Files>
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks\Boot\main.c" y="71" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks\Boot\main.c" left="0" selected="1" name="unnamed" top="0" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks\Boot\main.c" y="71" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks\Boot\main.c" left="18" selected="1" name="unnamed" top="0" />
</Files>
<ARMCrossStudioWindow activeProject="openbtl_olimex_efm32g880" autoConnectTarget="SEGGER J-Link" debugSearchFileMap="" fileDialogInitialDirectory="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_EFM32_Olimex_EM32G880F128STK_Crossworks\Boot" fileDialogDefaultFilter="*.c" autoConnectCapabilities="388991" debugSearchPath="" buildConfiguration="THUMB Flash Debug" />
</session>

View File

@ -128,5 +128,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -213,4 +213,64 @@ void CopServiceHook(void)
#endif /* BOOT_COP_HOOKS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -128,5 +128,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -213,4 +213,64 @@ void CopServiceHook(void)
#endif /* BOOT_COP_HOOKS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -82,8 +82,9 @@
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_EFM32\cpu.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_EFM32\flash.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_EFM32\flash.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_EFM32\nvm.c</file>
<file>$PROJ_DIR$\..\obj\efm32_msc.o</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_EFM32\nvm.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_EFM32\nvm.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_EFM32\timer.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_EFM32\timer.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_EFM32\types.h</file>
@ -102,16 +103,16 @@
<file>$PROJ_DIR$\..\..\..\..\Source\plausibility.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\xcp.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\xcp.h</file>
<file>$PROJ_DIR$\..\obj\core_cm3.lst</file>
<file>$PROJ_DIR$\..\config.h</file>
<file>$PROJ_DIR$\..\obj\core_cm3.lst</file>
<file>$PROJ_DIR$\..\obj\core_cm3.o</file>
<file>$PROJ_DIR$\..\obj\main.pbi</file>
<file>$PROJ_DIR$\..\obj\timer.o</file>
<file>$PROJ_DIR$\..\obj\boot.lst</file>
<file>$PROJ_DIR$\..\obj\vectors.pbi</file>
<file>$PROJ_DIR$\..\obj\timer.pbi</file>
<file>$PROJ_DIR$\..\obj\system_efm32.pbi</file>
<file>$PROJ_DIR$\..\obj\timer.pbi</file>
<file>$PROJ_DIR$\..\obj\boot.lst</file>
<file>$PROJ_DIR$\..\obj\efm32G880.pbd</file>
<file>$PROJ_DIR$\..\obj\timer.o</file>
<file>$PROJ_DIR$\..\obj\main.pbi</file>
<file>$PROJ_DIR$\..\obj\boot.pbi</file>
<file>$PROJ_DIR$\..\obj\efm32_assert.lst</file>
<file>$PROJ_DIR$\..\obj\uart.pbi</file>
@ -126,7 +127,6 @@
<file>$PROJ_DIR$\..\obj\efm32_vcmp.pbi</file>
<file>$TOOLKIT_DIR$\inc\c\DLib_Config_Normal.h</file>
<file>$PROJ_DIR$\..\obj\efm32_mpu.o</file>
<file>$PROJ_DIR$\..\obj\efm32_msc.o</file>
<file>$PROJ_DIR$\..\obj\system_efm32.o</file>
<file>$TOOLKIT_DIR$\inc\c\ycheck.h</file>
<file>$PROJ_DIR$\..\obj\efm32_cmu.o</file>
@ -270,7 +270,7 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 96 98</file>
<file> 98 99</file>
</tool>
<tool>
<name>BICOMP</name>
@ -280,11 +280,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 125 122 213 236 118 229 216 214</file>
<file> 125 122 213 236 119 229 216 214</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 125 122 213 236 118 229 216 214</file>
<file> 125 122 213 236 119 229 216 214</file>
</tool>
</inputs>
</file>
@ -297,17 +297,17 @@
</tool>
<tool>
<name>BICOMP</name>
<file> 104</file>
<file> 101</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 125 122 213 236 118 229 216 214 0 5 3 4 181 180 1 7</file>
<file> 125 122 213 236 119 229 216 214 0 5 3 4 181 180 1 7</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 125 122 213 236 118 229 216 214 0 5 3 4 181 180 1 7</file>
<file> 125 122 213 236 119 229 216 214 0 5 3 4 181 180 1 7</file>
</tool>
</inputs>
</file>
@ -326,11 +326,7 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 255 9 125 122 213 236 118 229 216 214 0 5 3 4 181 180 1 7 16 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 255 9 125 122 213 236 118 229 216 214 0 5 3 4 181 180 1 7 16 15</file>
<file> 255 9 125 122 213 236 119 229 216 214 0 5 3 4 181 180 1 7 16 15</file>
</tool>
</inputs>
</file>
@ -349,7 +345,7 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 11 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 15</file>
<file> 11 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 15</file>
</tool>
</inputs>
</file>
@ -368,11 +364,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 13 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 15</file>
<file> 13 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 13 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 15</file>
<file> 13 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 15</file>
</tool>
</inputs>
</file>
@ -381,7 +377,7 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 107 211</file>
<file> 108 211</file>
</tool>
<tool>
<name>BICOMP</name>
@ -414,11 +410,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 255 16 15 29</file>
<file> 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 255 16 15 29</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 255 16 15 29</file>
<file> 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 255 16 15 29</file>
</tool>
</inputs>
</file>
@ -437,11 +433,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 21 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 15</file>
<file> 21 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 21 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 15</file>
<file> 21 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 15</file>
</tool>
</inputs>
</file>
@ -460,14 +456,23 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 15 23 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 31</file>
<file> 15 23 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 31</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 15 23 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 31</file>
<file> 15 23 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 31</file>
</tool>
</inputs>
</file>
<file>
<name>[ROOT_NODE]</name>
<outputs>
<tool>
<name>ILINK</name>
<file> 223 237</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\lib\efm32lib\src\efm32_dma.c</name>
<outputs>
@ -483,11 +488,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 25 182 122 213 236 118 229 216 214 184 183 255 0 5 3 125 4 181 180 1 7 19 16 15</file>
<file> 25 182 122 213 236 119 229 216 214 184 183 255 0 5 3 125 4 181 180 1 7 19 16 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 25 182 122 213 236 118 229 216 214 184 183 255 0 5 3 125 4 181 180 1 7 19 16 15</file>
<file> 25 182 122 213 236 119 229 216 214 184 183 255 0 5 3 125 4 181 180 1 7 19 16 15</file>
</tool>
</inputs>
</file>
@ -506,11 +511,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 27 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 15 255 16 219 184</file>
<file> 27 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 15 255 16 219 184</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 27 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 15 255 16 219 184</file>
<file> 27 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 15 255 16 219 184</file>
</tool>
</inputs>
</file>
@ -529,23 +534,14 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 29 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 16 19 15</file>
<file> 29 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 16 19 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 29 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 16 19 15</file>
<file> 29 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 16 19 15</file>
</tool>
</inputs>
</file>
<file>
<name>[ROOT_NODE]</name>
<outputs>
<tool>
<name>ILINK</name>
<file> 223 237</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\lib\efm32lib\src\efm32_gpio.c</name>
<outputs>
@ -561,11 +557,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 31 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 16 15</file>
<file> 31 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 16 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 31 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 16 15</file>
<file> 31 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 16 15</file>
</tool>
</inputs>
</file>
@ -584,11 +580,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 33 255 19 16 15</file>
<file> 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 33 255 19 16 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 33 255 19 16 15</file>
<file> 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 33 255 19 16 15</file>
</tool>
</inputs>
</file>
@ -607,11 +603,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 125 122 213 236 118 229 216 214 35 0 5 3 4 181 180 1 7</file>
<file> 125 122 213 236 119 229 216 214 35 0 5 3 4 181 180 1 7</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 125 122 213 236 118 229 216 214 35 0 5 3 4 181 180 1 7</file>
<file> 125 122 213 236 119 229 216 214 35 0 5 3 4 181 180 1 7</file>
</tool>
</inputs>
</file>
@ -630,11 +626,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 37 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 255 15 16</file>
<file> 37 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 255 15 16</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 37 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 255 15 16</file>
<file> 37 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 255 15 16</file>
</tool>
</inputs>
</file>
@ -653,11 +649,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 39 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7</file>
<file> 39 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 39 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7</file>
<file> 39 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7</file>
</tool>
</inputs>
</file>
@ -676,11 +672,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 41 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 15</file>
<file> 41 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 41 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 15</file>
<file> 41 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 15</file>
</tool>
</inputs>
</file>
@ -699,11 +695,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 43 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 15</file>
<file> 43 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 43 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 15</file>
<file> 43 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 15</file>
</tool>
</inputs>
</file>
@ -712,7 +708,7 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 225 119</file>
<file> 225 120</file>
</tool>
<tool>
<name>BICOMP</name>
@ -722,11 +718,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 45 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 15 255</file>
<file> 45 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 15 255</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 45 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 15 255</file>
<file> 45 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 15 255</file>
</tool>
</inputs>
</file>
@ -735,7 +731,7 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 220 120</file>
<file> 220 76</file>
</tool>
<tool>
<name>BICOMP</name>
@ -745,11 +741,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 47 125 122 213 236 118 229 216 214 255 0 5 3 4 181 180 1 7 16 15</file>
<file> 47 125 122 213 236 119 229 216 214 255 0 5 3 4 181 180 1 7 16 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 47 125 122 213 236 118 229 216 214 255 0 5 3 4 181 180 1 7 16 15</file>
<file> 47 125 122 213 236 119 229 216 214 255 0 5 3 4 181 180 1 7 16 15</file>
</tool>
</inputs>
</file>
@ -768,11 +764,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7</file>
<file> 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7</file>
<file> 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7</file>
</tool>
</inputs>
</file>
@ -791,11 +787,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 50 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 15</file>
<file> 50 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 50 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 15</file>
<file> 50 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 15</file>
</tool>
</inputs>
</file>
@ -814,11 +810,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 52 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 15 16</file>
<file> 52 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 15 16</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 52 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 15 16</file>
<file> 52 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 15 16</file>
</tool>
</inputs>
</file>
@ -831,17 +827,17 @@
</tool>
<tool>
<name>BICOMP</name>
<file> 112</file>
<file> 113</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 54 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 29 16</file>
<file> 54 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 29 16</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 54 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 29 16</file>
<file> 54 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 29 16</file>
</tool>
</inputs>
</file>
@ -854,13 +850,13 @@
</tool>
<tool>
<name>BICOMP</name>
<file> 113</file>
<file> 114</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 56 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 15 16</file>
<file> 56 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 15 16</file>
</tool>
</inputs>
</file>
@ -873,17 +869,17 @@
</tool>
<tool>
<name>BICOMP</name>
<file> 114</file>
<file> 115</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 58 255 15</file>
<file> 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 58 255 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 58 255 15</file>
<file> 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 58 255 15</file>
</tool>
</inputs>
</file>
@ -896,17 +892,17 @@
</tool>
<tool>
<name>BICOMP</name>
<file> 115</file>
<file> 116</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 15</file>
<file> 60 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 15</file>
<file> 60 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 15</file>
</tool>
</inputs>
</file>
@ -919,17 +915,17 @@
</tool>
<tool>
<name>BICOMP</name>
<file> 116</file>
<file> 117</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 62 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 15</file>
<file> 62 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 62 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 16 15</file>
<file> 62 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 16 15</file>
</tool>
</inputs>
</file>
@ -942,17 +938,17 @@
</tool>
<tool>
<name>BICOMP</name>
<file> 117</file>
<file> 118</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 15 64 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 255</file>
<file> 15 64 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 255</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 15 64 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 255</file>
<file> 15 64 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 255</file>
</tool>
</inputs>
</file>
@ -971,11 +967,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 66 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 16</file>
<file> 66 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 16</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 66 255 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 16</file>
<file> 66 255 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 16</file>
</tool>
</inputs>
</file>
@ -994,11 +990,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 88 80 84 67 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 88 80 84 97 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96</file>
</tool>
</inputs>
</file>
@ -1011,17 +1007,17 @@
</tool>
<tool>
<name>BICOMP</name>
<file> 99</file>
<file> 106</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 88 80 84 67 93 73 92 77 75 79 86 257 90 95 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 17 58 255 19 16 31 15</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 17 58 255 19 16 31 15</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 88 80 84 97 93 73 92 77 75 79 86 257 90 95 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 17 58 255 19 16 31 15</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 17 58 255 19 16 31 15</file>
</tool>
</inputs>
</file>
@ -1030,7 +1026,7 @@
<outputs>
<tool>
<name>AARM</name>
<file> 109</file>
<file> 110</file>
</tool>
</outputs>
</file>
@ -1039,21 +1035,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 111 110</file>
<file> 112 111</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 102</file>
<file> 100</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 88 80 84 67 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 88 80 84 97 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 97 94 73 93 77 75 80 87 257 91 96</file>
</tool>
</inputs>
</file>
@ -1072,11 +1068,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 88 80 84 67 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 88 80 84 97 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 97 94 73 93 77 75 80 87 257 91 96</file>
</tool>
</inputs>
</file>
@ -1095,11 +1091,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 88 80 84 67 93 73 92 77 75 79 86 257 90 95 47 125 122 213 236 118 229 216 214 255 0 5 3 4 181 180 1 7 16</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96 47 125 122 213 236 119 229 216 214 255 0 5 3 4 181 180 1 7 16</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 88 80 84 97 93 73 92 77 75 79 86 257 90 95 47 125 122 213 236 118 229 216 214 255 0 5 3 4 181 180 1 7 16</file>
<file> 89 81 85 97 94 73 93 77 75 80 87 257 91 96 47 125 122 213 236 119 229 216 214 255 0 5 3 4 181 180 1 7 16</file>
</tool>
</inputs>
</file>
@ -1118,11 +1114,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 88 80 84 67 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 88 80 84 97 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 97 94 73 93 77 75 80 87 257 91 96</file>
</tool>
</inputs>
</file>
@ -1131,21 +1127,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 128 100</file>
<file> 128 105</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 103</file>
<file> 102</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 88 80 84 67 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 88 80 84 97 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 97 94 73 93 77 75 80 87 257 91 96</file>
</tool>
</inputs>
</file>
@ -1158,17 +1154,17 @@
</tool>
<tool>
<name>BICOMP</name>
<file> 108</file>
<file> 109</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 88 80 84 67 93 73 92 77 75 79 86 257 90 95 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 255 16 31 15 43</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 255 16 31 15 43</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 88 80 84 97 93 73 92 77 75 79 86 257 90 95 0 5 3 125 122 213 236 118 229 216 214 4 181 180 1 7 19 255 16 31 15 43</file>
<file> 89 81 85 97 94 73 93 77 75 80 87 257 91 96 0 5 3 125 122 213 236 119 229 216 214 4 181 180 1 7 19 255 16 31 15 43</file>
</tool>
</inputs>
</file>
@ -1187,11 +1183,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 88 80 84 67 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 88 80 84 97 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 97 94 73 93 77 75 80 87 257 91 96</file>
</tool>
</inputs>
</file>
@ -1210,11 +1206,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 88 80 84 67 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 88 80 84 97 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 97 94 73 93 77 75 80 87 257 91 96</file>
</tool>
</inputs>
</file>
@ -1223,21 +1219,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 101 188</file>
<file> 103 188</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 106</file>
<file> 107</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 88 80 84 67 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 88 80 84 97 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 97 94 73 93 77 75 80 87 257 91 96</file>
</tool>
</inputs>
</file>
@ -1256,11 +1252,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 88 80 84 67 93 73 92 77 75 79 86 257 90 95 82</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96 83</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 88 80 84 97 93 73 92 77 75 79 86 257 90 95 82</file>
<file> 89 81 85 97 94 73 93 77 75 80 87 257 91 96 83</file>
</tool>
</inputs>
</file>
@ -1279,11 +1275,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 88 80 84 67 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 88 80 84 97 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 97 94 73 93 77 75 80 87 257 91 96</file>
</tool>
</inputs>
</file>
@ -1302,11 +1298,11 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 88 80 84 67 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 67 94 73 93 77 75 80 87 257 91 96</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 88 80 84 97 93 73 92 77 75 79 86 257 90 95</file>
<file> 89 81 85 97 94 73 93 77 75 80 87 257 91 96</file>
</tool>
</inputs>
</file>
@ -1325,7 +1321,7 @@
<inputs>
<tool>
<name>ILINK</name>
<file> 218 131 194 188 189 193 98 201 109 167 169 168 211 123 227 228 147 148 149 150 173 172 171 170 165 166 119 120 145 146 179 177 178 175 174 176 144 126 202 132 187 200 121 100 203 110 191 186 143 129 142</file>
<file> 218 131 194 188 189 193 99 201 110 167 169 168 211 123 227 228 147 148 149 150 173 172 171 170 165 166 120 76 145 146 179 177 178 175 174 176 144 126 202 132 187 200 121 105 203 111 191 186 143 129 142</file>
</tool>
</inputs>
</file>

View File

@ -29,7 +29,7 @@
<Windows>
<Wnd2>
<Wnd0>
<Tabs>
<Tab>
<Identity>TabID-3636-6432</Identity>
@ -41,7 +41,7 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd2><Wnd3>
<SelectedTab>0</SelectedTab></Wnd0><Wnd1>
<Tabs>
<Tab>
<Identity>TabID-28813-8212</Identity>
@ -57,20 +57,20 @@
</Tab>
<Tab><Identity>TabID-20200-19078</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs>
<SelectedTab>0</SelectedTab></Wnd3></Windows>
<SelectedTab>0</SelectedTab></Wnd1></Windows>
<Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>36</YPos2><SelStart2>3106</SelStart2><SelEnd2>3106</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\ARMCM3_EFM32\timer.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\ARMCM3_EFM32\timer.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\blt_conf.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>66</YPos2><SelStart2>3395</SelStart2><SelEnd2>3395</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>36</YPos2><SelStart2>3106</SelStart2><SelEnd2>3106</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\ARMCM3_EFM32\timer.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\ARMCM3_EFM32\timer.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\blt_conf.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>112</YPos2><SelStart2>9249</SelStart2><SelEnd2>9249</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-015ebe30><key>iaridepm.enu1</key></Toolbar-015ebe30></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>723</Bottom><Right>442</Right><x>-2</x><y>-2</y><xscreen>240</xscreen><yscreen>242</yscreen><sizeHorzCX>125000</sizeHorzCX><sizeHorzCY>240079</sizeHorzCY><sizeVertCX>231250</sizeVertCX><sizeVertCY>719246</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>240</Bottom><Right>1922</Right><x>-2</x><y>-2</y><xscreen>1924</xscreen><yscreen>242</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>240079</sizeHorzCY><sizeVertCX>125000</sizeVertCX><sizeVertCY>240079</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-02b9cb28><key>iaridepm.enu1</key></Toolbar-02b9cb28></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>723</Bottom><Right>442</Right><x>-2</x><y>-2</y><xscreen>240</xscreen><yscreen>242</yscreen><sizeHorzCX>125000</sizeHorzCX><sizeHorzCY>240079</sizeHorzCY><sizeVertCX>231250</sizeVertCX><sizeVertCY>719246</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>240</Bottom><Right>1922</Right><x>-2</x><y>-2</y><xscreen>1924</xscreen><yscreen>242</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>240079</sizeHorzCY><sizeVertCX>125000</sizeVertCX><sizeVertCY>240079</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

View File

@ -240,5 +240,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -465,4 +465,63 @@ void FileFirmwareUpdateLogHook(blt_char *info_string)
#endif /* BOOT_FILE_SYS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -51,7 +51,7 @@
<Watches active="0" update="Never" />
</Watch4>
<Files>
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_LM3S_EK_LM3S6965_Crossworks\Boot\main.c" y="82" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_LM3S_EK_LM3S6965_Crossworks\Boot\main.c" left="0" selected="1" name="unnamed" top="82" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_LM3S_EK_LM3S6965_Crossworks\Boot\main.c" y="82" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_LM3S_EK_LM3S6965_Crossworks\Boot\main.c" left="18" selected="1" name="unnamed" top="82" />
</Files>
<ARMCrossStudioWindow activeProject="openbtl_ek_lm3s6965" autoConnectTarget="Luminary USB Debug" debugSearchFileMap="" fileDialogInitialDirectory="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_LM3S_EK_LM3S6965_Crossworks\Boot\lib\uip" fileDialogDefaultFilter="*.c" autoConnectCapabilities="388991" debugSearchPath="" buildConfiguration="THUMB Debug" />
</session>

View File

@ -240,5 +240,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -465,4 +465,63 @@ void FileFirmwareUpdateLogHook(blt_char *info_string)
#endif /* BOOT_FILE_SYS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -240,5 +240,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -465,4 +465,63 @@ void FileFirmwareUpdateLogHook(blt_char *info_string)
#endif /* BOOT_FILE_SYS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,7 @@
<Build><PreferedWindows><Position>1</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Find-All-References</Factory></Window></Windows></PreferedWindows><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1155</ColumnWidth1><ColumnWidth2>308</ColumnWidth2><ColumnWidth3>77</ColumnWidth3></Build><Find-in-Files><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><ColumnWidth0>552</ColumnWidth0><ColumnWidth1>78</ColumnWidth1><ColumnWidth2>946</ColumnWidth2></Find-in-Files><TerminalIO/><PROJECT_GUI_CALL_GRAPH><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><col-names><item>File</item><item>Function</item><item>Line</item></col-names><col-widths><item>200</item><item>700</item><item>100</item></col-widths></PROJECT_GUI_CALL_GRAPH><Select-Ambiguous-Definitions><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Build</Factory></Window><Window><Factory>Find-in-Files</Factory></Window><Window><Factory>Find-All-References</Factory></Window></Windows></PreferedWindows><ColumnWidth0>664</ColumnWidth0><ColumnWidth1>94</ColumnWidth1><ColumnWidth2>1138</ColumnWidth2></Select-Ambiguous-Definitions><Find-All-References><PreferedWindows><Position>1</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Build</Factory></Window></Windows></PreferedWindows><ColumnWidth0>664</ColumnWidth0><ColumnWidth1>94</ColumnWidth1><ColumnWidth2>1138</ColumnWidth2></Find-All-References></Static>
<Windows>
<Wnd1>
<Wnd0>
<Tabs>
<Tab>
<Identity>TabID-31649-22318</Identity>
@ -29,7 +29,7 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd1><Wnd2><Tabs><Tab><Identity>TabID-23631-11730</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-25094-12726</Identity><TabName>Ambiguous Definitions</TabName><Factory>Select-Ambiguous-Definitions</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd2></Windows>
<SelectedTab>0</SelectedTab></Wnd0><Wnd3><Tabs><Tab><Identity>TabID-23631-11730</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-25094-12726</Identity><TabName>Ambiguous Definitions</TabName><Factory>Select-Ambiguous-Definitions</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd3></Windows>
<Editor>
@ -42,7 +42,7 @@
<Top><Row0><Sizes><Toolbar-02abba70><key>iaridepm.enu1</key></Toolbar-02abba70></Sizes></Row0></Top><Left><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>563</Bottom><Right>326</Right><x>-2</x><y>-2</y><xscreen>372</xscreen><yscreen>353</yscreen><sizeHorzCX>193750</sizeHorzCX><sizeHorzCY>350198</sizeHorzCY><sizeVertCX>170833</sizeVertCX><sizeVertCY>560516</sizeVertCY></Rect></Wnd1><Wnd2><Rect><Top>0</Top><Left>0</Left><Bottom>49352264</Bottom><Right>49352264</Right><x>-2</x><y>561</y><xscreen>258</xscreen><yscreen>237</yscreen><sizeHorzCX>134375</sizeHorzCX><sizeHorzCY>235119</sizeHorzCY><sizeVertCX>170833</sizeVertCX><sizeVertCY>398810</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes/></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-02b2ba70><key>iaridepm.enu1</key></Toolbar-02b2ba70></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>563</Bottom><Right>326</Right><x>-2</x><y>-2</y><xscreen>372</xscreen><yscreen>353</yscreen><sizeHorzCX>193750</sizeHorzCX><sizeHorzCY>350198</sizeHorzCY><sizeVertCX>170833</sizeVertCX><sizeVertCY>560516</sizeVertCY></Rect></Wnd0><Wnd3><Rect><Top>0</Top><Left>0</Left><Bottom>49355872</Bottom><Right>49355872</Right><x>-2</x><y>561</y><xscreen>258</xscreen><yscreen>237</yscreen><sizeHorzCX>134375</sizeHorzCX><sizeHorzCY>235119</sizeHorzCY><sizeVertCX>170833</sizeVertCX><sizeVertCY>398810</sizeVertCY></Rect></Wnd3></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes/></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

View File

@ -155,5 +155,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -213,4 +213,64 @@ void CopServiceHook(void)
#endif /* BOOT_COP_HOOKS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -19,8 +19,6 @@
<ProjectSessionItem path="lm3s8962_crossworks" name="unnamed" />
<ProjectSessionItem path="lm3s8962_crossworks;openbtl_ek_lm3s8962" name="unnamed" />
<ProjectSessionItem path="lm3s8962_crossworks;openbtl_ek_lm3s8962;Source Files" name="unnamed" />
<ProjectSessionItem path="lm3s8962_crossworks;openbtl_ek_lm3s8962;Source Files;Demo" name="unnamed" />
<ProjectSessionItem path="lm3s8962_crossworks;openbtl_ek_lm3s8962;Source Files;Demo;Boot" name="unnamed" />
<ProjectSessionItem path="lm3s8962_crossworks;openbtl_ek_lm3s8962;Source Files;Source" name="unnamed" />
</Project>
<Register1>
@ -52,9 +50,9 @@
<Watches active="0" update="Never" />
</Watch4>
<Files>
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_LM3S_EK_LM3S8962_Crossworks\Boot\main.c" y="7" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_LM3S_EK_LM3S8962_Crossworks\Boot\main.c" left="0" selected="0" name="unnamed" top="0" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_LM3S_EK_LM3S8962_Crossworks\Boot\blt_conf.h" y="51" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_LM3S_EK_LM3S8962_Crossworks\Boot\blt_conf.h" left="0" selected="0" name="unnamed" top="51" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Source\backdoor.c" y="26" path="C:\Work\software\OpenBLT\Target\Source\backdoor.c" left="0" selected="1" name="unnamed" top="24" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_LM3S_EK_LM3S8962_Crossworks\Boot\main.c" y="7" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_LM3S_EK_LM3S8962_Crossworks\Boot\main.c" left="18" selected="0" name="unnamed" top="0" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_LM3S_EK_LM3S8962_Crossworks\Boot\blt_conf.h" y="51" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_LM3S_EK_LM3S8962_Crossworks\Boot\blt_conf.h" left="18" selected="0" name="unnamed" top="51" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Source\backdoor.c" y="26" path="C:\Work\software\OpenBLT\Target\Source\backdoor.c" left="18" selected="1" name="unnamed" top="24" />
</Files>
<ARMCrossStudioWindow activeProject="openbtl_ek_lm3s8962" autoConnectTarget="Luminary USB Debug" debugSearchFileMap="" fileDialogInitialDirectory="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_LM3S_EK_LM3S8962_Crossworks\Boot" fileDialogDefaultFilter="*.c" autoConnectCapabilities="388991" debugSearchPath="" buildConfiguration="THUMB Debug" />
</session>

View File

@ -155,5 +155,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -213,4 +213,64 @@ void CopServiceHook(void)
#endif /* BOOT_COP_HOOKS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -155,5 +155,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -213,4 +213,64 @@ void CopServiceHook(void)
#endif /* BOOT_COP_HOOKS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -7,16 +7,82 @@
<name>Debug</name>
<outputs>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\nvm.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\timer.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\assert.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\timer.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\types.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\uart.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\uart.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\assert.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\backdoor.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\backdoor.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\boot.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\boot.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\com.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\com.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\cop.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\cop.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\plausibility.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\xcp.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\xcp.h</file>
<file>$PROJ_DIR$\..\obj\uartlib.lst</file>
<file>$PROJ_DIR$\..\obj\cpulib.o</file>
<file>$PROJ_DIR$\..\obj\flashlib.o</file>
<file>$PROJ_DIR$\..\obj\flashlib.pbi</file>
<file>$PROJ_DIR$\..\obj\gpio.pbi</file>
<file>$PROJ_DIR$\..\obj\cpulib.pbi</file>
<file>$PROJ_DIR$\..\obj\uartlib.o</file>
<file>$PROJ_DIR$\..\obj\sysctl.o</file>
<file>$PROJ_DIR$\..\obj\interrupt.o</file>
<file>$PROJ_DIR$\..\obj\gpio.o</file>
<file>$PROJ_DIR$\..\obj\uartlib.pbi</file>
<file>$PROJ_DIR$\..\obj\uart.o</file>
<file>$PROJ_DIR$\..\obj\flash.pbi</file>
<file>$PROJ_DIR$\..\obj\cpu.pbi</file>
<file>$PROJ_DIR$\..\obj\nvm.pbi</file>
<file>$PROJ_DIR$\..\obj\uart.pbi</file>
<file>$PROJ_DIR$\..\obj\lm3s6965.pbd</file>
<file>$PROJ_DIR$\..\obj\cstart.o</file>
<file>$PROJ_DIR$\..\obj\vectors.o</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\memory.x</file>
<file>$PROJ_DIR$\..\obj\timer.o</file>
<file>$PROJ_DIR$\..\obj\boot.lst</file>
<file>$PROJ_DIR$\..\obj\main.lst</file>
<file>$PROJ_DIR$\..\obj\vectors.lst</file>
<file>$PROJ_DIR$\..\obj\vectors.pbi</file>
<file>$PROJ_DIR$\..\obj\timer.pbi</file>
<file>$PROJ_DIR$\..\obj\main.pbi</file>
<file>$PROJ_DIR$\..\obj\boot.pbi</file>
<file>$TOOLKIT_DIR$\lib\m7M_tl.a</file>
<file>$PROJ_DIR$\..\bin\openbtl_ek_lm3s6965.srec</file>
<file>$PROJ_DIR$\..\bin\openbtl_ek_lm3s6965.out</file>
<file>$PROJ_DIR$\..\obj\hooks.lst</file>
<file>$PROJ_DIR$\..\obj\assert.o</file>
<file>$PROJ_DIR$\..\obj\assert.lst</file>
<file>$PROJ_DIR$\..\obj\flash.lst</file>
<file>$TOOLKIT_DIR$\lib\shb_l.a</file>
<file>$PROJ_DIR$\..\obj\main.o</file>
<file>$PROJ_DIR$\..\obj\backdoor.lst</file>
<file>$PROJ_DIR$\..\obj\hooks.pbi</file>
<file>$PROJ_DIR$\..\obj\boot.o</file>
<file>$PROJ_DIR$\..\obj\com.o</file>
<file>$PROJ_DIR$\..\obj\hooks.o</file>
<file>$PROJ_DIR$\..\obj\cpu.lst</file>
<file>$PROJ_DIR$\..\obj\uart.lst</file>
<file>$PROJ_DIR$\..\obj\cop.lst</file>
<file>$PROJ_DIR$\..\obj\com.lst</file>
<file>$TOOLKIT_DIR$\lib\dl7M_tln.a</file>
<file>$TOOLKIT_DIR$\lib\rt7M_tl.a</file>
<file>$PROJ_DIR$\..\obj\canlib.pbi</file>
<file>$PROJ_DIR$\..\obj\can.o</file>
<file>$PROJ_DIR$\..\obj\canlib.o</file>
<file>$PROJ_DIR$\..\obj\lm3s8962.pbd</file>
<file>$PROJ_DIR$\..\obj\can.pbi</file>
<file>$PROJ_DIR$\..\obj\canlib.lst</file>
<file>$PROJ_DIR$\..\obj\can.lst</file>
<file>$PROJ_DIR$\..\obj\openbtl_ek_lm3s8962.map</file>
<file>$PROJ_DIR$\..\bin\openbtl_ek_lm3s8962.srec</file>
<file>$PROJ_DIR$\..\bin\openbtl_ek_lm3s8962.out</file>
<file>$PROJ_DIR$\..\bin\openbtl_ek_lm3s8962.srec</file>
<file>$PROJ_DIR$\..\obj\can.lst</file>
<file>$PROJ_DIR$\..\obj\canlib.lst</file>
<file>$PROJ_DIR$\..\obj\can.pbi</file>
<file>$PROJ_DIR$\..\obj\lm3s8962.pbd</file>
<file>$PROJ_DIR$\..\..\..\..\Source\file.h</file>
<file>$PROJ_DIR$\..\obj\interrupt.pbi</file>
<file>$PROJ_DIR$\..\obj\sysctl.pbi</file>
@ -38,72 +104,6 @@
<file>$PROJ_DIR$\..\obj\flashlib.lst</file>
<file>$PROJ_DIR$\..\obj\interrupt.lst</file>
<file>$PROJ_DIR$\..\obj\sysctl.lst</file>
<file>$PROJ_DIR$\..\obj\uartlib.lst</file>
<file>$PROJ_DIR$\..\obj\cpulib.o</file>
<file>$PROJ_DIR$\..\obj\flashlib.o</file>
<file>$PROJ_DIR$\..\obj\gpio.o</file>
<file>$PROJ_DIR$\..\obj\interrupt.o</file>
<file>$PROJ_DIR$\..\obj\sysctl.o</file>
<file>$PROJ_DIR$\..\obj\uartlib.o</file>
<file>$PROJ_DIR$\..\obj\flashlib.pbi</file>
<file>$PROJ_DIR$\..\obj\cpulib.pbi</file>
<file>$PROJ_DIR$\..\obj\gpio.pbi</file>
<file>$PROJ_DIR$\..\obj\uartlib.pbi</file>
<file>$PROJ_DIR$\..\obj\uart.o</file>
<file>$PROJ_DIR$\..\obj\flash.pbi</file>
<file>$PROJ_DIR$\..\obj\cpu.pbi</file>
<file>$PROJ_DIR$\..\obj\nvm.pbi</file>
<file>$PROJ_DIR$\..\obj\uart.pbi</file>
<file>$PROJ_DIR$\..\obj\lm3s6965.pbd</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\memory.x</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\timer.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\assert.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\timer.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\types.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\uart.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\uart.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\assert.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\backdoor.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\backdoor.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\boot.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\boot.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\com.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\com.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\cop.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\cop.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\plausibility.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\xcp.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\xcp.h</file>
<file>$PROJ_DIR$\..\obj\cstart.o</file>
<file>$PROJ_DIR$\..\obj\vectors.o</file>
<file>$PROJ_DIR$\..\obj\timer.o</file>
<file>$PROJ_DIR$\..\obj\boot.lst</file>
<file>$PROJ_DIR$\..\obj\main.lst</file>
<file>$PROJ_DIR$\..\obj\vectors.lst</file>
<file>$PROJ_DIR$\..\obj\vectors.pbi</file>
<file>$PROJ_DIR$\..\obj\timer.pbi</file>
<file>$PROJ_DIR$\..\obj\main.pbi</file>
<file>$PROJ_DIR$\..\obj\boot.pbi</file>
<file>$PROJ_DIR$\..\obj\timer.lst</file>
<file>$TOOLKIT_DIR$\lib\m7M_tl.a</file>
<file>$PROJ_DIR$\..\bin\openbtl_ek_lm3s6965.srec</file>
<file>$PROJ_DIR$\..\bin\openbtl_ek_lm3s6965.out</file>
<file>$PROJ_DIR$\..\obj\hooks.lst</file>
<file>$PROJ_DIR$\..\obj\assert.o</file>
<file>$PROJ_DIR$\..\obj\assert.lst</file>
<file>$PROJ_DIR$\..\obj\flash.lst</file>
<file>$TOOLKIT_DIR$\lib\shb_l.a</file>
<file>$PROJ_DIR$\..\obj\main.o</file>
<file>$PROJ_DIR$\..\obj\backdoor.lst</file>
<file>$PROJ_DIR$\..\obj\hooks.pbi</file>
<file>$PROJ_DIR$\..\obj\boot.o</file>
<file>$PROJ_DIR$\..\obj\com.o</file>
<file>$PROJ_DIR$\..\obj\hooks.o</file>
<file>$PROJ_DIR$\..\obj\cpu.lst</file>
<file>$PROJ_DIR$\..\obj\uart.lst</file>
<file>$PROJ_DIR$\..\obj\cop.lst</file>
<file>$PROJ_DIR$\..\obj\com.lst</file>
<file>$TOOLKIT_DIR$\lib\dl7M_tln.a</file>
<file>$PROJ_DIR$\..\lib\driverlib\cpulib.c</file>
<file>$PROJ_DIR$\..\lib\driverlib\debug.h</file>
<file>$PROJ_DIR$\..\lib\driverlib\canlib.h</file>
@ -133,7 +133,7 @@
<file>$PROJ_DIR$\..\main.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\vectors.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\cstart.s</file>
<file>$TOOLKIT_DIR$\lib\rt7M_tl.a</file>
<file>$PROJ_DIR$\..\obj\timer.lst</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\can.c</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\can.h</file>
<file>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\cpu.c</file>
@ -147,58 +147,30 @@
<outputs>
<tool>
<name>ILINK</name>
<file> 10 8</file>
<file> 71 70</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\bin\openbtl_ek_lm3s8962.out</name>
<outputs>
<tool>
<name>ILINK</name>
<file> 8</file>
</tool>
<tool>
<name>OBJCOPY</name>
<file> 9</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ILINK</name>
<file> 49 83 18 90 2 3 91 17 25 33 68 26 34 35 92 36 87 24 37 70 43 38 69 21 86 127 79 97</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\obj\lm3s6965.pbd</name>
<inputs>
<tool>
<name>BILINK</name>
<file> 15 16 77 14 19 45 40 44 39 41 89 12 76 46 13 75 47 42 74 20</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\timer.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 78 70</file>
<file> 127 39</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 75</file>
<file> 44</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
</inputs>
</file>
@ -207,21 +179,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 84 83</file>
<file> 52 51</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 15</file>
<file> 81</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
</inputs>
</file>
@ -230,21 +202,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 94 43</file>
<file> 62 30</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 47</file>
<file> 34</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67 117 120 110 112</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18 117 120 110 112</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67 117 120 110 112</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18 117 120 110 112</file>
</tool>
</inputs>
</file>
@ -253,21 +225,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 88 18</file>
<file> 56 84</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 16</file>
<file> 82</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
</inputs>
</file>
@ -276,21 +248,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 71 90</file>
<file> 40 58</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 77</file>
<file> 46</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
</inputs>
</file>
@ -299,21 +271,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 96 91</file>
<file> 64 59</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 14</file>
<file> 80</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67 129 55</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18 129 6</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67 129 55</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18 129 6</file>
</tool>
</inputs>
</file>
@ -322,21 +294,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 95 17</file>
<file> 63 83</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 19</file>
<file> 85</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
</inputs>
</file>
@ -345,21 +317,30 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 22 21</file>
<file> 88 87</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 20</file>
<file> 86</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\obj\lm3s6965.pbd</name>
<inputs>
<tool>
<name>BILINK</name>
<file> 81 82 46 80 85 32 24 31 22 23 57 78 45 33 79 44 34 29 43 86</file>
</tool>
</inputs>
</file>
@ -368,13 +349,32 @@
<outputs>
<tool>
<name>OBJCOPY</name>
<file> 80</file>
<file> 48</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ILINK</name>
<file> 49 83 18 90 91 17 25 33 68 26 34 35 92 36 87 24 37 70 43 38 69 21 86 127 79 97</file>
<file> 38 51 84 58 59 83 91 20 36 92 21 28 60 27 55 90 26 39 30 25 37 87 54 66 47 65</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\bin\openbtl_ek_lm3s8962.out</name>
<outputs>
<tool>
<name>ILINK</name>
<file> 70</file>
</tool>
<tool>
<name>OBJCOPY</name>
<file> 72</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ILINK</name>
<file> 38 51 84 58 68 69 59 83 91 20 36 92 21 28 60 27 55 90 26 39 30 25 37 87 54 66 47 65</file>
</tool>
</inputs>
</file>
@ -383,11 +383,11 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 28 33</file>
<file> 94 20</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 40</file>
<file> 24</file>
</tool>
</outputs>
<inputs>
@ -406,21 +406,17 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 6 3</file>
<file> 74 69</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 1</file>
<file> 67</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 113 116 118 117 120 100 99 60 53 56 122 65 131 64 0 133 52 58 11 62 67 108</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 113 116 118 117 120 100 99 60 53 56 122 65 131 64 0 133 52 58 11 62 67 108</file>
<file> 113 116 118 117 120 100 99 11 4 7 122 16 131 15 0 133 3 9 77 13 18 108</file>
</tool>
</inputs>
</file>
@ -429,21 +425,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 29 34</file>
<file> 95 21</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 39</file>
<file> 22</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 114 116 119 120 99 60 53 56 122 65 131 64 0 133 52 58 11 62 67 104 108</file>
<file> 114 116 119 120 99 11 4 7 122 16 131 15 0 133 3 9 77 13 18 104 108</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 114 116 119 120 99 60 53 56 122 65 131 64 0 133 52 58 11 62 67 104 108</file>
<file> 114 116 119 120 99 11 4 7 122 16 131 15 0 133 3 9 77 13 18 104 108</file>
</tool>
</inputs>
</file>
@ -452,21 +448,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 27 35</file>
<file> 93 28</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 41</file>
<file> 23</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 115 116 117 119 120 99 60 53 56 122 65 131 64 0 133 52 58 11 62 67 106 108</file>
<file> 115 116 117 119 120 99 11 4 7 122 16 131 15 0 133 3 9 77 13 18 106 108</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 115 116 117 119 120 99 60 53 56 122 65 131 64 0 133 52 58 11 62 67 106 108</file>
<file> 115 116 117 119 120 99 11 4 7 122 16 131 15 0 133 3 9 77 13 18 106 108</file>
</tool>
</inputs>
</file>
@ -475,21 +471,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 30 36</file>
<file> 96 27</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 12</file>
<file> 78</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 116 118 120 102 99 60 53 56 122 65 131 64 0 133 52 58 11 62 67 108</file>
<file> 116 118 120 102 99 11 4 7 122 16 131 15 0 133 3 9 77 13 18 108</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 116 118 120 102 99 60 53 56 122 65 131 64 0 133 52 58 11 62 67 108</file>
<file> 116 118 120 102 99 11 4 7 122 16 131 15 0 133 3 9 77 13 18 108</file>
</tool>
</inputs>
</file>
@ -498,21 +494,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 31 37</file>
<file> 97 26</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 13</file>
<file> 79</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 116 118 119 120 102 99 60 53 56 122 65 131 64 0 133 52 58 11 62 67 108 110</file>
<file> 116 118 119 120 102 99 11 4 7 122 16 131 15 0 133 3 9 77 13 18 108 110</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 116 118 119 120 102 99 60 53 56 122 65 131 64 0 133 52 58 11 62 67 108 110</file>
<file> 116 118 119 120 102 99 11 4 7 122 16 131 15 0 133 3 9 77 13 18 108 110</file>
</tool>
</inputs>
</file>
@ -521,21 +517,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 32 38</file>
<file> 19 25</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 42</file>
<file> 29</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 116 117 119 120 121 99 60 53 56 122 65 131 64 0 133 52 58 11 62 67 108 112 110</file>
<file> 116 117 119 120 121 99 11 4 7 122 16 131 15 0 133 3 9 77 13 18 108 112 110</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 116 117 119 120 121 99 60 53 56 122 65 131 64 0 133 52 58 11 62 67 108 112 110</file>
<file> 116 117 119 120 121 99 11 4 7 122 16 131 15 0 133 3 9 77 13 18 108 112 110</file>
</tool>
</inputs>
</file>
@ -544,21 +540,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 82 92</file>
<file> 50 60</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 89</file>
<file> 57</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
</inputs>
</file>
@ -567,85 +563,7 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 72 87</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 76</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67 116 117 118 119 120 110 106</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67 116 117 118 119 120 110 106</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\vectors.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 73 69</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 74</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\cstart.s</name>
<outputs>
<tool>
<name>AARM</name>
<file> 68</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\can.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 7 2</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 5</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67 117 120 110 100</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67 117 120 110 100</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\cpu.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 93 25</file>
<file> 41 55</file>
</tool>
<tool>
<name>BICOMP</name>
@ -655,11 +573,89 @@
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18 116 117 118 119 120 110 106</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18 116 117 118 119 120 110 106</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\vectors.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 42 37</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 43</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\cstart.s</name>
<outputs>
<tool>
<name>AARM</name>
<file> 36</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\can.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 73 68</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 75</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18 117 120 110 100</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18 117 120 110 100</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\..\..\Source\ARMCM3_LM3S\cpu.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 61 91</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 32</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
</inputs>
</file>
@ -668,21 +664,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 85 26</file>
<file> 53 92</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 44</file>
<file> 31</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67 117 120 104</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18 117 120 104</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67 117 120 104</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18 117 120 104</file>
</tool>
</inputs>
</file>
@ -691,21 +687,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 23 24</file>
<file> 89 90</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 46</file>
<file> 33</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 60 53 56 122 65 131 64 0 133 52 58 11 62 67</file>
<file> 11 4 7 122 16 131 15 0 133 3 9 77 13 18</file>
</tool>
</inputs>
</file>

View File

@ -39,7 +39,7 @@
<Wnd0>
<Wnd3>
<Tabs>
<Tab>
<Identity>TabID-23054-22949</Identity>
@ -55,7 +55,7 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd0><Wnd1>
<SelectedTab>0</SelectedTab></Wnd3><Wnd4>
<Tabs>
<Tab>
<Identity>TabID-1035-22952</Identity>
@ -67,7 +67,7 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd1><Wnd2>
<SelectedTab>0</SelectedTab></Wnd4><Wnd5>
<Tabs>
<Tab>
<Identity>TabID-11783-22956</Identity>
@ -77,20 +77,20 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd2></Windows>
<SelectedTab>0</SelectedTab></Wnd5></Windows>
<Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>45</YPos2><SelStart2>2964</SelStart2><SelEnd2>2964</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\com.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>105</YPos2><SelStart2>5987</SelStart2><SelEnd2>5987</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\com.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>50</YPos2><SelStart2>3548</SelStart2><SelEnd2>3548</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\assert.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>27</YPos2><SelStart2>2426</SelStart2><SelEnd2>2426</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\cstart.s</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>30</YPos2><SelStart2>2499</SelStart2><SelEnd2>2499</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\blt_conf.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>105</YPos2><SelStart2>9282</SelStart2><SelEnd2>9282</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\ARMCM3_LM3S\flash.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>610</YPos2><SelStart2>28371</SelStart2><SelEnd2>28371</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\backdoor.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>18</YPos2><SelStart2>3292</SelStart2><SelEnd2>3292</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\boot.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>18</YPos2><SelStart2>2628</SelStart2><SelEnd2>2636</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>45</YPos2><SelStart2>2964</SelStart2><SelEnd2>2964</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\com.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>97</YPos2><SelStart2>5987</SelStart2><SelEnd2>5987</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\com.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>50</YPos2><SelStart2>3548</SelStart2><SelEnd2>3548</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\assert.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>27</YPos2><SelStart2>2426</SelStart2><SelEnd2>2426</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\cstart.s</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>25</YPos2><SelStart2>2499</SelStart2><SelEnd2>2499</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\blt_conf.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>105</YPos2><SelStart2>9282</SelStart2><SelEnd2>9282</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\ARMCM3_LM3S\flash.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>610</YPos2><SelStart2>28371</SelStart2><SelEnd2>28371</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\backdoor.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>18</YPos2><SelStart2>3292</SelStart2><SelEnd2>3292</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\boot.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>18</YPos2><SelStart2>2628</SelStart2><SelEnd2>2636</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-02a5ba70><key>iaridepm.enu1</key></Toolbar-02a5ba70></Sizes></Row0><Row1><Sizes><Toolbar-035fe188><key>debuggergui.enu1</key></Toolbar-035fe188></Sizes></Row1><Row2><Sizes/></Row2></Top><Left><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>698</Bottom><Right>238</Right><x>-2</x><y>-2</y><xscreen>240</xscreen><yscreen>243</yscreen><sizeHorzCX>125000</sizeHorzCX><sizeHorzCY>241071</sizeHorzCY><sizeVertCX>125000</sizeVertCX><sizeVertCY>694444</sizeVertCY></Rect></Wnd1></Sizes></Row0></Left><Right><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>698</Bottom><Right>238</Right><x>-2</x><y>-2</y><xscreen>240</xscreen><yscreen>243</yscreen><sizeHorzCX>125000</sizeHorzCX><sizeHorzCY>241071</sizeHorzCY><sizeVertCX>125000</sizeVertCX><sizeVertCY>694444</sizeVertCY></Rect></Wnd2></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>241</Bottom><Right>1922</Right><x>-2</x><y>-2</y><xscreen>1924</xscreen><yscreen>243</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>241071</sizeHorzCY><sizeVertCX>125000</sizeVertCX><sizeVertCY>241071</sizeVertCY></Rect></Wnd0></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-0296ba70><key>iaridepm.enu1</key></Toolbar-0296ba70></Sizes></Row0><Row1><Sizes><Toolbar-0c8efed8><key>debuggergui.enu1</key></Toolbar-0c8efed8></Sizes></Row1></Top><Left><Row0><Sizes><Wnd4><Rect><Top>-2</Top><Left>-2</Left><Bottom>698</Bottom><Right>238</Right><x>-2</x><y>-2</y><xscreen>240</xscreen><yscreen>243</yscreen><sizeHorzCX>125000</sizeHorzCX><sizeHorzCY>241071</sizeHorzCY><sizeVertCX>125000</sizeVertCX><sizeVertCY>694444</sizeVertCY></Rect></Wnd4></Sizes></Row0></Left><Right><Row0><Sizes><Wnd5><Rect><Top>-2</Top><Left>-2</Left><Bottom>698</Bottom><Right>238</Right><x>-2</x><y>-2</y><xscreen>240</xscreen><yscreen>243</yscreen><sizeHorzCX>125000</sizeHorzCX><sizeHorzCY>241071</sizeHorzCY><sizeVertCX>125000</sizeVertCX><sizeVertCY>694444</sizeVertCY></Rect></Wnd5></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>241</Bottom><Right>1922</Right><x>-2</x><y>-2</y><xscreen>1924</xscreen><yscreen>243</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>241071</sizeHorzCY><sizeVertCX>125000</sizeVertCX><sizeVertCY>241071</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Project>

View File

@ -9,7 +9,7 @@ TriggerName=main
LimitSize=0
ByteLimit=50
[DebugChecksum]
Checksum=-1720845113
Checksum=-969169161
[Exceptions]
StopOnUncaught=_ 0
StopOnThrow=_ 0

View File

@ -25,7 +25,7 @@
<Windows>
<Wnd0>
<Wnd2>
<Tabs>
<Tab>
<Identity>TabID-17931-22022</Identity>
@ -37,7 +37,7 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd0><Wnd1>
<SelectedTab>0</SelectedTab></Wnd2><Wnd3>
<Tabs>
<Tab>
<Identity>TabID-24560-22511</Identity>
@ -47,20 +47,20 @@
</Tab>
<Tab><Identity>TabID-23843-13527</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs>
<SelectedTab>0</SelectedTab></Wnd1></Windows>
<SelectedTab>0</SelectedTab></Wnd3></Windows>
<Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>45</YPos2><SelStart2>2964</SelStart2><SelEnd2>2964</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\com.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>105</YPos2><SelStart2>5987</SelStart2><SelEnd2>5987</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\com.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>50</YPos2><SelStart2>3548</SelStart2><SelEnd2>3548</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\assert.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>27</YPos2><SelStart2>2426</SelStart2><SelEnd2>2426</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\ARMCM3_LM3S\IAR\cstart.s</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>30</YPos2><SelStart2>2499</SelStart2><SelEnd2>2499</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\blt_conf.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>105</YPos2><SelStart2>9282</SelStart2><SelEnd2>9282</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\ARMCM3_LM3S\flash.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>610</YPos2><SelStart2>28371</SelStart2><SelEnd2>28371</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\backdoor.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>18</YPos2><SelStart2>3292</SelStart2><SelEnd2>3292</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\boot.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>18</YPos2><SelStart2>2628</SelStart2><SelEnd2>2636</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>45</YPos2><SelStart2>2964</SelStart2><SelEnd2>2964</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\blt_conf.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>136</YPos2><SelStart2>9086</SelStart2><SelEnd2>9086</SelEnd2></Tab><ActiveTab>1</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-02a5ba70><key>iaridepm.enu1</key></Toolbar-02a5ba70></Sizes></Row0><Row1><Sizes/></Row1><Row2><Sizes/></Row2></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>775</Bottom><Right>335</Right><x>-2</x><y>-2</y><xscreen>187</xscreen><yscreen>169</yscreen><sizeHorzCX>97396</sizeHorzCX><sizeHorzCY>167659</sizeHorzCY><sizeVertCX>175521</sizeVertCX><sizeVertCY>770833</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>188</Bottom><Right>1922</Right><x>-2</x><y>-2</y><xscreen>1924</xscreen><yscreen>190</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>188492</sizeHorzCY><sizeVertCX>97396</sizeVertCX><sizeVertCY>167659</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-02b8ba70><key>iaridepm.enu1</key></Toolbar-02b8ba70></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>775</Bottom><Right>335</Right><x>-2</x><y>-2</y><xscreen>187</xscreen><yscreen>169</yscreen><sizeHorzCX>97396</sizeHorzCX><sizeHorzCY>167659</sizeHorzCY><sizeVertCX>175521</sizeVertCX><sizeVertCY>770833</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>188</Bottom><Right>1922</Right><x>-2</x><y>-2</y><xscreen>1924</xscreen><yscreen>190</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>188492</sizeHorzCY><sizeVertCX>97396</sizeVertCX><sizeVertCY>167659</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

View File

@ -122,5 +122,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -298,4 +298,64 @@ void CopServiceHook(void)
#endif /* BOOT_COP_HOOKS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -40,8 +40,8 @@
</TraceWindow>
<Watch1>
<Watches active="1" update="Never" >
<Watchpoint linenumber="0" radix="-1" name="fifoCtrl[0]" expression="fifoCtrl[0]" filename="" />
<Watchpoint linenumber="0" radix="-1" name="fifoPipeBulkIN" expression="fifoPipeBulkIN" filename="" />
<Watchpoint linenumber="0" radix="-1" name="fifoCtrl[0]" expression="fifoCtrl[0]" filename="" />
</Watches>
</Watch1>
<Watch2>
@ -54,8 +54,8 @@
<Watches active="0" update="Never" />
</Watch4>
<Files>
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32H103_Crossworks\Boot\main.c" y="53" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32H103_Crossworks\Boot\main.c" left="18" selected="0" name="unnamed" top="12" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32H103_Crossworks\Boot\blt_conf.h" y="63" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32H103_Crossworks\Boot\blt_conf.h" left="0" selected="1" name="unnamed" top="69" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32H103_Crossworks\Boot\main.c" y="53" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32H103_Crossworks\Boot\main.c" left="0" selected="0" name="unnamed" top="12" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32H103_Crossworks\Boot\blt_conf.h" y="63" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32H103_Crossworks\Boot\blt_conf.h" left="18" selected="1" name="unnamed" top="69" />
</Files>
<ARMCrossStudioWindow activeProject="openbtl_olimex_stm32h103" autoConnectTarget="SEGGER J-Link" debugSearchFileMap="" fileDialogInitialDirectory="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32H103_Crossworks\Boot" fileDialogDefaultFilter="*.c" autoConnectCapabilities="266111" debugSearchPath="" buildConfiguration="THUMB Debug" />
</session>

View File

@ -122,5 +122,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -298,4 +298,64 @@ void CopServiceHook(void)
#endif /* BOOT_COP_HOOKS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -122,5 +122,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -298,4 +298,64 @@ void CopServiceHook(void)
#endif /* BOOT_COP_HOOKS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -75,14 +75,14 @@
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>32</YPos2><SelStart2>2872</SelStart2><SelEnd2>2872</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\backdoor.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>110</YPos2><SelStart2>5837</SelStart2><SelEnd2>5851</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>32</YPos2><SelStart2>2872</SelStart2><SelEnd2>2872</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\backdoor.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>110</YPos2><SelStart2>5837</SelStart2><SelEnd2>5851</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\hooks.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\blt_conf.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>93</YPos2><SelStart2>8642</SelStart2><SelEnd2>8642</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-0296ba70><key>iaridepm.enu1</key></Toolbar-0296ba70></Sizes></Row0><Row1><Sizes><Toolbar-02d43d08><key>debuggergui.enu1</key></Toolbar-02d43d08></Sizes></Row1></Top><Left><Row0><Sizes><Wnd5><Rect><Top>-2</Top><Left>-2</Left><Bottom>737</Bottom><Right>259</Right><x>-2</x><y>-2</y><xscreen>261</xscreen><yscreen>204</yscreen><sizeHorzCX>135938</sizeHorzCX><sizeHorzCY>202381</sizeHorzCY><sizeVertCX>135938</sizeVertCX><sizeVertCY>733135</sizeVertCY></Rect></Wnd5></Sizes></Row0></Left><Right><Row0><Sizes><Wnd6><Rect><Top>-2</Top><Left>-2</Left><Bottom>737</Bottom><Right>462</Right><x>-2</x><y>-2</y><xscreen>261</xscreen><yscreen>204</yscreen><sizeHorzCX>135938</sizeHorzCX><sizeHorzCY>202381</sizeHorzCY><sizeVertCX>241667</sizeVertCX><sizeVertCY>733135</sizeVertCY></Rect></Wnd6></Sizes></Row0><Row1><Sizes><Wnd7><Rect><Top>-2</Top><Left>460</Left><Bottom>737</Bottom><Right>795</Right><x>460</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>104167</sizeHorzCX><sizeHorzCY>198413</sizeHorzCY><sizeVertCX>174479</sizeVertCX><sizeVertCY>733135</sizeVertCY></Rect></Wnd7></Sizes></Row1></Right><Bottom><Row0><Sizes><Wnd4><Rect><Top>-2</Top><Left>-2</Left><Bottom>202</Bottom><Right>1922</Right><x>-2</x><y>-2</y><xscreen>1924</xscreen><yscreen>204</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>202381</sizeHorzCY><sizeVertCX>135938</sizeVertCX><sizeVertCY>202381</sizeVertCY></Rect></Wnd4></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-0114ba70><key>iaridepm.enu1</key></Toolbar-0114ba70></Sizes></Row0><Row1><Sizes><Toolbar-07c215a0><key>debuggergui.enu1</key></Toolbar-07c215a0></Sizes></Row1></Top><Left><Row0><Sizes><Wnd5><Rect><Top>-2</Top><Left>-2</Left><Bottom>737</Bottom><Right>259</Right><x>-2</x><y>-2</y><xscreen>261</xscreen><yscreen>204</yscreen><sizeHorzCX>135938</sizeHorzCX><sizeHorzCY>202381</sizeHorzCY><sizeVertCX>135938</sizeVertCX><sizeVertCY>733135</sizeVertCY></Rect></Wnd5></Sizes></Row0></Left><Right><Row0><Sizes><Wnd6><Rect><Top>-2</Top><Left>-2</Left><Bottom>737</Bottom><Right>462</Right><x>-2</x><y>-2</y><xscreen>261</xscreen><yscreen>204</yscreen><sizeHorzCX>135938</sizeHorzCX><sizeHorzCY>202381</sizeHorzCY><sizeVertCX>241667</sizeVertCX><sizeVertCY>733135</sizeVertCY></Rect></Wnd6></Sizes></Row0><Row1><Sizes><Wnd7><Rect><Top>-2</Top><Left>460</Left><Bottom>737</Bottom><Right>795</Right><x>460</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>104167</sizeHorzCX><sizeHorzCY>198413</sizeHorzCY><sizeVertCX>174479</sizeVertCX><sizeVertCY>733135</sizeVertCY></Rect></Wnd7></Sizes></Row1></Right><Bottom><Row0><Sizes><Wnd4><Rect><Top>-2</Top><Left>-2</Left><Bottom>202</Bottom><Right>1922</Right><x>-2</x><y>-2</y><xscreen>1924</xscreen><yscreen>204</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>202381</sizeHorzCY><sizeVertCX>135938</sizeVertCX><sizeVertCY>202381</sizeVertCY></Rect></Wnd4></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Project>

View File

@ -18,7 +18,7 @@ ActionState=1
Enabled=0
ShowSource=1
[DebugChecksum]
Checksum=1854575004
Checksum=1209114256
[DisAssemblyWindow]
NumStates=_ 1
State 1=_ 1

View File

@ -17,7 +17,7 @@
<Build><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1059</ColumnWidth1><ColumnWidth2>282</ColumnWidth2><ColumnWidth3>70</ColumnWidth3></Build><Debug-Log><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1413</ColumnWidth1></Debug-Log><TerminalIO/><Select-Ambiguous-Definitions><ColumnWidth0>664</ColumnWidth0><ColumnWidth1>94</ColumnWidth1><ColumnWidth2>1138</ColumnWidth2></Select-Ambiguous-Definitions></Static>
<Windows>
<Wnd2>
<Wnd0>
<Tabs>
<Tab>
<Identity>TabID-32216-31616</Identity>
@ -29,20 +29,20 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd2><Wnd3><Tabs><Tab><Identity>TabID-12497-1878</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-2690-2881</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-24296-22939</Identity><TabName>Ambiguous Definitions</TabName><Factory>Select-Ambiguous-Definitions</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd3></Windows>
<SelectedTab>0</SelectedTab></Wnd0><Wnd1><Tabs><Tab><Identity>TabID-12497-1878</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-2690-2881</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-24296-22939</Identity><TabName>Ambiguous Definitions</TabName><Factory>Select-Ambiguous-Definitions</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd1></Windows>
<Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>32</YPos2><SelStart2>2872</SelStart2><SelEnd2>2872</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\backdoor.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>110</YPos2><SelStart2>5837</SelStart2><SelEnd2>5851</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\hooks.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\blt_conf.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>43</YPos2><SelStart2>3647</SelStart2><SelEnd2>3647</SelEnd2></Tab><ActiveTab>3</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>32</YPos2><SelStart2>2872</SelStart2><SelEnd2>2872</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\..\..\Source\backdoor.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>110</YPos2><SelStart2>5837</SelStart2><SelEnd2>5851</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\hooks.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\blt_conf.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>93</YPos2><SelStart2>8642</SelStart2><SelEnd2>8642</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-02bbba70><key>iaridepm.enu1</key></Toolbar-02bbba70></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>726</Bottom><Right>454</Right><x>-2</x><y>-2</y><xscreen>261</xscreen><yscreen>203</yscreen><sizeHorzCX>135938</sizeHorzCX><sizeHorzCY>201389</sizeHorzCY><sizeVertCX>237500</sizeVertCX><sizeVertCY>722222</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>237</Bottom><Right>1922</Right><x>-2</x><y>-2</y><xscreen>1924</xscreen><yscreen>239</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>237103</sizeHorzCY><sizeVertCX>135938</sizeVertCX><sizeVertCY>201389</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-0114ba70><key>iaridepm.enu1</key></Toolbar-0114ba70></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>726</Bottom><Right>454</Right><x>-2</x><y>-2</y><xscreen>261</xscreen><yscreen>203</yscreen><sizeHorzCX>135938</sizeHorzCX><sizeHorzCY>201389</sizeHorzCY><sizeVertCX>237500</sizeVertCX><sizeVertCY>722222</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>237</Bottom><Right>1922</Right><x>-2</x><y>-2</y><xscreen>1924</xscreen><yscreen>239</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>237103</sizeHorzCY><sizeVertCX>135938</sizeVertCX><sizeVertCY>201389</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

View File

@ -191,5 +191,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -391,4 +391,63 @@ void FileFirmwareUpdateLogHook(blt_char *info_string)
#endif /* BOOT_FILE_SYS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -40,9 +40,9 @@
</TraceWindow>
<Watch1>
<Watches active="1" update="Never" >
<Watchpoint linenumber="121" radix="-1" name="free_running_counter_last" expression="free_running_counter_last" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
<Watchpoint linenumber="152" radix="-1" name="free_running_counter_accumulative" expression="free_running_counter_accumulative" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
<Watchpoint linenumber="124" radix="-1" name="free_running_counter_now" expression="free_running_counter_now" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
<Watchpoint linenumber="152" radix="-1" name="free_running_counter_accumulative" expression="free_running_counter_accumulative" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
<Watchpoint linenumber="121" radix="-1" name="free_running_counter_last" expression="free_running_counter_last" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
</Watches>
</Watch1>
<Watch2>
@ -55,8 +55,8 @@
<Watches active="0" update="Never" />
</Watch4>
<Files>
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_Crossworks\Boot\main.c" y="56" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_Crossworks\Boot\main.c" left="0" selected="0" name="unnamed" top="34" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_Crossworks\Boot\blt_conf.h" y="22" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_Crossworks\Boot\blt_conf.h" left="18" selected="1" name="unnamed" top="0" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_Crossworks\Boot\main.c" y="56" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_Crossworks\Boot\main.c" left="18" selected="0" name="unnamed" top="34" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_Crossworks\Boot\blt_conf.h" y="22" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM3_STM32_Olimex_STM32P103_Crossworks\Boot\blt_conf.h" left="0" selected="1" name="unnamed" top="0" />
</Files>
<ARMCrossStudioWindow activeProject="openbtl_olimex_stm32p103" autoConnectTarget="SEGGER J-Link" debugSearchFileMap="" fileDialogInitialDirectory="C:\Work\software\OpenBLT\Target\Source\third_party\fatfs\src\option" fileDialogDefaultFilter="*.c" autoConnectCapabilities="266111" debugSearchPath="" buildConfiguration="THUMB Debug" />
</session>

View File

@ -191,5 +191,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -391,4 +391,63 @@ void FileFirmwareUpdateLogHook(blt_char *info_string)
#endif /* BOOT_FILE_SYS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -191,5 +191,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -391,4 +391,63 @@ void FileFirmwareUpdateLogHook(blt_char *info_string)
#endif /* BOOT_FILE_SYS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -26,7 +26,7 @@
<MixedMode>1</MixedMode><CodeCovShow>1</CodeCovShow><InstrProfShow>1</InstrProfShow><col-names><item>Disassembly</item><item>_I0</item></col-names><col-widths><item>500</item><item>20</item></col-widths><DisasmHistory/><ShowCodeCoverage>1</ShowCodeCoverage><ShowInstrProfiling>1</ShowInstrProfiling></Disassembly>
<Watch><Format><struct_types/><watch_formats/></Format><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><Column0>100</Column0><Column1>100</Column1><Column2>100</Column2><Column3>100</Column3></Watch><Register><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows></Register><WATCH_1><expressions><item>res</item><item>dir</item><item>c</item><item></item></expressions><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>100</item><item>150</item><item>100</item><item>207</item></col-widths></WATCH_1></Static>
<Watch><Format><struct_types/><watch_formats/></Format><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><Column0>100</Column0><Column1>100</Column1><Column2>100</Column2><Column3>100</Column3></Watch><Register><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows></Register><WATCH_1><expressions><item>res</item><item>dir</item><item>c</item><item/></expressions><col-names><item>Expression</item><item>Location</item><item>Type</item><item>Value</item></col-names><col-widths><item>100</item><item>150</item><item>100</item><item>207</item></col-widths></WATCH_1></Static>
<Windows>

View File

@ -17,7 +17,7 @@
<Build><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Debug-Log</Factory></Window></Windows></PreferedWindows><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1059</ColumnWidth1><ColumnWidth2>282</ColumnWidth2><ColumnWidth3>70</ColumnWidth3></Build><Debug-Log><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Build</Factory></Window></Windows></PreferedWindows><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1413</ColumnWidth1></Debug-Log><TerminalIO/><Find-in-Files><ColumnWidth0>664</ColumnWidth0><ColumnWidth1>94</ColumnWidth1><ColumnWidth2>1138</ColumnWidth2></Find-in-Files></Static>
<Windows>
<Wnd0>
<Wnd1>
<Tabs>
<Tab>
<Identity>TabID-32216-31616</Identity>
@ -29,7 +29,7 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd0><Wnd2><Tabs><Tab><Identity>TabID-13144-32069</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-25023-6652</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-18334-26223</Identity><TabName>Find in Files</TabName><Factory>Find-in-Files</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd2></Windows>
<SelectedTab>0</SelectedTab></Wnd1><Wnd3><Tabs><Tab><Identity>TabID-13144-32069</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-25023-6652</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-18334-26223</Identity><TabName>Find in Files</TabName><Factory>Find-in-Files</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd3></Windows>
<Editor>
@ -42,7 +42,7 @@
<Top><Row0><Sizes><Toolbar-0297ba70><key>iaridepm.enu1</key></Toolbar-0297ba70></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>752</Bottom><Right>400</Right><x>-2</x><y>-2</y><xscreen>154</xscreen><yscreen>164</yscreen><sizeHorzCX>80208</sizeHorzCX><sizeHorzCY>162698</sizeHorzCY><sizeVertCX>209375</sizeVertCX><sizeVertCY>748016</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>211</Bottom><Right>1922</Right><x>-2</x><y>-2</y><xscreen>1924</xscreen><yscreen>213</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>211310</sizeHorzCY><sizeVertCX>209375</sizeVertCX><sizeVertCY>352183</sizeVertCY></Rect></Wnd2></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-0298ba70><key>iaridepm.enu1</key></Toolbar-0298ba70></Sizes></Row0></Top><Left><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>752</Bottom><Right>400</Right><x>-2</x><y>-2</y><xscreen>154</xscreen><yscreen>164</yscreen><sizeHorzCX>80208</sizeHorzCX><sizeHorzCY>162698</sizeHorzCY><sizeVertCX>209375</sizeVertCX><sizeVertCY>748016</sizeVertCY></Rect></Wnd1></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>211</Bottom><Right>1922</Right><x>-2</x><y>-2</y><xscreen>1924</xscreen><yscreen>213</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>211310</sizeHorzCY><sizeVertCX>209375</sizeVertCX><sizeVertCY>352183</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

View File

@ -267,5 +267,26 @@
#define BOOT_COP_HOOKS_ENABLE (0)
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y C O N F I G U R A T I O N
****************************************************************************************/
/* A security mechanism can be enabled in the bootloader's XCP module by setting configu-
* rable BOOT_XCP_SEED_KEY_ENABLE to 1. Before any memory erase or programming
* operations can be performed, access to this resource need to be unlocked.
* In the Microboot settings on tab "XCP Protection" you need to specify a DLL that
* implements the unlocking algorithm. The demo programs are configured for the (simple)
* algorithm in "FeaserKey.dll". The source code for this DLL is available so it can be
* customized to your needs.
* During the unlock sequence, Microboot requests a seed from the bootloader, which is in
* the format of a byte array. Using this seed the unlock algorithm in the DLL computes
* a key, which is also a byte array, and sends this back to the bootloader. The
* bootloader then verifies this key to determine if programming and erase operations are
* permitted.
* After enabling this feature the hook functions XcpGetSeedHook() and XcpVerifyKeyHook()
* are called by the bootloader to obtain the seed and to verify the key, respectively.
*/
#define BOOT_XCP_SEED_KEY_ENABLE (0)
#endif /* BLT_CONF_H */
/*********************************** end of blt_conf.h *********************************/

View File

@ -391,4 +391,63 @@ void FileFirmwareUpdateLogHook(blt_char *info_string)
#endif /* BOOT_FILE_SYS_ENABLE > 0 */
/****************************************************************************************
* S E E D / K E Y S E C U R I T Y H O O K F U N C T I O N S
****************************************************************************************/
#if (BOOT_XCP_SEED_KEY_ENABLE > 0)
/************************************************************************************//**
** \brief Provides a seed to the XCP master that will be used for the key
** generation when the master attempts to unlock the specified resource.
** Called by the GET_SEED command.
** \param resource Resource that the seed if requested for (XCP_RES_XXX).
** \param seed Pointer to byte buffer wher the seed will be stored.
** \return Length of the seed in bytes.
**
****************************************************************************************/
blt_int8u XcpGetSeedHook(blt_int8u resource, blt_int8u *seed)
{
/* request seed for unlocking ProGraMming resource */
if ((resource & XCP_RES_PGM) != 0)
{
seed[0] = 0x55;
}
/* return seed length */
return 1;
} /*** end of XcpGetSeedHook ***/
/************************************************************************************//**
** \brief Called by the UNLOCK command and checks if the key to unlock the
** specified resource was correct. If so, then the resource protection
** will be removed.
** \param resource resource to unlock (XCP_RES_XXX).
** \param key pointer to the byte buffer holding the key.
** \param len length of the key in bytes.
** \return 1 if the key was correct, 0 otherwise.
**
****************************************************************************************/
blt_int8u XcpVerifyKeyHook(blt_int8u resource, blt_int8u *key, blt_int8u len)
{
/* suppress compiler warning for unused parameter */
len = len;
/* the example key algorithm in "FeaserKey.dll" works as follows:
* - PGM will be unlocked if key = seed - 1
*/
/* check key for unlocking ProGraMming resource */
if ((resource == XCP_RES_PGM) && (key[0] == (0x55-1)))
{
/* correct key received for unlocking PGM resource */
return 1;
}
/* still here so key incorrect */
return 0;
} /*** end of XcpVerifyKeyHook ***/
#endif /* BOOT_XCP_SEED_KEY_ENABLE > 0 */
/*********************************** end of hooks.c ************************************/

View File

@ -48,9 +48,9 @@
</TraceWindow>
<Watch1>
<Watches active="1" update="Never" >
<Watchpoint linenumber="124" radix="-1" name="free_running_counter_now" expression="free_running_counter_now" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
<Watchpoint linenumber="152" radix="-1" name="free_running_counter_accumulative" expression="free_running_counter_accumulative" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
<Watchpoint linenumber="121" radix="-1" name="free_running_counter_last" expression="free_running_counter_last" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
<Watchpoint linenumber="152" radix="-1" name="free_running_counter_accumulative" expression="free_running_counter_accumulative" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
<Watchpoint linenumber="124" radix="-1" name="free_running_counter_now" expression="free_running_counter_now" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
</Watches>
</Watch1>
<Watch2>
@ -63,8 +63,8 @@
<Watches active="0" update="Never" />
</Watch4>
<Files>
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\main.c" y="54" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\main.c" left="0" selected="0" name="unnamed" top="50" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\blt_conf.h" y="167" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\blt_conf.h" left="18" selected="1" name="unnamed" top="167" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\main.c" y="54" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\main.c" left="18" selected="0" name="unnamed" top="50" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\blt_conf.h" y="167" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\blt_conf.h" left="0" selected="1" name="unnamed" top="167" />
</Files>
<ARMCrossStudioWindow activeProject="openbtl_olimex_stm32e407" autoConnectTarget="SEGGER J-Link" debugSearchFileMap="" fileDialogInitialDirectory="C:\Work\software\OpenBLT\Target\Source\third_party\uip\uip" fileDialogDefaultFilter="*.c" autoConnectCapabilities="266111" debugSearchPath="" buildConfiguration="THUMB Debug" />
</session>

Some files were not shown because too many files have changed in this diff Show More