chore: migrate project into clean repository

This commit is contained in:
yuuux
2026-08-13 16:50:52 +08:00
commit d1d25a09e7
27405 changed files with 9422808 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<buildSystem id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1662926317">
<storageModule id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1662926317" moduleId="org.eclipse.cdt.core.settings"/>
</buildSystem>
<cconfiguration id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1662926317">
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="CppUTest AT91SAM7A3 sample project" buildProperties="" description="" errorParsers="org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1662926317" name="Preference Configuration" parent="org.eclipse.cdt.build.core.prefbase.cfg">
<folderInfo id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1662926317." name="/" resourcePath="">
<toolChain errorParsers="" id="org.eclipse.cdt.build.core.prefbase.toolchain.1554948526" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.eclipse.cdt.build.core.prefbase.toolchain.1554948526.181399830" name=""/>
<builder enableAutoBuild="true" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="org.eclipse.cdt.build.core.settings.default.builder.1798742252" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
<tool errorParsers="org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="org.eclipse.cdt.build.core.settings.holder.libs.2119621088" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
<tool errorParsers="org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="org.eclipse.cdt.build.core.settings.holder.256174936" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.533153938" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${SYS_INCLUDE_DIRS}&quot;"/>
<listOptionValue builtIn="false" value="&quot;../${CPPUTEST_HOME}\include&quot;"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.946681329" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool errorParsers="org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="org.eclipse.cdt.build.core.settings.holder.1341050389" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1198479538" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${SYS_INCLUDE_DIRS}&quot;"/>
<listOptionValue builtIn="false" value="&quot;../${CPPUTEST_HOME}\include&quot;"/>
</option>
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.973447871" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="CPPUTEST_MEM_LEAK_DETECTION_DISABLED"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1258467244" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool errorParsers="org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="org.eclipse.cdt.build.core.settings.holder.1638185256" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1190707854" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${SYS_INCLUDE_DIRS}&quot;"/>
<listOptionValue builtIn="false" value="&quot;../${CPPUTEST_HOME}\include&quot;"/>
</option>
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.632118779" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols"/>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.831274149" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1662926317" moduleId="org.eclipse.cdt.core.settings" name="Preference Configuration">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="CppUTest AT91SAM7A3 sample project.null.1595792166" name="CppUTest AT91SAM7A3 sample project"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.1662926317">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Preference Configuration">
<resource resourceType="PROJECT" workspacePath="/CppUTest AT91SAM7A3 sample project"/>
</configuration>
</storageModule>
</cproject>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>CppUTest AT91SAM7A3 sample project</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,247 @@
AppVersion = 47803
[GENERAL]
ConnectMode = 0
CurrentFile = "obj/tst.mot"
DataFileSAddr = 0x00000000
GUIMode = 0
HostName = ""
TargetIF = 0
USBPort = 0
USBSerialNo = 0x00000000
[JTAG]
IRLen = 0
MultipleTargets = 0
NumDevices = 0
Speed0 = 30
Speed1 = 400
TAP_Number = 0
UseAdaptive0 = 0
UseAdaptive1 = 0
UseMaxSpeed0 = 0
UseMaxSpeed1 = 1
[CPU]
CheckCoreID = 1
ChipName = "Atmel AT91SAM7A3"
ClockSpeed = 0x003D0900
Core = 0x070000FF
CoreID = 0x3F0F0F0F
CoreIDMask = 0xFFFFFFFF
DeviceFamily = 0x00000007
EndianMode = 0
HasInternalFlash = 1
InitStep0_Action = "Write 32bit"
InitStep0_Comment = "Peripherial reset, need for disable WDT"
InitStep0_Value0 = 0xFFFFFD00
InitStep0_Value1 = 0xA5000004
InitStep10_Action = "Write 32bit"
InitStep10_Comment = "Unlock 0 region"
InitStep10_Value0 = 0xFFFFFF64
InitStep10_Value1 = 0x5A000004
InitStep11_Action = "Delay"
InitStep11_Comment = ""
InitStep11_Value0 = 0x00000000
InitStep11_Value1 = 0x00000001
InitStep12_Action = "Write 32bit"
InitStep12_Comment = "Unlock 1 region"
InitStep12_Value0 = 0xFFFFFF64
InitStep12_Value1 = 0x5A001004
InitStep13_Action = "Delay"
InitStep13_Comment = ""
InitStep13_Value0 = 0x00000000
InitStep13_Value1 = 0x00000001
InitStep14_Action = "Write 32bit"
InitStep14_Comment = "Unlock 2 region"
InitStep14_Value0 = 0xFFFFFF64
InitStep14_Value1 = 0x5A002004
InitStep15_Action = "Delay"
InitStep15_Comment = ""
InitStep15_Value0 = 0x00000000
InitStep15_Value1 = 0x00000001
InitStep16_Action = "Write 32bit"
InitStep16_Comment = "Unlock 3 region"
InitStep16_Value0 = 0xFFFFFF64
InitStep16_Value1 = 0x5A003004
InitStep17_Action = "Delay"
InitStep17_Comment = ""
InitStep17_Value0 = 0x00000000
InitStep17_Value1 = 0x00000001
InitStep18_Action = "Write 32bit"
InitStep18_Comment = "Unlock 4 region"
InitStep18_Value0 = 0xFFFFFF64
InitStep18_Value1 = 0x5A004004
InitStep19_Action = "Delay"
InitStep19_Comment = ""
InitStep19_Value0 = 0x00000000
InitStep19_Value1 = 0x00000001
InitStep1_Action = "Reset"
InitStep1_Comment = ""
InitStep1_Value0 = 0x00000000
InitStep1_Value1 = 0x00000000
InitStep20_Action = "Write 32bit"
InitStep20_Comment = "Unlock 5 region"
InitStep20_Value0 = 0xFFFFFF64
InitStep20_Value1 = 0x5A005004
InitStep21_Action = "Delay"
InitStep21_Comment = ""
InitStep21_Value0 = 0x00000000
InitStep21_Value1 = 0x00000001
InitStep22_Action = "Write 32bit"
InitStep22_Comment = "Unlock 6 region"
InitStep22_Value0 = 0xFFFFFF64
InitStep22_Value1 = 0x5A006004
InitStep23_Action = "Delay"
InitStep23_Comment = ""
InitStep23_Value0 = 0x00000000
InitStep23_Value1 = 0x00000001
InitStep24_Action = "Write 32bit"
InitStep24_Comment = "Unlock 7 region"
InitStep24_Value0 = 0xFFFFFF64
InitStep24_Value1 = 0x5A007004
InitStep25_Action = "Delay"
InitStep25_Comment = ""
InitStep25_Value0 = 0x00000000
InitStep25_Value1 = 0x00000001
InitStep26_Action = "Write 32bit"
InitStep26_Comment = "Unlock 8 region"
InitStep26_Value0 = 0xFFFFFF64
InitStep26_Value1 = 0x5A008004
InitStep27_Action = "Delay"
InitStep27_Comment = ""
InitStep27_Value0 = 0x00000000
InitStep27_Value1 = 0x00000001
InitStep28_Action = "Write 32bit"
InitStep28_Comment = "Unlock 9 region"
InitStep28_Value0 = 0xFFFFFF64
InitStep28_Value1 = 0x5A009004
InitStep29_Action = "Delay"
InitStep29_Comment = ""
InitStep29_Value0 = 0x00000000
InitStep29_Value1 = 0x00000001
InitStep2_Action = "Delay"
InitStep2_Comment = ""
InitStep2_Value0 = 0x00000000
InitStep2_Value1 = 0x00000002
InitStep30_Action = "Write 32bit"
InitStep30_Comment = "Unlock 10 region"
InitStep30_Value0 = 0xFFFFFF64
InitStep30_Value1 = 0x5A00A004
InitStep31_Action = "Delay"
InitStep31_Comment = ""
InitStep31_Value0 = 0x00000000
InitStep31_Value1 = 0x00000001
InitStep32_Action = "Write 32bit"
InitStep32_Comment = "Unlock 11 region"
InitStep32_Value0 = 0xFFFFFF64
InitStep32_Value1 = 0x5A00B004
InitStep33_Action = "Delay"
InitStep33_Comment = ""
InitStep33_Value0 = 0x00000000
InitStep33_Value1 = 0x00000001
InitStep34_Action = "Write 32bit"
InitStep34_Comment = "Unlock 12 region"
InitStep34_Value0 = 0xFFFFFF64
InitStep34_Value1 = 0x5A00C004
InitStep35_Action = "Delay"
InitStep35_Comment = ""
InitStep35_Value0 = 0x00000000
InitStep35_Value1 = 0x00000001
InitStep36_Action = "Write 32bit"
InitStep36_Comment = "Unlock 13 region"
InitStep36_Value0 = 0xFFFFFF64
InitStep36_Value1 = 0x5A00D004
InitStep37_Action = "Delay"
InitStep37_Comment = ""
InitStep37_Value0 = 0x00000000
InitStep37_Value1 = 0x00000001
InitStep38_Action = "Write 32bit"
InitStep38_Comment = "Unlock 14 region"
InitStep38_Value0 = 0xFFFFFF64
InitStep38_Value1 = 0x5A00E004
InitStep39_Action = "Delay"
InitStep39_Comment = ""
InitStep39_Value0 = 0x00000000
InitStep39_Value1 = 0x00000001
InitStep3_Action = "Write 32bit"
InitStep3_Comment = "Disable watchdog"
InitStep3_Value0 = 0xFFFFFD44
InitStep3_Value1 = 0x00008000
InitStep40_Action = "Write 32bit"
InitStep40_Comment = "Unlock 15 region"
InitStep40_Value0 = 0xFFFFFF64
InitStep40_Value1 = 0x5A00F004
InitStep41_Action = "Delay"
InitStep41_Comment = ""
InitStep41_Value0 = 0x00000000
InitStep41_Value1 = 0x00000001
InitStep4_Action = "Write 32bit"
InitStep4_Comment = "Set PLL"
InitStep4_Value0 = 0xFFFFFC20
InitStep4_Value1 = 0x00000601
InitStep5_Action = "Delay"
InitStep5_Comment = ""
InitStep5_Value0 = 0x00000000
InitStep5_Value1 = 0x00000002
InitStep6_Action = "Write 32bit"
InitStep6_Comment = "Set PLL and divider"
InitStep6_Value0 = 0xFFFFFC2C
InitStep6_Value1 = 0x00C79E04
InitStep7_Action = "Write 32bit"
InitStep7_Comment = "4MHz"
InitStep7_Value0 = 0xFFFFFC30
InitStep7_Value1 = 0x00000001
InitStep8_Action = "Delay"
InitStep8_Comment = ""
InitStep8_Value0 = 0x00000000
InitStep8_Value1 = 0x00000002
InitStep9_Action = "Write 32bit"
InitStep9_Comment = "Set WS = 2 (for write), FCN = 6 for 4 MHz"
InitStep9_Value0 = 0xFFFFFF60
InitStep9_Value1 = 0x00060000
NumExitSteps = 0
NumInitSteps = 42
RAMAddr = 0x00200000
RAMSize = 0x00004000
ScriptFile = ""
UseAutoSpeed = 0x00000001
UseRAM = 1
UseScriptFile = 0
[FLASH]
aSectorSel[1024] = 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
AutoDetect = 0
BankName = ""
BankSelMode = 0
BaseAddr = 0x00100000
CheckId = 0
CustomRAMCode = ""
DeviceName = "AT91SAM7A3 internal"
EndBank = 1023
NumBanks = 1
OrgNumBits = 32
OrgNumChips = 1
StartBank = 0
UseCustomRAMCode = 0
[PRODUCTION]
AutoPerformsErase = 1
AutoPerformsHardLock = 0
AutoPerformsHardUnlock = 0
AutoPerformsProgram = 1
AutoPerformsSecure = 0
AutoPerformsSoftLock = 0
AutoPerformsSoftUnlock = 1
AutoPerformsStartApp = 1
AutoPerformsUnsecure = 0
AutoPerformsVerify = 1
EnableProductionMode = 0
EnableTargetPower = 1
EraseType = 1
ProductionDelay = 0x000001F4
ProductionThreshold = 0x00000BB8
ProgramSN = 0
SerialFile = ""
SNAddr = 0x00000000
SNInc = 0x00000001
SNLen = 0x00000008
SNListFile = ""
SNValue = 0x00000001
TargetPowerDelay = 0x00000014
VerifyType = 2

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.cdt.debug.gdbjtag.launchConfigurationType">
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.delay" value="3"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="false"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value="monitor endian little&#13;&#10;monitor reset&#13;&#10;monitor speed auto&#13;&#10;set remote memory-write-packet-size 4096&#13;&#10;set remote memory-write-packet-size fixed&#13;&#10;monitor clrbp&#13;&#10;monitor flash download = 0&#13;&#10;monitor flash breakpoints = 1&#13;&#10;set target-wide-charset UTF-8"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="Generic TCP/IP"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="2331"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="false"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useRemoteTarget" value="true"/>
<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEBUG_NAME" value="D:\GNU Tools ARM Embedded\4.7 2013q2\bin\arm-none-eabi-gdb.exe"/>
<stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory" value="Standard"/>
<stringAttribute key="org.eclipse.cdt.debug.mi.core.protocol" value="mi"/>
<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="D:\GNU Tools ARM Embedded\4.7 2013q2\bin\arm-none-eabi-gdb.exe"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="0"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content id=&quot;r0-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r1-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r2-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r3-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r4-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r5-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r6-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r7-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r8-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r9-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r10-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r11-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;r12-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;sp-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;lr-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;cpsr-(format)&quot; val=&quot;4&quot;/&gt;&lt;/contentList&gt;"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;globalVariableList/&gt;&#13;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList&gt;&#13;&#10;&lt;memoryBlockExpressionItem&gt;&#13;&#10;&lt;expression text=&quot;0x20063c&quot;/&gt;&#13;&#10;&lt;/memoryBlockExpressionItem&gt;&#13;&#10;&lt;memoryBlockExpressionItem&gt;&#13;&#10;&lt;expression text=&quot;0x20063c&quot;/&gt;&#13;&#10;&lt;/memoryBlockExpressionItem&gt;&#13;&#10;&lt;memoryBlockExpressionItem&gt;&#13;&#10;&lt;expression text=&quot;0x207907&quot;/&gt;&#13;&#10;&lt;/memoryBlockExpressionItem&gt;&#13;&#10;&lt;memoryBlockExpressionItem&gt;&#13;&#10;&lt;expression text=&quot;0x2007d0&quot;/&gt;&#13;&#10;&lt;/memoryBlockExpressionItem&gt;&#13;&#10;&lt;memoryBlockExpressionItem&gt;&#13;&#10;&lt;expression text=&quot;0x64&quot;/&gt;&#13;&#10;&lt;/memoryBlockExpressionItem&gt;&#13;&#10;&lt;memoryBlockExpressionItem&gt;&#13;&#10;&lt;expression text=&quot;0x2007d0&quot;/&gt;&#13;&#10;&lt;/memoryBlockExpressionItem&gt;&#13;&#10;&lt;/memoryBlockExpressionList&gt;&#13;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="D:\Home\bortsov\git\cpputest\platforms_tests\armcc\AT91SAM7A3\obj\SimpleStringTest.axf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="CppUTest AT91SAM7A3 sample project"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/CppUTest AT91SAM7A3 sample project"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
<mapEntry key="[debug]" value="org.eclipse.cdt.debug.gdbjtag.core.cdiLaunchDelegate"/>
</mapAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;&#13;&#10;"/>
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
<stringAttribute key="saved_expressions&lt;seperator&gt;Unknown" value="0X20063C,0x1297a0,0x200090,r0,$r0,$r1,0x00127EB0,r5,$r5,0x00207907,buf,&amp;size_heap,0x1004f0"/>
</launchConfiguration>

View File

@@ -0,0 +1,4 @@
Heap usage for initialization of std::cout is about 1496 bytes.
Additional heap usage for std::cout << (double) is about 644 bytes.
All heap usage for CRT + cpp + sample tests is about 10624 bytes.

View File

@@ -0,0 +1,5 @@
No any additional license is used except standard Keil MDK-ARM license.
If you use Keil MDK-ARM or ARM C/C++ then you agreed with terms of
Keil MDK-ARM license.

View File

@@ -0,0 +1,321 @@
.SILENT:
#We don't need to clean up when we're making these targets
NODEPS = clean
# CPU architecture. Passing to armcc.exe. For list: armcc --cpu list
ifndef CPU
CPU = ARM7TDMI
endif
# ARM/THUMB mode. Passing to armcc.exe. May be 'thumb' or 'arm'
ifndef CPU_MODE
CPU_MODE = thumb
endif
TARGET_PLATFORM =armcc_$(CPU)_$(CPU_MODE)
# Need to use only relative path! Path with logical letters does not working.
CPPUTEST_HOME = ../../..
COMPONENT_NAME = app
CPPUTEST_OBJS_DIR = objs
# directory for appication library
CPPUTEST_LIB_DIR = lib
CPPUTEST_USE_MEM_LEAK_DETECTION = N
CPPUTEST_USE_STD_CPP_LIB = Y
CPPUTEST_USE_VPATH = Y
CPPUTEST_USE_STD_C_LIB = Y
CPPUTEST_ENABLE_DEBUG = Y
CPPUTEST_USE_EXTENSIONS = N
SRC_DIRS = \
SRC_FILES = $(CPPUTEST_HOME)/examples/ApplicationLib/CircularBuffer.cpp \
$(CPPUTEST_HOME)/examples/ApplicationLib/Printer.cpp
TEST_SRC_DIRS = \
tests \
TEST_FILES = $(CPPUTEST_HOME)/examples/AllTests/CircularBufferTest.cpp
# directory with CppUTest and startup libraries
CPPUTEST_LIB_LINK_DIR = $(CPPUTEST_HOME)/lib/$(TARGET_PLATFORM)
INCLUDE_DIRS = \
$(CPPUTEST_HOME)/include \
$(SRC_DIRS) \
$(CPPUTEST_HOME)/examples/ApplicationLib \
# name of extension of output file. Default Keil MDK-ARM extension is .axf which is elf format
# .axf will be .elf for eclipse debug
OUTFILE_EXT = elf
# output filename, mapfile (.map), hexfile (.mot)
OUTNAME = $(COMPONENT_NAME)
OUTFILE = $(OUTNAME).$(OUTFILE_EXT)
HEXFILE = $(OUTNAME).mot
MAPFILE = $(OUTNAME).map
# CYGWIN path
CYGWIN =C:/CYGWIN/bin
MKDIR =$(CYGWIN)/mkdir
RM =$(CYGWIN)/rm
TOUCH =$(CYGWIN)/touch
ECHO =$(CYGWIN)/echo
KEIL_DIR=D:/Keil/ARM/ARMCC
CC=$(KEIL_DIR)/bin/armcc.exe
AS=$(KEIL_DIR)/bin/armasm.exe
AR=$(KEIL_DIR)/bin/armar.exe
LD=$(KEIL_DIR)/bin/armlink.exe
FROMELF=$(KEIL_DIR)/bin/fromelf.exe
# armcc system include path
SYS_INCLUDE_DIRS =$(KEIL_DIR)/include
JFLASH ="C:/Program Files (x86)/SEGGER/JLink_V490b/JFlash.exe"
JFLASHPRJ =AT91SAM7A3.jflash
LDSCRIPT = ROM.sct
CPUFLAGS =--cpu=$(CPU)
ifeq ($(CPU_MODE), thumb)
CPUFLAGS +=--apcs=/interwork
endif
DEPFLAGS =-M \
$(INCLUDES) \
--depend_format=unix_escaped \
--depend_single_line \
--no_depend_system_headers
OPTFLAGS =-O3
CPPUTEST_CPPFLAGS =$(CPUFLAGS) \
$(OPTFLAGS) \
-c \
-g \
$(INCLUDES) \
--$(CPU_MODE) \
--exceptions \
-D__CLK_TCK=1000 \
CPPUTEST_LDFLAGS =$(CPUFLAGS) \
--strict \
--entry=Reset_Handler \
--summary_stderr \
--map \
--callgraph \
--info=summarysizes \
--info=sizes \
--info=totals \
--info=veneers\
--load_addr_map_info \
--library_type=standardlib \
--remove \
--debug \
ARFLAGS = --debug_symbols
# new and delete for memory leak detection on by default
ifndef CPPUTEST_USE_MEM_LEAK_DETECTION
CPPUTEST_USE_MEM_LEAK_DETECTION = Y
endif
# Use the standard C library
ifndef CPPUTEST_USE_STD_C_LIB
CPPUTEST_USE_STD_C_LIB = Y
endif
# Use the standard C++ library
ifndef CPPUTEST_USE_STD_CPP_LIB
CPPUTEST_USE_STD_CPP_LIB = Y
endif
# No extentions is default
ifndef CPPUTEST_USE_EXTENSIONS
CPPUTEST_USE_EXTENSIONS = N
endif
# No VPATH is default
ifndef CPPUTEST_USE_VPATH
CPPUTEST_USE_VPATH = N
endif
# Make empty, instead of 'N', for usage in $(if ) conditionals
ifneq ($(CPPUTEST_USE_VPATH), Y)
CPPUTEST_USE_VPATH =
endif
# Without the C library, we'll need to disable the C++ library and ...
ifeq ($(CPPUTEST_USE_STD_C_LIB), N)
CPPUTEST_USE_STD_CPP_LIB = N
CPPUTEST_USE_MEM_LEAK_DETECTION = N
CPPUTEST_CPPFLAGS += -DCPPUTEST_STD_C_LIB_DISABLED
CPPUTEST_LDFLAGS +=--no_scanlib
else
INCLUDE_DIRS +=$(SYS_INCLUDE_DIRS)
endif
ifeq ($(CPPUTEST_USE_MEM_LEAK_DETECTION), N)
CPPUTEST_CPPFLAGS += -DCPPUTEST_MEM_LEAK_DETECTION_DISABLED
else
ifndef CPPUTEST_MEMLEAK_DETECTOR_NEW_MACRO_FILE
CPPUTEST_MEMLEAK_DETECTOR_NEW_MACRO_FILE = -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorNewMacros.h
endif
ifndef CPPUTEST_MEMLEAK_DETECTOR_MALLOC_MACRO_FILE
CPPUTEST_MEMLEAK_DETECTOR_MALLOC_MACRO_FILE = -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorMallocMacros.h
endif
endif
ifeq ($(CPPUTEST_USE_STD_CPP_LIB), N)
CPPUTEST_CPPFLAGS += -DCPPUTEST_STD_CPP_LIB_DISABLED
endif
# Link with CppUTest lib
CPPUTEST_LIB = $(CPPUTEST_LIB_LINK_DIR)/libCppUTest.a
# Link with startup lib
CPPUTEST_LIB += $(CPPUTEST_LIB_LINK_DIR)/libStartup_AT91SAM7A3.a
# Link with CppUTestExt lib
ifeq ($(CPPUTEST_USE_EXTENSIONS), Y)
CPPUTEST_LIB += $(CPPUTEST_LIB_LINK_DIR)/libCppUTestExt.a
endif
TARGET_LIB = \
$(CPPUTEST_LIB_DIR)/lib$(COMPONENT_NAME).a
ifndef TEST_TARGET
ifndef TARGET_PLATFORM
TEST_TARGET = $(COMPONENT_NAME)_tests
else
TEST_TARGET = $(COMPONENT_NAME)_$(TARGET_PLATFORM)_tests
endif
endif
#Helper Functions
get_src_from_dir = $(wildcard $1/*.cpp) $(wildcard $1/*.cc) $(wildcard $1/*.c) $(wildcard $1/*.asm)
get_src_from_dir_list = $(foreach dir, $1, $(call get_src_from_dir,$(dir)))
__src_to = $(subst .c,$1, $(subst .cc,$1, $(subst .cpp,$1, $(if $(CPPUTEST_USE_VPATH),$(notdir $2),$2))))
src_to = $(addprefix $3/,$(call __src_to,$1,$2))
src_to_o = $(call src_to,.o,$1,$2)
src_to_d = $(call src_to,.d,$1,$2)
time = $(shell date +%s)
delta_t = $(eval minus, $1, $2)
debug_print_list = $(foreach word,$1,echo " $(word)";) echo
# исходники программных модулей
SRC = $(call get_src_from_dir_list, $(SRC_DIRS)) $(SRC_FILES)
OBJ = $(call src_to_o,$(SRC),$(CPPUTEST_OBJS_DIR))
# исходники тестов
TEST_SRC = $(call get_src_from_dir_list, $(TEST_SRC_DIRS)) $(TEST_FILES)
TEST_OBJ = $(call src_to_o,$(TEST_SRC),$(CPPUTEST_OBJS_DIR))
# If we're using VPATH
ALL_SRC = $(SRC) $(TEST_SRC)
ifeq ($(CPPUTEST_USE_VPATH), Y)
# gather all the source directories and add them
VPATH += $(sort $(dir $(ALL_SRC)))
# Add the component name to the objs dir path, to differentiate between same-name objects
CPPUTEST_OBJS_DIR := $(addsuffix /$(COMPONENT_NAME),$(CPPUTEST_OBJS_DIR))
endif
# for building application library
INCLUDES += $(foreach dir, $(INCLUDE_DIRS), -I$(dir))
DEP_FILES = $(call src_to_d, $(SRC), $(CPPUTEST_OBJS_DIR))
DEP_TEST_FILES = $(call src_to_d, $(TEST_SRC), $(CPPUTEST_OBJS_DIR))
STUFF_TO_CLEAN = $(OBJ) $(TEST_OBJ) $(DEP_FILES) $(DEP_TEST_FILES) $(TARGET_LIB)
#Don't create CRT dependencies when we're cleaning, for instance
ifeq (0, $(words $(findstring $(MAKECMDGOALS), $(NODEPS))))
-include $(DEP_FILES)
endif
STUFF_TO_CLEAN += $(OUTFILE) $(MAPFILE)
all: $(CPPUTEST_OBJS_DIR)/$(OUTFILE)
echo Done!
$(TARGET_LIB): $(OBJ) | $(CPPUTEST_LIB_DIR)
echo Building application library $@
$(AR) $(ARFLAGS) --create $@ $^
$(CPPUTEST_OBJS_DIR)/$(OUTFILE): $(TEST_OBJ) $(CPPUTEST_LIB) $(TARGET_LIB) | ROM.sct Makefile
echo Linking!
$(LD) $(CPPUTEST_LDFLAGS) $^ --scatter $(LDSCRIPT) --list $(MAPFILE) -o $@
.PHONY: prog
prog: $(CPPUTEST_OBJS_DIR)/$(HEXFILE)
$(JFLASH) -openprj$(JFLASHPRJ) -open$< -auto -exit
$(CPPUTEST_OBJS_DIR)/$(HEXFILE): $(CPPUTEST_OBJS_DIR)/$(OUTFILE)
echo Converting to Motorola S19
$(FROMELF) --m32 --output=$@ $<
debug:
echo
echo "Target Source files:"
$(call debug_print_list,$(SRC))
echo "Target Object files:"
$(call debug_print_list,$(OBJ))
echo "All Input Dependency files:"
$(call debug_print_list,$(DEP_FILES))
echo Stuff to clean:
$(call debug_print_list,$(STUFF_TO_CLEAN))
echo Includes:
$(call debug_print_list,$(INCLUDES))
echo Directories to create:
$(call debug_print_list,$(OBJS_DIRS))
echo Directories of CppUTest object files:
$(call debug_print_list,$(OBJS_DIR))
#Don't create dependencies when we're cleaning, for instance
ifeq (0, $(words $(findstring $(MAKECMDGOALS), $(NODEPS))))
-include $(DEP_FILES)
endif
OBJS_DIRS =$(sort $(dir $(STUFF_TO_CLEAN)))
$(LIB_DIR) $(OBJS_DIRS):
echo Updating directory $@
$(MKDIR) -p $@
#This is the rule for creating the dependency files
$(CPPUTEST_OBJS_DIR)/%.d: %.c Makefile | $(OBJS_DIRS)
echo Compiling C file $< for dependency. Out file $@.
$(CC) $(DEPFLAGS) $< --depend=$@ --depend_target='$(patsubst %.d,%.o,$@)'
$(CPPUTEST_OBJS_DIR)/%.d: %.cpp Makefile | $(OBJS_DIRS)
echo Compiling C++ file $< for dependency. Out file $@.
$(CC) $(DEPFLAGS) $< --depend=$@ --depend_target='$(patsubst %.d,%.o,$@)'
$(CPPUTEST_OBJS_DIR)/%.d: %.cc Makefile | $(OBJS_DIRS)
echo Compiling CC++ file $< for dependency. Out file $@.
$(CC) $(DEPFLAGS) $< --depend=$@ --depend_target='$(patsubst %.d,%.o,$@)'
#This rule does the compilation C++ files
$(CPPUTEST_OBJS_DIR)/%.o: %.cpp $(CPPUTEST_OBJS_DIR)/%.d
echo Compiling C++ file $<. Out file $@
$(CC) $(CPPUTEST_CPPFLAGS) $< -o $@
#This rule does the compilation CC++ files
$(CPPUTEST_OBJS_DIR)/%.o: %.cc $(CPPUTEST_OBJS_DIR)/%.d
echo Compiling CC++ file $<. Out file $@
$(CC) $(CPPUTEST_CPPFLAGS) $< -o $@
#This rule does the compilation C files
$(CPPUTEST_OBJS_DIR)/%.o: %.c $(CPPUTEST_OBJS_DIR)/%.d
echo Compiling C file $<. Out file $@
$(CC) $(CPPUTEST_CPPFLAGS) $< -o $@
clean:
$(RM) -f $(STUFF_TO_CLEAN)

View File

@@ -0,0 +1,7 @@
bss memory usage for std::cout is about 12248 bytes
Library cpp_ts(ios.o) needs two big regions of 7472 and 4104 bytes and other
small regions.
More than 8k needed for statically created arrays with size
SetPointerPlugin::MAX_SET

View File

@@ -0,0 +1,55 @@
Sample project to test CppUTest for Keil MDK-ARM toolchain and AT91SAM7A3 chip.
Requirements:
1. CYGWIN (rm.exe, mkdir.exe, make.exe)
2. Keil MDK-ARM
3. JLink Flash (for programming chip)
4. serial connection to DBGU interface
5. 4 MHz quartz. If else, need to be adjusted in
$(CPPUTEST_HOME)/platforms_startup/armcc/AT91SAM7A3/SAM7A3.asm
(for setup PLL and change core clock from IRC to PLL)
and
$(CPPUTEST_HOME)/platforms_startup/armcc/AT91SAM7A3/Retarget.c
(for _clock_init() function working correctly)
6. eclipse + gdb server from JLink + arm-none-eabi-gdb from GNU ARM Tools Embedded
For debug only.
First, you need to compile CppUTest and target startup library:
make -C ../../../platforms/armcc
make -C ../../../platforms_startup/armcc/AT91SAM7A3
Second, you need to write tests. As example, I use
$(CPPUTEST_HOME)/examples/AllTests/CircularBufferTest.cpp.
All test from $(CPPUTEST_HOME)/examples/AllTests/ needs to many
RAM (chip does not have such).
Third, you need to make executable:
make all
Fourth, you need to program executable on target chip:
make prog
Project use semihosting, so you may use standard printf() or std::cout << "Hello!"
If problems with heap or low memory, adjust heap size in
$(CPPUTEST_HOME)/platforms_startup/armcc/AT91SAM7A3/SAM7A3.asm
and rebuild startup library.
Startup library uses standard Keil MDK-ARM license.
Eclipse project is tested in eclipse Kepler, eclipse Luna.
You need to adjust some environment variables in "C/C++ Build" tab in
properties window for project.
"CPPUTEST_HOME" is a path to root of CppUTest
"KEIL_DIR" is a path to ARM C/C++ compiler
"PATH" there is need to add path to make.exe
Eclipse project use plugin "GDB Hardware Debugger" to debug, so for debug
you may install "GDB Hardware Debugger" and gdb client (from
GNU ARM Tools Embedded) or create your own debug configuration
(for exampe, use eclipse plugin from Keil MDK-ARM installation; no need to
install other plugins and toolchains).

View File

@@ -0,0 +1,34 @@
#! armcc -E
; code upper need to use #define
;-------------------------------------------------------------------------------------
; Keil scatter loading file
; For AT91SAM7A3
;-------------------------------------------------------------------------------------
#define FLASH_START (0x00100000)
#define FLASH_END (0x00140000)
#define FLASH_SIZE (FLASH_END-FLASH_START)
; Internal SRAM
#define RAM_START 0x00200000
#define RAM_END 0x00208000
#define RAM_SIZE (RAM_END-RAM_START)
; Load region for main program
LR1 FLASH_START FLASH_SIZE {
ER2 FLASH_START {
*.o(.reset, +First)
*.o(InRoot$$Sections)
*.o(+RO)
}
ER5 RAM_START RAM_SIZE {
*.o(+RW +ZI)
*.o(STACK)
}
}
/*----------------------------------------------------------------------------*/

View File

@@ -0,0 +1,14 @@
See objs/app/app.htm for details about stack sizes for functions and call tree.
Stack usage for std::cout << (double) is about 1336 bytes
Stack usage for CppUTest is at least 4368 bytes with call chain:
main ->
CommandLineTestRunner::RunAllTests(int, char**) ->
CommandLineTestRunner::RunAllTests(int, const char**) ->
MemoryLeakWarningPlugin::MemoryLeakWarningPlugin(const SimpleString&, MemoryLeakDetector*) ->
MemoryLeakWarningPlugin::getGlobalDetector() ->
MemoryLeakDetector::MemoryLeakDetector(MemoryLeakFailure*) ->
MemoryLeakDetectorTable::MemoryLeakDetectorTable() ->
__aeabi_vec_ctor_nocookie_nodtor
Maximum stack consumption for constructor MemoryLeakDetector::MemoryLeakDetector(MemoryLeakFailure*)

View File

@@ -0,0 +1 @@
start "JLink GDB Server" "C:\Program Files (x86)\SEGGER\JLink_V490b\JLinkGDBServerCL.exe" -device AT91SAM7A3

View File

@@ -0,0 +1,34 @@
/*
* Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the <organization> nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE EARLIER MENTIONED AUTHORS ''AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "CppUTest/CommandLineTestRunner.h"
int main(int ac, char** av)
{
return RUN_ALL_TESTS(ac, av);
}