diff options
author | barthess <barthess@yandex.ru> | 2016-08-18 11:26:04 +0300 |
---|---|---|
committer | barthess <barthess@yandex.ru> | 2016-08-18 11:26:04 +0300 |
commit | 3c3bf8cb1c95c6214137503264712af4c62ccce5 (patch) | |
tree | 5e4e3dc49b4fbaedd91e25c647c7851b2ac6a6b3 /testhal/STM32/STM32F4xx | |
parent | 80b50d393583a60cecd14cbd49884983d4fb5cbb (diff) | |
download | ChibiOS-Contrib-3c3bf8cb1c95c6214137503264712af4c62ccce5.tar.gz ChibiOS-Contrib-3c3bf8cb1c95c6214137503264712af4c62ccce5.tar.bz2 ChibiOS-Contrib-3c3bf8cb1c95c6214137503264712af4c62ccce5.zip |
[STM32 NAND] Updated testhal.
Diffstat (limited to 'testhal/STM32/STM32F4xx')
-rw-r--r-- | testhal/STM32/STM32F4xx/FSMC_NAND/.cproject | 86 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/FSMC_NAND/main.c | 22 |
2 files changed, 86 insertions, 22 deletions
diff --git a/testhal/STM32/STM32F4xx/FSMC_NAND/.cproject b/testhal/STM32/STM32F4xx/FSMC_NAND/.cproject index d5451e0..034a4fc 100644 --- a/testhal/STM32/STM32F4xx/FSMC_NAND/.cproject +++ b/testhal/STM32/STM32F4xx/FSMC_NAND/.cproject @@ -1,33 +1,79 @@ <?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"> - <cconfiguration id="0.1641850078"> - <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1641850078" moduleId="org.eclipse.cdt.core.settings" name="Default"> + <cconfiguration id="0.114656749"> + <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.114656749" moduleId="org.eclipse.cdt.core.settings" name="Default"> <externalSettings/> <extensions> - <extension id="org.eclipse.cdt.core.GASErrorParser" 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.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> <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"/> </extensions> </storageModule> <storageModule moduleId="cdtBuildSystem" version="4.0.0"> - <configuration buildProperties="" description="" id="0.1641850078" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg"> - <folderInfo id="0.1641850078." name="/" resourcePath=""> - <toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.380813788" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain"> - <targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.380813788.1187386790" name=""/> - <builder id="org.eclipse.cdt.build.core.settings.default.builder.1142711675" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/> - <tool id="org.eclipse.cdt.build.core.settings.holder.libs.1750637121" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/> - <tool id="org.eclipse.cdt.build.core.settings.holder.736586711" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder"> - <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1939618102" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> + <configuration artifactName="${ProjName}" buildProperties="" description="" id="0.114656749" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg"> + <folderInfo id="0.114656749." name="/" resourcePath=""> + <toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1182750861" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain"> + <targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1182750861.169007201" name=""/> + <builder autoBuildTarget="all" cleanBuildTarget="clean" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="org.eclipse.cdt.build.core.settings.default.builder.579570726" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/> + <tool id="org.eclipse.cdt.build.core.settings.holder.libs.2143276802" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/> + <tool id="org.eclipse.cdt.build.core.settings.holder.1873650595" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder"> + <option id="org.eclipse.cdt.build.core.settings.holder.incpaths.535757245" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath"> + <listOptionValue builtIn="false" value="/opt/arm-none-eabi/arm-none-eabi/include"/> + <listOptionValue builtIn="false" value=""/opt/arm-none-eabi/lib/gcc/arm-none-eabi/${GCC_VERSION}/include""/> + <listOptionValue builtIn="false" value=""/opt/arm-none-eabi/lib/gcc/arm-none-eabi/${GCC_VERSION}/include-fixed""/> + </option> + <option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.2028171354" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths" valueType="undefIncludePath"> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5"/> + <listOptionValue builtIn="false" value="/usr/include"/> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/backward"/> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include"/> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include-fixed"/> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/x86_64-pc-linux-gnu"/> + </option> + <option id="org.eclipse.cdt.build.core.settings.holder.symbols.1664799820" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols"> + <listOptionValue builtIn="false" value="__cplusplus=201103L"/> + </option> + <option id="org.eclipse.cdt.build.core.settings.holder.undef.symbols.1757987937" superClass="org.eclipse.cdt.build.core.settings.holder.undef.symbols" valueType="undefDefinedSymbols"> + <listOptionValue builtIn="false" value="__cplusplus"/> + </option> + <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1337802279" 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 id="org.eclipse.cdt.build.core.settings.holder.309923753" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder"> - <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1871197231" 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 id="org.eclipse.cdt.build.core.settings.holder.1707090075" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder"> + <option id="org.eclipse.cdt.build.core.settings.holder.incpaths.189144103" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath"> + <listOptionValue builtIn="false" value="/opt/arm-none-eabi/arm-none-eabi/include"/> + <listOptionValue builtIn="false" value=""/opt/arm-none-eabi/lib/gcc/arm-none-eabi/${GCC_VERSION}/include""/> + <listOptionValue builtIn="false" value=""/opt/arm-none-eabi/lib/gcc/arm-none-eabi/${GCC_VERSION}/include-fixed""/> + <listOptionValue builtIn="false" value=""/opt/arm-none-eabi/arm-none-eabi/include/c++/${GCC_VERSION}""/> + </option> + <option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.711122711" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths" valueType="undefIncludePath"> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5"/> + <listOptionValue builtIn="false" value="/usr/include"/> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/backward"/> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include"/> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include-fixed"/> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/x86_64-pc-linux-gnu"/> + </option> + <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.338985256" 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 id="org.eclipse.cdt.build.core.settings.holder.1841372361" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder"> - <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1747701731" 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 id="org.eclipse.cdt.build.core.settings.holder.1165165914" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder"> + <option id="org.eclipse.cdt.build.core.settings.holder.incpaths.143231825" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath"> + <listOptionValue builtIn="false" value="/opt/arm-none-eabi/arm-none-eabi/include"/> + <listOptionValue builtIn="false" value=""/opt/arm-none-eabi/lib/gcc/arm-none-eabi/${GCC_VERSION}/include""/> + <listOptionValue builtIn="false" value=""/opt/arm-none-eabi/lib/gcc/arm-none-eabi/${GCC_VERSION}/include-fixed""/> + </option> + <option id="org.eclipse.cdt.build.core.settings.holder.undef.incpaths.1282112545" name="Undefined Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.undef.incpaths" valueType="undefIncludePath"> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5"/> + <listOptionValue builtIn="false" value="/usr/include"/> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/backward"/> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include"/> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include-fixed"/> + <listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/x86_64-pc-linux-gnu"/> + </option> + <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.714476670" 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> @@ -41,12 +87,10 @@ </storageModule> <storageModule moduleId="scannerConfiguration"> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> - <scannerConfigBuildInfo instanceId="0.1570569554"> + <scannerConfigBuildInfo instanceId="0.114656749"> <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/> </scannerConfigBuildInfo> - <scannerConfigBuildInfo instanceId="0.1641850078"> - <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> - </scannerConfigBuildInfo> </storageModule> <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> + <storageModule moduleId="refreshScope"/> </cproject> diff --git a/testhal/STM32/STM32F4xx/FSMC_NAND/main.c b/testhal/STM32/STM32F4xx/FSMC_NAND/main.c index 29b2dfb..e75a937 100644 --- a/testhal/STM32/STM32F4xx/FSMC_NAND/main.c +++ b/testhal/STM32/STM32F4xx/FSMC_NAND/main.c @@ -124,7 +124,7 @@ static time_measurement_t tmu_driver_start; /* * */ -static bitmap_word_t badblock_map_array[BAD_MAP_LEN]; +static bitmap_word_t badblock_map_array[BAD_MAP_LEN]; static bitmap_t badblock_map = { badblock_map_array, BAD_MAP_LEN @@ -429,6 +429,26 @@ static void general_test (NANDDriver *nandp, size_t first, } } + /* check fail status */ + for (block=first; block<last; block++){ + if (!nandIsBad(nandp, block)){ + if (!is_erased(nandp, block)){ + op_status = nandErase(nandp, block); + osalDbgCheck(0 == (op_status & 1)); /* operation failed */ + } + pattern_fill(); + op_status = nandWritePageData(nandp, block, 0, + nand_buf, nandp->config->page_data_size, &wecc); + osalDbgCheck(0 == (op_status & 1)); + + pattern_fill(); + op_status = nandWritePageData(nandp, block, 0, + nand_buf, nandp->config->page_data_size, &wecc); + /* operation must failed here because of write in unerased space */ + osalDbgCheck(1 == (op_status & 1)); + } + } + /* write block with pattern, read it back and compare */ for (block=first; block<last; block++){ red_led_toggle(); |