mirror of
https://github.com/pvvx/RTL00_WEB.git
synced 2024-12-25 07:25:17 +00:00
update
This commit is contained in:
parent
8529849a5a
commit
d1e4ee31f1
70 changed files with 523 additions and 2274 deletions
52
.cproject
52
.cproject
|
@ -14,12 +14,15 @@
|
|||
<extension id="org.eclipse.cdt.core.GCCErrorParser" 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.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.autotools.core.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="default Makefile" id="cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404." name="/" resourcePath="">
|
||||
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.288622836" name="Cross ARM GCC" superClass="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base">
|
||||
<toolChain id="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base.288622836" name="Cross ARM GCC">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1378006318" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.829811693" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" value="arm-none-eabi-" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.suffix.340953338" name="Suffix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.suffix"/>
|
||||
|
@ -90,13 +93,13 @@
|
|||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.prof.1137517500" name="Generate prof information (-p)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.prof"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.gprof.494604134" name="Generate gprof information (-pg)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.gprof"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.other.378060659" name="Other debugging flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.other"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1171651449" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||
<builder arguments="-s" buildPath="${workspace_loc:/${ProjName}/project/realtek_ameba1_va0_example/GCC-RELEASE}" command="mingw32-make.exe" enableAutoBuild="true" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1928881956" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="ilg.gnuarmeclipse.managedbuild.cross.builder"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1867136583" name="Cross ARM GNU Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1171651449" isAbstract="false" osList="all"/>
|
||||
<builder arguments="-s" buildPath="${workspace_loc:/${ProjName}/project/realtek_ameba1_va0_example/GCC-RELEASE}" command="mingw32-make.exe" enableAutoBuild="true" id="ilg.gnuarmeclipse.managedbuild.cross.builder.1928881956" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1867136583" name="Cross ARM GNU Assembler">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.803936844" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1206727361" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1206727361"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1390387922" name="Cross ARM C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1390387922" name="Cross ARM C Compiler">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.19053491" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="CONFIG_PLATFORM_8195A"/>
|
||||
<listOptionValue builtIn="false" value="GCC_ARMCM3"/>
|
||||
|
@ -104,9 +107,9 @@
|
|||
<listOptionValue builtIn="false" value="M3"/>
|
||||
<listOptionValue builtIn="false" value="F_CPU=166666666L"/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1624349386" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1624349386"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1640084941" name="Cross ARM C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1640084941" name="Cross ARM C++ Compiler">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs.200080958" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.defs" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="CONFIG_PLATFORM_8195A"/>
|
||||
<listOptionValue builtIn="false" value="GCC_ARMCM3"/>
|
||||
|
@ -114,28 +117,28 @@
|
|||
<listOptionValue builtIn="false" value="M3"/>
|
||||
<listOptionValue builtIn="false" value="F_CPU=166666666L"/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.421691648" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input"/>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.input.421691648"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.1126132436" name="Cross ARM C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.1126132436" name="Cross ARM C Linker">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.1106277337" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.714231139" name="Cross ARM C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.714231139" name="Cross ARM C++ Linker">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.978736090" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.1430020536" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input">
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.input.1430020536">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.818134961" name="Cross ARM GNU Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.798774812" name="Cross ARM GNU Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.1234603622" name="Cross ARM GNU Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.818134961" name="Cross ARM GNU Archiver"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.798774812" name="Cross ARM GNU Create Flash Image"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.1234603622" name="Cross ARM GNU Create Listing">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.81472388" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.193012888" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.976059339" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.1492594993" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.1056294869" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.250341025" name="Cross ARM GNU Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.250341025" name="Cross ARM GNU Print Size">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.459793684" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
|
@ -161,6 +164,9 @@
|
|||
<extension id="org.eclipse.cdt.core.GCCErrorParser" 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.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.autotools.core.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
@ -658,10 +664,10 @@
|
|||
<useDefaultCommand>false</useDefaultCommand>
|
||||
<runAllBuilders>false</runAllBuilders>
|
||||
</target>
|
||||
<target name="flashburn" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<target name="flash_images" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>mingw32-make.exe</buildCommand>
|
||||
<buildArguments>-s</buildArguments>
|
||||
<buildTarget>flashburn</buildTarget>
|
||||
<buildTarget>flash_images</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>false</runAllBuilders>
|
||||
|
@ -714,10 +720,10 @@
|
|||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="flashwebfs" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<target name="flash_webfs" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>mingw32-make.exe</buildCommand>
|
||||
<buildArguments>-s</buildArguments>
|
||||
<buildTarget>flashwebfs</buildTarget>
|
||||
<buildTarget>flash_webfs</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
|
@ -738,10 +744,10 @@
|
|||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>false</runAllBuilders>
|
||||
</target>
|
||||
<target name="flashboot" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<target name="flash_boot" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>mingw32-make.exe</buildCommand>
|
||||
<buildArguments>-s</buildArguments>
|
||||
<buildTarget>flashboot</buildTarget>
|
||||
<buildTarget>flash_boot</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
|
|
1
.project
1
.project
|
@ -13,7 +13,6 @@
|
|||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-345699648253489852" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings Cross ARM" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-478329893757" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings Cross ARM" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-345699648253489852" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings Cross ARM" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-478329893757" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings Cross ARM" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-398605508023043995" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings Cross ARM" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-478329893757" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings Cross ARM" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
|
|
@ -13,7 +13,7 @@ environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404.18534
|
|||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404.1853483235/PATH/value=${TL_PATH}\\bin;${MINGW_HOME}\\mingw64\\bin;${MINGW_HOME}\\bin;${MSYS_HOME}\\bin;${OCD_PATH};C\:/Program Files (x86)/Java/jre1.8.0_101/bin/client;C\:/Program Files (x86)/Java/jre1.8.0_101/bin;C\:/Program Files (x86)/Java/jre1.8.0_101/lib/i386;C\:\\MinGW\\mingw64\\bin;C\:\\MinGW\\msys\\1.0\\bin;C\:\\MinGW\\bin;D\:\\MCU\\STMicroelectronics\\st_toolset\\asm;C\:\\Python27;C\:\\Utils\\FarUtils;C\:\\Utils\\FarUtils\\HIEW810;C\:\\Windows;C\:\\Windows\\system32;C\:\\Windows\\System32\\Wbem;C\:\\Windows\\System32\\WindowsPowerShell\\v1.0;D\:\\MCU\\Microchip\\xc32\\v1.42\\bin;D\:\\MCU\\Microchip\\mplabc30\\v3.31\\bin;D\:\\MCU\\Microchip\\MPLAB C32 Suite\\bin;D\:\\MCU\\Microchip\\mplabc32\\v1.12\\bin;D\:\\MCU\\Microchip\\mcc18\\mpasm;D\:\\MCU\\Microchip\\mcc18\\bin;D\:\\WRK\\TortoiseGit\\bin;C\:\\Utils\\TortoiseSVN\\binC\:\\Program Files (x86)\\Git\\cmd;C\:\\Program Files (x86)\\Borland\\Delphi7\\Bin;C\:\\Program Files (x86)\\Borland\\Delphi7\\Projects\\Bpl\\;C\:\\Program Files (x86)\\Common Files\\Microsoft Shared\\Windows Live;C\:\\Program Files (x86)\\ATI Technologies\\ATI.ACE\\Core-Static;C\:\\Program Files (x86)\\Common Files\\Acronis\\SnapAPI;C\:\\Program Files (x86)\\Windows Live\\Shared;C\:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin;C\:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit;C\:\\Program Files (x86)\\Microsoft SDKs\\TypeScript\\1.0;C\:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin;C\:\\Program Files\\Microsoft SQL Server\\110\\Tools\\Binn;C\:\\Program Files\\Common Files\\Microsoft Shared\\Windows Live;C\:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn;C\:\\Program Files\\Microsoft DNX\\Dnvm;C\:\\Program Files\\IVI Foundation\\VISA\\Win64\\Bin;D\:\\Automation\\Samcoon\\SKWorkshop\\Marco\\HMI\\bin;D\:\\Automation\\Samcoon\\SKWorkshop\\Marco\\X86\\bin;D\:\\Automation\\Samcoon\\SK035AE\\SKWorkshop\\Marco\\HMI\\bin;D\:\\Automation\\Samcoon\\SK035AE\\SKWorkshop\\Marco\\X86\\bin;C\:\\Users\\PVV\\.dnx\\bin;C\:\\ProgramData\\chocolatey\\bin;C\:\\ProgramData\\Oracle\\Java\\javapath;C\:\\Program Files (x86)\\QuickTime\\QTSystem;C\:\\Program Files\\nodejs;D\:\\WRK\\TortoiseGit\\bin;C\:\\Utils\\TortoiseSVN\\bin;C\:\\Program Files (x86)\\Git\\cmd;D\:\\MentorGraphics\\Sourcery_CodeBench_Lite_for_MIPS_ELF\\bin;C\:\\Eclipse
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404.1853483235/TL_PATH/delimiter=;
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404.1853483235/TL_PATH/operation=replace
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404.1853483235/TL_PATH/value=D\:\\MCU\\GNU_Tools_ARM_Embedded\\6.2017-q1-update
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404.1853483235/TL_PATH/value=D\:\\MCU\\GNU_Tools_ARM_Embedded\\7.2017-q4-major
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404.1853483235/append=true
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404.1853483235/appendContributed=true
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404/MINGW_HOME/delimiter=;
|
||||
|
@ -30,7 +30,7 @@ environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404/PATH/
|
|||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404/PATH/value=${TL_PATH}\\bin;${MINGW_HOME}\\mingw64\\bin;${MINGW_HOME}\\bin;${MSYS_HOME}\\bin;${OCD_PATH};C\:/Program Files (x86)/Java/jre1.8.0_101/bin/client;C\:/Program Files (x86)/Java/jre1.8.0_101/bin;C\:/Program Files (x86)/Java/jre1.8.0_101/lib/i386;C\:\\MinGW\\mingw64\\bin;C\:\\MinGW\\msys\\1.0\\bin;C\:\\MinGW\\bin;D\:\\MCU\\STMicroelectronics\\st_toolset\\asm;C\:\\Python27;C\:\\Utils\\FarUtils;C\:\\Utils\\FarUtils\\HIEW810;C\:\\Windows;C\:\\Windows\\system32;C\:\\Windows\\System32\\Wbem;C\:\\Windows\\System32\\WindowsPowerShell\\v1.0;D\:\\MCU\\Microchip\\xc32\\v1.42\\bin;D\:\\MCU\\Microchip\\mplabc30\\v3.31\\bin;D\:\\MCU\\Microchip\\MPLAB C32 Suite\\bin;D\:\\MCU\\Microchip\\mplabc32\\v1.12\\bin;D\:\\MCU\\Microchip\\mcc18\\mpasm;D\:\\MCU\\Microchip\\mcc18\\bin;D\:\\WRK\\TortoiseGit\\bin;C\:\\Utils\\TortoiseSVN\\binC\:\\Program Files (x86)\\Git\\cmd;C\:\\Program Files (x86)\\Borland\\Delphi7\\Bin;C\:\\Program Files (x86)\\Borland\\Delphi7\\Projects\\Bpl\\;C\:\\Program Files (x86)\\Common Files\\Microsoft Shared\\Windows Live;C\:\\Program Files (x86)\\ATI Technologies\\ATI.ACE\\Core-Static;C\:\\Program Files (x86)\\Common Files\\Acronis\\SnapAPI;C\:\\Program Files (x86)\\Windows Live\\Shared;C\:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin;C\:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit;C\:\\Program Files (x86)\\Microsoft SDKs\\TypeScript\\1.0;C\:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin;C\:\\Program Files\\Microsoft SQL Server\\110\\Tools\\Binn;C\:\\Program Files\\Common Files\\Microsoft Shared\\Windows Live;C\:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn;C\:\\Program Files\\Microsoft DNX\\Dnvm;C\:\\Program Files\\IVI Foundation\\VISA\\Win64\\Bin;D\:\\Automation\\Samcoon\\SKWorkshop\\Marco\\HMI\\bin;D\:\\Automation\\Samcoon\\SKWorkshop\\Marco\\X86\\bin;D\:\\Automation\\Samcoon\\SK035AE\\SKWorkshop\\Marco\\HMI\\bin;D\:\\Automation\\Samcoon\\SK035AE\\SKWorkshop\\Marco\\X86\\bin;C\:\\Users\\PVV\\.dnx\\bin;C\:\\ProgramData\\chocolatey\\bin;C\:\\ProgramData\\Oracle\\Java\\javapath;C\:\\Program Files (x86)\\QuickTime\\QTSystem;C\:\\Program Files\\nodejs;D\:\\WRK\\TortoiseGit\\bin;C\:\\Utils\\TortoiseSVN\\bin;C\:\\Program Files (x86)\\Git\\cmd;D\:\\MentorGraphics\\Sourcery_CodeBench_Lite_for_MIPS_ELF\\bin;C\:\\Eclipse
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404/TL_PATH/delimiter=;
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404/TL_PATH/operation=replace
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404/TL_PATH/value=D\:\\MCU\\GNU_Tools_ARM_Embedded\\6.2017-q1-update
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404/TL_PATH/value=D\:\\MCU\\GNU_Tools_ARM_Embedded\\7.2017-q4-major
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404/append=true
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.debug.1273936404/appendContributed=true
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.510381534/MINGW_HOME/delimiter=;
|
||||
|
@ -47,6 +47,6 @@ environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.510381534/PATH
|
|||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.510381534/PATH/value=${TL_PATH}\\bin;${MINGW_HOME}\\mingw64\\bin;${MINGW_HOME}\\bin;${MSYS_HOME}\\bin;${OCD_PATH};C\:/Program Files (x86)/Java/jre1.8.0_101/bin/client;C\:/Program Files (x86)/Java/jre1.8.0_101/bin;C\:/Program Files (x86)/Java/jre1.8.0_101/lib/i386;C\:\\MinGW\\mingw64\\bin;C\:\\MinGW\\msys\\1.0\\bin;C\:\\MinGW\\bin;D\:\\MCU\\STMicroelectronics\\st_toolset\\asm;C\:\\Python27;C\:\\Utils\\FarUtils;C\:\\Utils\\FarUtils\\HIEW810;C\:\\Windows;C\:\\Windows\\system32;C\:\\Windows\\System32\\Wbem;C\:\\Windows\\System32\\WindowsPowerShell\\v1.0;D\:\\MCU\\Microchip\\xc32\\v1.42\\bin;D\:\\MCU\\Microchip\\mplabc30\\v3.31\\bin;D\:\\MCU\\Microchip\\MPLAB C32 Suite\\bin;D\:\\MCU\\Microchip\\mplabc32\\v1.12\\bin;D\:\\MCU\\Microchip\\mcc18\\mpasm;D\:\\MCU\\Microchip\\mcc18\\bin;D\:\\WRK\\TortoiseGit\\bin;C\:\\Utils\\TortoiseSVN\\binC\:\\Program Files (x86)\\Git\\cmd;C\:\\Program Files (x86)\\Borland\\Delphi7\\Bin;C\:\\Program Files (x86)\\Borland\\Delphi7\\Projects\\Bpl\\;C\:\\Program Files (x86)\\Common Files\\Microsoft Shared\\Windows Live;C\:\\Program Files (x86)\\ATI Technologies\\ATI.ACE\\Core-Static;C\:\\Program Files (x86)\\Common Files\\Acronis\\SnapAPI;C\:\\Program Files (x86)\\Windows Live\\Shared;C\:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin;C\:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit;C\:\\Program Files (x86)\\Microsoft SDKs\\TypeScript\\1.0;C\:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin;C\:\\Program Files\\Microsoft SQL Server\\110\\Tools\\Binn;C\:\\Program Files\\Common Files\\Microsoft Shared\\Windows Live;C\:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn;C\:\\Program Files\\Microsoft DNX\\Dnvm;C\:\\Program Files\\IVI Foundation\\VISA\\Win64\\Bin;D\:\\Automation\\Samcoon\\SKWorkshop\\Marco\\HMI\\bin;D\:\\Automation\\Samcoon\\SKWorkshop\\Marco\\X86\\bin;D\:\\Automation\\Samcoon\\SK035AE\\SKWorkshop\\Marco\\HMI\\bin;D\:\\Automation\\Samcoon\\SK035AE\\SKWorkshop\\Marco\\X86\\bin;C\:\\Users\\PVV\\.dnx\\bin;C\:\\ProgramData\\chocolatey\\bin;C\:\\ProgramData\\Oracle\\Java\\javapath;C\:\\Program Files (x86)\\QuickTime\\QTSystem;C\:\\Program Files\\nodejs;D\:\\WRK\\TortoiseGit\\bin;C\:\\Utils\\TortoiseSVN\\bin;C\:\\Program Files (x86)\\Git\\cmd;D\:\\MentorGraphics\\Sourcery_CodeBench_Lite_for_MIPS_ELF\\bin;C\:\\Eclipse
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.510381534/TL_PATH/delimiter=;
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.510381534/TL_PATH/operation=replace
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.510381534/TL_PATH/value=D\:\\MCU\\GNU_Tools_ARM_Embedded\\6.2017-q1-update
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.510381534/TL_PATH/value=D\:\\MCU\\GNU_Tools_ARM_Embedded\\7.2017-q4-major
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.510381534/append=true
|
||||
environment/project/cdt.managedbuild.config.gnu.mingw.exe.release.510381534/appendContributed=true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
cd flasher
|
||||
cd USDK\flasher
|
||||
openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "load_ram_binary RTL00Console_ROM.bin 0x10000BA8" -c "exit"
|
||||
rem -c "shutdown"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
cd flasher
|
||||
openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "adapter_khz 1000" -c "rtl8710_flash_read ../fullflash.bin 0 2097152" -c "shutdown"
|
||||
cd USDK\flasher
|
||||
openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "adapter_khz 1000" -c "rtl8710_flash_read ../../fullflash.bin 0 2097152" -c "shutdown"
|
||||
echo flash read fullflash.bin
|
||||
pause
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
@cd flasher
|
||||
@cd USDK\flasher
|
||||
openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "restart_from_falsh" -c "shutdown"
|
||||
rem
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
cd flasher
|
||||
openocd -f interface/cmsis-dap.cfg -c "adapter_khz 3500" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" -c "rtl8710_flash_write fullflash.bin 0" -c "shutdown"
|
||||
cd USDK\flasher
|
||||
openocd -f interface/cmsis-dap.cfg -c "adapter_khz 3500" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" -c "rtl8710_flash_write ../../fullflash.bin 0" -c "shutdown"
|
||||
pause
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<label for="FixNone">Float</label>
|
||||
<input type="button" id="butSave" value="Save data.csv"><br>
|
||||
Window: <span id='wdsize'>?</span> sec, Sample Rate: <span id='smprate'>?</span> smps
|
||||
<div id='labdiv' style=></div>
|
||||
<div id='labdiv' style="text-align: center;"></div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
|
@ -56,7 +56,7 @@ function wsping() {
|
|||
ws.send('adc*');
|
||||
wstt = setTimeout(wsping, 400);
|
||||
}
|
||||
var wsUri = 'ws://rtl871x1/web.cgi'
|
||||
var wsUri = 'ws://rtl871x0/web.cgi'
|
||||
//var wsUri = "ws://"+window.location.host.toString()+"/web.cgi";
|
||||
ws = new WebSocket(wsUri);
|
||||
ws.binaryType = 'arraybuffer';
|
||||
|
|
|
@ -56,7 +56,7 @@ function wsping() {
|
|||
ws.send('adc*');
|
||||
wstt = setTimeout(wsping, 400);
|
||||
}
|
||||
var wsUri = 'ws://rtl871x1/web.cgi'
|
||||
var wsUri = 'ws://rtl871x0/web.cgi'
|
||||
//var wsUri = "ws://"+window.location.host.toString()+"/web.cgi";
|
||||
ws = new WebSocket(wsUri);
|
||||
ws.binaryType = 'arraybuffer';
|
||||
|
|
|
@ -3,27 +3,22 @@
|
|||
<head>
|
||||
<link rel="stylesheet" href="ina2.css">
|
||||
<title>Get data INA219</title>
|
||||
<script type="text/javascript" src="dygraph.js"></script>
|
||||
<script type="text/javascript" src="dygraph.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width:1000px; height:500px;">
|
||||
<div id="div_v" style="width:100%; height:400px;"></div>
|
||||
<p style="text-align: center;">
|
||||
<div style="height: auto; width: auto; text-align: center;">
|
||||
<div id="div_v" style="height:400px;"></div>
|
||||
<input type="button" id="butOnOff" value="Stop">
|
||||
<input type="radio" name='rm1' id="FixEnd"/>
|
||||
<input type="radio" checked name='rm1' id="FixEnd"/>
|
||||
<label for="FixEnd">Fixed</label>
|
||||
<input type="radio" checked name='rm1' id="FixNone"/>
|
||||
<label for="FixNone">Float</label><br>
|
||||
Window: <span id='wdsize'>?</span> sec<br>
|
||||
Sample Rate: <span id='smprate'>?</span> smps
|
||||
</p>
|
||||
<div id='labdiv' style="text-align: center;"></div>
|
||||
<input type="radio" name='rm1' id="FixNone"/>
|
||||
<label for="FixNone">Float</label>
|
||||
<input type="button" id="butSave" value="Save data.csv"><br>
|
||||
Window: <span id='wdsize'>?</span> sec, Sample Rate: <span id='smprate'>?</span> smps
|
||||
<div id='labdiv'></div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var $ = function(id) {
|
||||
return document.getElementById(id);
|
||||
}
|
||||
var $ = function(id) { return document.getElementById(id);}
|
||||
var stg = 0;
|
||||
var smprate = 963.4; // 1819;
|
||||
var smps = smprate;
|
||||
|
@ -44,13 +39,13 @@ $("butOnOff").onclick = function() {
|
|||
}
|
||||
var datau = [];
|
||||
var gu;
|
||||
//window.onresize= function(){// alert('Ðàçìåðû div #Test èçìåíåíû.');}
|
||||
function wsping() {
|
||||
clearTimeout(wstt);
|
||||
ws.send('ina219');
|
||||
wstt = setTimeout(wsping, 500);
|
||||
wstt = setTimeout(wsping, 150);
|
||||
}
|
||||
ws = new WebSocket('ws://rtl871x0/web.cgi');
|
||||
//ws = new WebSocket("ws://"+window.location.host.toString()+"/web.cgi");
|
||||
ws.binaryType = 'arraybuffer';
|
||||
ws.onopen = function(){ ws.send('user=rtl871x:supervisor'); ws.send('sys_debug=0'); wstt = setTimeout(wsping, 50);};
|
||||
ws.onmessage = function (event) {
|
||||
|
@ -83,19 +78,12 @@ ws.onmessage = function (event) {
|
|||
datau,
|
||||
{
|
||||
title: 'U & I (INA219)',
|
||||
// rightGap: 250,
|
||||
showRangeSelector: true,
|
||||
// drawPoints: true,
|
||||
// rollPeriod: 10,
|
||||
// errorBars: true,
|
||||
// fillGraph: true,
|
||||
showRoller: true,
|
||||
// maxNumberWidth: 10,
|
||||
xlabel: 'T(sec)',
|
||||
ylabel: 'U(V)',
|
||||
y2label: 'I(mA)',
|
||||
colors: ['rgb(51,204,204)','rgb(255,100,100)'],
|
||||
// highlightSeriesOpts: { strokeWidth: 2 },
|
||||
series : { 'I': { axis: 'y2' } },
|
||||
axes: {
|
||||
x: {valueFormatter: function(x){return this.getLabels()[0] + ': '+ x.toPrecision(5);}},
|
||||
|
@ -103,9 +91,8 @@ ws.onmessage = function (event) {
|
|||
y2: {valueRange: [0,]}},
|
||||
labels: ['T', 'U', 'I'],
|
||||
labelsDiv: $('labdiv'),
|
||||
legend: 'always', // "follow"
|
||||
legend: 'always',
|
||||
digitsAfterDecimal: 3,
|
||||
// legendFormatter: legendFormatter
|
||||
});
|
||||
setInterval(function(){renderChart()}, 50);
|
||||
stg = 1;
|
||||
|
@ -118,7 +105,6 @@ function wsSmpRate() {
|
|||
$('smprate').innerHTML = smps.toFixed(1);
|
||||
}
|
||||
var renderChart = function() {
|
||||
// $('div_v').style.height = (window.innerHeight-180) + 'px';
|
||||
var dl;
|
||||
if (gu.dateWindow_) {
|
||||
dl = gu.dateWindow_[1] - gu.dateWindow_[0];
|
||||
|
@ -134,6 +120,41 @@ var renderChart = function() {
|
|||
$("wdsize").innerHTML = dl.toFixed(3);
|
||||
if(rend) gu.updateOptions({'file': datau});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
function convertArrayOfObjectsToCSV(value){
|
||||
var result, ctr, keys, columnDelimiter, lineDelimiter, data;
|
||||
data = value.data || null;
|
||||
if (data == null || !data.length) {return null;}
|
||||
columnDelimiter = value.columnDelimiter || ';';
|
||||
lineDelimiter = value.lineDelimiter || '\n';
|
||||
keys = Object.keys(data[1]);
|
||||
result = '';
|
||||
result += keys.join(columnDelimiter);
|
||||
result += lineDelimiter;
|
||||
data.forEach(function(item){
|
||||
ctr = 0;
|
||||
keys.forEach(function(key){
|
||||
if (ctr > 0)
|
||||
result += columnDelimiter;
|
||||
result += item[key];
|
||||
ctr++;
|
||||
});
|
||||
result += lineDelimiter;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
$("butSave").onclick = function() {
|
||||
var csv = convertArrayOfObjectsToCSV({data: datau});
|
||||
if (!csv.match(/^data:text\/csv/i)) {csv = 'data:text/csv;charset=utf-8,' + csv;}
|
||||
var encodedUri = encodeURI(csv);
|
||||
var link = document.createElement('a');
|
||||
link.setAttribute('href', encodedUri);
|
||||
link.setAttribute('download',"data.csv");
|
||||
link.click();
|
||||
}
|
||||
if(window.innerHeight > 320) $('div_v').style.height = (window.innerHeight-100) + 'px';
|
||||
window.onresize = function(){
|
||||
if(window.innerHeight > 320) $('div_v').style.height = (window.innerHeight-100) + 'px';
|
||||
// $('div_v').style.width = (window.innerWidth-50) + 'px';
|
||||
}
|
||||
</script></body>
|
||||
</html>
|
||||
|
|
|
@ -78,7 +78,7 @@ function draw() {
|
|||
frend++;
|
||||
requestAnimationFrame(draw);
|
||||
}
|
||||
var wsUri = 'ws://rtl871x1/web.cgi'
|
||||
var wsUri = 'ws://rtl871x0/web.cgi'
|
||||
//var wsUri = "ws://"+window.location.host.toString()+"/web.cgi";
|
||||
ws = new WebSocket(wsUri);
|
||||
ws.binaryType = 'arraybuffer';
|
||||
|
|
|
@ -89,7 +89,7 @@ function draw() {
|
|||
frend++;
|
||||
requestAnimationFrame(draw);
|
||||
}
|
||||
var wsUri = 'ws://rtl871x1/web.cgi'
|
||||
var wsUri = 'ws://rtl871x0/web.cgi'
|
||||
//var wsUri = "ws://"+window.location.host.toString()+"/web.cgi";
|
||||
ws = new WebSocket(wsUri);
|
||||
ws.binaryType = 'arraybuffer';
|
||||
|
|
BIN
FarMenu.ini
Normal file
BIN
FarMenu.ini
Normal file
Binary file not shown.
|
@ -1,3 +1,3 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
start JLink.exe -Device CORTEX-M3 -If SWD -Speed 4000 flasher\RTL00ConsoleROM.JLinkScript
|
||||
start JLink.exe -Device CORTEX-M3 -If SWD -Speed 4000 USDK\flasher\RTL00ConsoleROM.JLinkScript
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
JLink.exe -Device CORTEX-M3 -If SWD -Speed 10000 flasher/RTL_FFlash.JLinkScript
|
||||
JLink.exe -Device CORTEX-M3 -If SWD -Speed 10000 USDK/flasher/RTL_FFlash.JLinkScript
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
JLink.exe -Device CORTEX-M3 -If SWD -Speed 1000 flasher\RTL_Reset.JLinkScript
|
||||
JLink.exe -Device CORTEX-M3 -If SWD -Speed 1000 USDK\flasher\RTL_Reset.JLinkScript
|
||||
|
|
20
Makefile
20
Makefile
|
@ -20,13 +20,12 @@ clean:
|
|||
clean_all:
|
||||
@$(MAKE) -f $(SDK_PATH)sdkbuild.mk clean_all
|
||||
|
||||
.PHONY: flashburn runram reset test readfullflash flashwebfs flashboot
|
||||
flashboot:
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk flashboot
|
||||
|
||||
flashburn:
|
||||
#JLinkGDB-WrFlash.bat
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk flashburn
|
||||
.PHONY: flash_images runram reset test readfullflash flash_webfs flash_boot
|
||||
flash_boot:
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk flash_boot
|
||||
|
||||
flash_images:
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk flash_images
|
||||
|
||||
flash_OTA:
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk flash_OTA
|
||||
|
@ -34,11 +33,10 @@ flash_OTA:
|
|||
webfs:
|
||||
@$(MAKE) -f webfs.mk
|
||||
|
||||
flashwebfs:
|
||||
@$(MAKE) -f webfs.mk
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk flashwebfs
|
||||
flash_webfs: webfs
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk flash_webfs
|
||||
#JLinkGDB-WrWebFs.bat
|
||||
|
||||
|
||||
runram:
|
||||
#JLink-RunRAM.bat
|
||||
@$(MAKE) --f $(SDK_PATH)flasher.mk runram
|
||||
|
|
|
@ -20,42 +20,29 @@ clean:
|
|||
clean_all:
|
||||
@$(MAKE) -f $(SDK_PATH)sdkbuild.mk clean_all
|
||||
|
||||
.PHONY: flashburn runram reset test readfullflash flashwebfs flashboot
|
||||
flashboot:
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk flashboot
|
||||
|
||||
flashburn:
|
||||
#JLinkGDB-WrFlash.bat
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk flashburn
|
||||
.PHONY: flash_images runram reset test readfullflash flash_webfs flash_boot
|
||||
flash_boot:
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk flash_boot
|
||||
|
||||
flash_images:
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk flash_images
|
||||
|
||||
flash_OTA:
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk flash_OTA
|
||||
|
||||
|
||||
webfs:
|
||||
@$(MAKE) -f webfs.mk
|
||||
|
||||
flashwebfs:
|
||||
@$(MAKE) -f webfs.mk
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk flashwebfs
|
||||
#JLinkGDB-WrWebFs.bat
|
||||
|
||||
runram:
|
||||
#JLink-RunRAM.bat
|
||||
@$(MAKE) --f $(SDK_PATH)flasher.mk runram
|
||||
|
||||
runsdram:
|
||||
#JLink-RunRAM.bat
|
||||
@$(MAKE) --f $(SDK_PATH)flasher.mk runsdram
|
||||
|
||||
reset:
|
||||
#JLink-Reset.bat
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk reset
|
||||
|
||||
test:
|
||||
JLink-RTL00ConsoleROM.bat
|
||||
#@make -f flasher.mk test
|
||||
|
||||
readfullflash:
|
||||
#JLink-RdFullFlash.bat
|
||||
@$(MAKE) -f $(SDK_PATH)flasher.mk readfullflash
|
||||
|
||||
|
|
|
@ -518,7 +518,7 @@ int wifi_connect(
|
|||
struct {
|
||||
u8 bssid[ETH_ALEN + 2];
|
||||
void * p;
|
||||
} bs = { 0 };
|
||||
} bs;
|
||||
memcpy(bs.bssid, pWifi->bssid.octet, ETH_ALEN);
|
||||
for(int i = 0; i < ETH_ALEN; i++) {
|
||||
flg += bs.bssid[i];
|
||||
|
@ -529,6 +529,9 @@ int wifi_connect(
|
|||
}
|
||||
else {
|
||||
use_bssid = 1;
|
||||
bs.bssid[ETH_ALEN] = 0;
|
||||
bs.bssid[ETH_ALEN+1] = 0;
|
||||
bs.p = 0;
|
||||
wext_set_bssid(WLAN0_NAME, bs.bssid);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,7 +75,8 @@ int32_t spi_master_write_stream(spi_t *obj, char *tx_buffer, uint32_t length);
|
|||
int32_t spi_master_write_read_stream(spi_t *obj, char *tx_buffer,
|
||||
char *rx_buffer, uint32_t length);
|
||||
int32_t spi_slave_read_stream_timeout(spi_t *obj, char *rx_buffer, uint32_t length, uint32_t timeout_ms);
|
||||
|
||||
void spi_flush_rx_fifo (spi_t *obj);
|
||||
void spi_set_tmod(spi_t *obj, SSI_CTRLR0_TMOD tmod); // 0 Read & Write, 1 Write only, 2 Read Only
|
||||
#ifdef CONFIG_GDMA_EN
|
||||
int32_t spi_slave_read_stream_dma(spi_t *obj, char *rx_buffer, uint32_t length);
|
||||
int32_t spi_slave_write_stream_dma(spi_t *obj, char *tx_buffer, uint32_t length);
|
||||
|
|
|
@ -28,7 +28,7 @@ s8 spdio_tx_done_cb(void *padapter, u8 *data, u16 offset, u16 pktsize, u8 type){
|
|||
|
||||
|
||||
s8 spdio_tx(struct spdio_t *obj, struct spdio_buf_t *pbuf){
|
||||
extern s8 HalSdioRxCallback(PHAL_SDIO_ADAPTER pSDIODev, VOID *pData, u16 Offset, u16 PktSize, u8 CmdType);
|
||||
//extern s8 HalSdioRxCallback(PHAL_SDIO_ADAPTER pSDIODev, VOID *pData, u16 Offset, u16 PktSize, u8 CmdType);
|
||||
return HalSdioRxCallback((u8 *)pbuf, 0, pbuf->buf_size, pbuf->type); // ?????????
|
||||
}
|
||||
|
||||
|
|
|
@ -554,6 +554,7 @@ int32_t spi_master_write_stream(spi_t *obj, char *tx_buffer, uint32_t length)
|
|||
pHalSsiOp = &obj->spi_op;
|
||||
|
||||
obj->state |= SPI_STATE_TX_BUSY;
|
||||
|
||||
/* as Master mode, sending data will receive data at sametime, so we need to
|
||||
drop those received dummy data */
|
||||
if ((ret=pHalSsiOp->HalSsiWriteInterrupt(pHalSsiAdaptor, (u8 *) tx_buffer, length)) != HAL_OK) {
|
||||
|
@ -562,6 +563,14 @@ int32_t spi_master_write_stream(spi_t *obj, char *tx_buffer, uint32_t length)
|
|||
return ret;
|
||||
}
|
||||
|
||||
VOID HalSsiTModRtl8195a(VOID *Adaptor, SSI_CTRLR0_TMOD tmod);
|
||||
// SSI_CTRLR0_TMOD tmod
|
||||
void spi_set_tmod(spi_t *obj, SSI_CTRLR0_TMOD tmod)
|
||||
{
|
||||
PHAL_SSI_ADAPTOR pHalSsiAdaptor = &obj->spi_adp;
|
||||
HalSsiTModRtl8195a(pHalSsiAdaptor, tmod);
|
||||
}
|
||||
|
||||
// Master mode write a sequence of data by interrupt mode
|
||||
// The length unit is byte, for both 16-bits and 8-bits mode
|
||||
int32_t spi_master_write_read_stream(spi_t *obj, char *tx_buffer,
|
||||
|
|
|
@ -165,9 +165,9 @@ time_t sntp_gen_system_time(int timezone)
|
|||
|
||||
sntp_get_lasttime(&update_sec, &update_usec, &update_tick);
|
||||
|
||||
unsigned int current_tick = xTaskGetTickCount();
|
||||
|
||||
if(update_tick) {
|
||||
unsigned int current_tick = xTaskGetTickCount();
|
||||
long tick_diff_sec, tick_diff_ms;
|
||||
|
||||
tick_diff_sec = (current_tick - update_tick) / configTICK_RATE_HZ;
|
||||
|
@ -176,10 +176,9 @@ time_t sntp_gen_system_time(int timezone)
|
|||
update_usec += (tick_diff_ms * 1000);
|
||||
current_sec = update_sec + update_usec / 1000000 + timezone * 3600;
|
||||
}
|
||||
else {
|
||||
// else {
|
||||
// current_sec = current_tick / configTICK_RATE_HZ;
|
||||
current_sec = update_usec;
|
||||
}
|
||||
// }
|
||||
return current_sec;
|
||||
/*
|
||||
current_tm = *(localtime(¤t_sec));
|
||||
|
|
|
@ -13,27 +13,27 @@
|
|||
|
||||
/*
|
||||
* in hal_platform.h
|
||||
#define BITBAND_REG_BASE 0x40001000
|
||||
#define GPIO_REG_BASE 0x40001000
|
||||
*/
|
||||
|
||||
/*
|
||||
* in rtl8195a_gpio.h
|
||||
*
|
||||
#define BITBAND_PORTA_DR 0x00 // data register
|
||||
#define BITBAND_PORTA_DDR 0x04 // data direction
|
||||
#define BITBAND_PORTA_CTRL 0x08 // data source control, we should keep it as default: data source from software
|
||||
#define REG_PORTA_DR 0x00 // data register
|
||||
#define REG_PORTA_DDR 0x04 // data direction
|
||||
#define REG_PORTA_CTRL 0x08 // data source control, we should keep it as default: data source from software
|
||||
|
||||
#define BITBAND_PORTB_DR 0x0c // data register
|
||||
#define BITBAND_PORTB_DDR 0x10 // data direction
|
||||
#define BITBAND_PORTB_CTRL 0x14 // data source control, we should keep it as default: data source from software
|
||||
#define REG_PORTB_DR 0x0c // data register
|
||||
#define REG_PORTB_DDR 0x10 // data direction
|
||||
#define REG_PORTB_CTRL 0x14 // data source control, we should keep it as default: data source from software
|
||||
|
||||
#define BITBAND_PORTC_DR 0x18 // data register
|
||||
#define BITBAND_PORTC_DDR 0x1c // data direction
|
||||
#define BITBAND_PORTC_CTRL 0x20 // data source control, we should keep it as default: data source from software
|
||||
#define REG_PORTC_DR 0x18 // data register
|
||||
#define REG_PORTC_DDR 0x1c // data direction
|
||||
#define REG_PORTC_CTRL 0x20 // data source control, we should keep it as default: data source from software
|
||||
|
||||
#define BITBAND_EXT_PORTA 0x50 // GPIO IN read or OUT read back
|
||||
#define BITBAND_EXT_PORTB 0x54 // GPIO IN read or OUT read back
|
||||
#define BITBAND_EXT_PORTC 0x58 // GPIO IN read or OUT read back
|
||||
#define REG_EXT_PORTA 0x50 // GPIO IN read or OUT read back
|
||||
#define REG_EXT_PORTB 0x54 // GPIO IN read or OUT read back
|
||||
#define REG_EXT_PORTC 0x58 // GPIO IN read or OUT read back
|
||||
*/
|
||||
|
||||
#define BITBAND_PERI_REF 0x40000000
|
||||
|
@ -147,7 +147,8 @@
|
|||
volatile uint8_t * BitBandAddr(void *addr, uint8_t bit);
|
||||
volatile uint8_t * BitBandPeriAddr(void *addr, uint8_t bit);
|
||||
volatile uint8_t * GetOutPinBitBandAddr(PinName pin);
|
||||
#define GetDirPinBitBandAddr(pin) (GetOutPinBitBandAddr(pin) + 4*32)
|
||||
volatile uint8_t * GetInPinBitBandAddr(PinName pin);
|
||||
volatile uint8_t * HardSetPin(PinName pin, HAL_GPIO_PIN_MODE pmode, uint8_t val);
|
||||
volatile uint8_t * HardSetPin(PinName pin, HAL_GPIO_PIN_MODE pmode, uint8_t val); /* return pointer bit out register */
|
||||
|
||||
#endif // _BITBAND_IO_H_
|
||||
|
|
|
@ -794,6 +794,15 @@ VOID HalSsiTxFIFOThresholdRtl8195a(VOID *Adaptor, u32 txftl)
|
|||
HAL_SSI_WRITE32(Index, REG_DW_SSI_TXFTLR, TxftlrValue);
|
||||
}
|
||||
|
||||
VOID HalSsiTModRtl8195a(VOID *Adaptor, SSI_CTRLR0_TMOD tmod)
|
||||
{
|
||||
PHAL_SSI_ADAPTOR pHalSsiAdaptor = (PHAL_SSI_ADAPTOR) Adaptor;
|
||||
u8 Index = pHalSsiAdaptor->Index;
|
||||
/* REG_DW_SSI_CTRLR0 */
|
||||
u32 Ctrlr0Value = HAL_SSI_READ32(Index, REG_DW_SSI_CTRLR0) & BIT_INVC_CTRLR0_TMOD;
|
||||
Ctrlr0Value |= BIT_CTRLR0_TMOD(pHalSsiAdaptor->TransferMode);
|
||||
HAL_SSI_WRITE32(Index, REG_DW_SSI_CTRLR0, Ctrlr0Value);
|
||||
}
|
||||
|
||||
HAL_Status
|
||||
HalSsiIntWriteRtl8195a(
|
||||
|
|
|
@ -45,14 +45,15 @@ volatile uint8_t * HardSetPin(PinName pin, HAL_GPIO_PIN_MODE pmode, uint8_t val)
|
|||
extern HAL_GPIO_ADAPTER gBoot_Gpio_Adapter;
|
||||
_pHAL_Gpio_Adapter = &gBoot_Gpio_Adapter;
|
||||
}
|
||||
if(_pHAL_Gpio_Adapter->Gpio_Func_En == 0) GPIO_FuncOn_8195a();
|
||||
wait_us(100);
|
||||
// delayMicroseconds(100);
|
||||
if(_pHAL_Gpio_Adapter->Gpio_Func_En == 0) {
|
||||
GPIO_FuncOn_8195a();
|
||||
HalDelayUs(100); // delayMicroseconds(100); wait_us(100);
|
||||
}
|
||||
// paddr = 0x42000000 + (0x40001000 + 0x0c * (ippin >> 5) - 0x40000000) * 32 + ((ippin & 0x1f) * 4);
|
||||
#if CONFIG_DEBUG_LOG > 3
|
||||
GpioFunctionChk(ippin, ENABLE);
|
||||
#endif
|
||||
GPIO_PullCtrl_8195a(ippin, HAL_GPIO_HIGHZ); // Make the pin pull control default as High-Z
|
||||
GPIO_PullCtrl_8195a(pin, HAL_GPIO_HIGHZ); // Make the pin pull control default as High-Z
|
||||
paddr = BitBandPeriAddr((void *)(GPIO_REG_BASE + GPIO_PORTB_DR * (ippin >> 5)), ippin & 0x1f);
|
||||
*paddr = val; // data register
|
||||
HAL_GPIO_PIN gpio;
|
||||
|
@ -61,7 +62,7 @@ volatile uint8_t * HardSetPin(PinName pin, HAL_GPIO_PIN_MODE pmode, uint8_t val)
|
|||
HAL_GPIO_Init_8195a(&gpio);
|
||||
*paddr = val; // data register
|
||||
// paddr[(GPIO_PORTB_DDR - GPIO_PORTB_DR) * 32] = pmode == DOUT_PUSH_PULL; // data direction
|
||||
// GPIO_PullCtrl_8195a(ippin, pmode); // set GPIO_PULL_CTRLx
|
||||
// GPIO_PullCtrl_8195a(pin, pmode); // set GPIO_PULL_CTRLx
|
||||
// paddr[(GPIO_PORTB_CTRL - GPIO_PORTB_DR) * 32] = 0; // data source control, we should keep it as default: data source from software
|
||||
}
|
||||
return paddr;
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
* ram_libgloss_retarget.o
|
||||
* pvvx 2016
|
||||
*/
|
||||
|
||||
#ifdef SWO_DEBUG_OUT_ENA
|
||||
#include "device.h"
|
||||
#endif
|
||||
#include "rtl_bios_data.h"
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
|
||||
|
@ -86,6 +87,15 @@ char *ram_libgloss_sbrk(int incr) {
|
|||
return prev_heap_end;
|
||||
}
|
||||
|
||||
#ifdef SWO_DEBUG_OUT_ENA
|
||||
//----- ram_libgloss_write()
|
||||
int ram_libgloss_write(int file, const char *ptr, int len) {
|
||||
int i;
|
||||
for (i = 0; i < len; ++i)
|
||||
ITM_SendChar(ptr[i]);
|
||||
return len;
|
||||
}
|
||||
#else
|
||||
//----- ram_libgloss_write()
|
||||
int ram_libgloss_write(int file, const char *ptr, int len) {
|
||||
int i;
|
||||
|
@ -93,6 +103,7 @@ int ram_libgloss_write(int file, const char *ptr, int len) {
|
|||
HalSerialPutcRtl8195a(ptr[i]);
|
||||
return len;
|
||||
}
|
||||
#endif
|
||||
|
||||
//----- ram_libgloss_open()
|
||||
int ram_libgloss_open(char *file, int flags, int mode) {
|
||||
|
@ -115,6 +126,9 @@ int ram_libgloss_open(char *file, int flags, int mode) {
|
|||
|
||||
//----- init_rom_libgloss_ram_map()
|
||||
void init_rom_libgloss_ram_map(void) {
|
||||
#ifdef SWO_DEBUG_OUT_ENA
|
||||
//#error @TODO: Not init SWO!
|
||||
#endif
|
||||
rom_libgloss_ram_map.libgloss_close = ram_libgloss_close;
|
||||
rom_libgloss_ram_map.libgloss_fstat = ram_libgloss_fstat;
|
||||
rom_libgloss_ram_map.libgloss_isatty = ram_libgloss_isatty;
|
||||
|
|
221
USDK/flasher.mk
221
USDK/flasher.mk
|
@ -4,81 +4,33 @@ include userset.mk
|
|||
include $(SDK_PATH)paths.mk
|
||||
include project.mk
|
||||
#---------------------------
|
||||
#FLASHER = stlink-v2-1
|
||||
#FLASHER = stlink-v2
|
||||
FLASHER ?= Jlink
|
||||
JLINK_PATH ?= D:/MCU/SEGGER/JLink_V612i/
|
||||
#---------------------------
|
||||
# Default
|
||||
#---------------------------
|
||||
# TARGET dirs
|
||||
TARGET ?= build
|
||||
OBJ_DIR ?= build/obj
|
||||
BIN_DIR ?= build/bin
|
||||
ELFFILE ?= $(OBJ_DIR)/$(TARGET).axf
|
||||
FLASHER_TYPE ?= Jlink
|
||||
FLASHER_PATH ?= $(SDK_PATH)flasher/
|
||||
FLASHER_SPEED ?= 1000 # Start speed 1000 kHz
|
||||
#---------------------------
|
||||
# Compilation tools
|
||||
CROSS_COMPILE ?= $(GCC_PATH)arm-none-eabi-
|
||||
AR ?= $(CROSS_COMPILE)ar
|
||||
CC ?= $(CROSS_COMPILE)gcc
|
||||
AS ?= $(CROSS_COMPILE)as
|
||||
NM ?= $(CROSS_COMPILE)nm
|
||||
LD ?= $(CROSS_COMPILE)gcc
|
||||
GDB ?= $(CROSS_COMPILE)gdb
|
||||
SIZE ?= $(CROSS_COMPILE)size
|
||||
OBJCOPY ?= $(CROSS_COMPILE)objcopy
|
||||
OBJDUMP ?= $(CROSS_COMPILE)objdump
|
||||
|
||||
# Make bunary tools
|
||||
TOOLS_PATH ?= component/soc/realtek/8195a/misc/iar_utility/common/tools/
|
||||
ifneq ($(shell uname), Linux)
|
||||
EXE = .exe
|
||||
endif
|
||||
PICK = $(TOOLS_PATH)pick$(EXE)
|
||||
PADDING = $(TOOLS_PATH)padding$(EXE)
|
||||
CHCKSUM = $(TOOLS_PATH)checksum$(EXE)
|
||||
IMAGETOOL = $(TOOLS_PATH)rtlaimage$(EXE)
|
||||
|
||||
IMAGETOOL ?= $(PYTHON) $(SDK_PATH)rtlaimage.py
|
||||
#---------------------------
|
||||
# openocd tools
|
||||
OPENOCD = $(OPENOCD_PATH)openocd.exe
|
||||
|
||||
JLINK_GDB ?= JLinkGDBServer.exe
|
||||
OPENOCD ?= d:/MCU/OpenOCD/bin/openocd.exe
|
||||
#---------------------------
|
||||
# jlink tools
|
||||
JLINK_PATH ?= D:/MCU/SEGGER/JLink_V612i/
|
||||
JLINK_EXE ?= JLink.exe
|
||||
|
||||
ifeq ($(FLASHER), Jlink)
|
||||
# Jlink FLASHER_SPEED ..4000 kHz
|
||||
FLASHER_SPEED ?= 3500
|
||||
else
|
||||
ifeq ($(FLASHER),stlink-v2)
|
||||
# stlink-v2 FLASHER_SPEED ..1800 kHz
|
||||
FLASHER_SPEED ?= 1800
|
||||
else
|
||||
# over FLASHER_SPEED ..1000 kHz ?
|
||||
FLASHER_SPEED ?= 1000
|
||||
endif
|
||||
endif
|
||||
|
||||
# COMPILED_BOOT if defined -> extract image1, boot head in elf
|
||||
COMPILED_BOOT=1
|
||||
# COMPILED_BOOT_BIN if !defined -> use source startup boot
|
||||
#COMPILED_BOOT_BIN=1
|
||||
# PADDINGSIZE defined -> image2 OTA
|
||||
PADDINGSIZE =44k
|
||||
JLINK_GDB ?= JLinkGDBServer.exe
|
||||
|
||||
NMAPFILE = $(OBJ_DIR)/$(TARGET).nmap
|
||||
|
||||
#FLASHER_PATH ?= flasher/
|
||||
|
||||
#RAM_IMAGE?= $(BIN_DIR)/ram.bin
|
||||
|
||||
RAM1_IMAGE ?= $(BIN_DIR)/ram_1.bin
|
||||
RAM1P_IMAGE ?= $(BIN_DIR)/ram_1.p.bin
|
||||
|
||||
RAM2_IMAGE = $(BIN_DIR)/ram_2.bin
|
||||
RAM2P_IMAGE = $(BIN_DIR)/ram_2.p.bin
|
||||
RAM2_IMAGE ?= $(BIN_DIR)/ram_2.bin
|
||||
RAM2P_IMAGE ?= $(BIN_DIR)/ram_2.p.bin
|
||||
|
||||
RAM3_IMAGE = $(BIN_DIR)/sdram.bin
|
||||
RAM3P_IMAGE = $(BIN_DIR)/sdram.p.bin
|
||||
RAM3_IMAGE ?= $(BIN_DIR)/sdram.bin
|
||||
RAM3P_IMAGE ?= $(BIN_DIR)/sdram.p.bin
|
||||
|
||||
FLASH_IMAGE = $(BIN_DIR)/ram_all.bin
|
||||
OTA_IMAGE = $(BIN_DIR)/ota.bin
|
||||
|
@ -89,8 +41,8 @@ mp: FLASH_IMAGE = $(BIN_DIR)/ram_all_mp.bin
|
|||
mp: OTA_IMAGE = $(BIN_DIR)/ota_mp.bin
|
||||
|
||||
|
||||
.PHONY: genbin flashburn reset test readfullflash flashboot flashwebfs flash_OTA runram runsdram
|
||||
.NOTPARALLEL: all mp genbin flashburn reset test readfullflash _endgenbin flashwebfs flash_OTA
|
||||
.PHONY: genbin flashburn reset test readfullflash flash_boot flash_webfs flash_OTA flash_images runram runsdram
|
||||
.NOTPARALLEL: all mp genbin flashburn reset test readfullflash _endgenbin flash_webfs flash_OTA flash_images
|
||||
|
||||
all: $(ELFFILE) $(FLASH_IMAGE) _endgenbin
|
||||
mp: $(ELFFILE) $(FLASH_IMAGE) _endgenbin
|
||||
|
@ -110,9 +62,6 @@ $(NMAPFILE): $(ELFFILE)
|
|||
$(FLASH_IMAGE):$(ELFFILE)
|
||||
@echo "==========================================================="
|
||||
$(IMAGETOOL) -a -r -o $(BIN_DIR)/ $(ELFFILE)
|
||||
ifdef USE_SDRAM
|
||||
@cat $(RAM3P_IMAGE) >> $(RAM2P_IMAGE)
|
||||
endif
|
||||
|
||||
_endgenbin:
|
||||
@echo "-----------------------------------------------------------"
|
||||
|
@ -123,16 +72,58 @@ _endgenbin:
|
|||
ifeq ($(FLASHER_TYPE), Jlink)
|
||||
|
||||
reset:
|
||||
@$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed 1000 $(FLASHER_PATH)RTL_Reset.JLinkScript
|
||||
@$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed $(FLASHER_SPEED) $(FLASHER_PATH)RTL_Reset.JLinkScript
|
||||
|
||||
runram:
|
||||
$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed 1000 $(FLASHER_PATH)RTL_RunRAM.JLinkScript
|
||||
@$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed $(FLASHER_SPEED) $(FLASHER_PATH)RTL_RunRAM.JLinkScript
|
||||
|
||||
runsdram:
|
||||
$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed 1000 $(FLASHER_PATH)RTL_RunRAM_SDR.JLinkScript
|
||||
@$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed $(FLASHER_SPEED) $(FLASHER_PATH)RTL_RunRAM_SDR.JLinkScript
|
||||
|
||||
readfullflash:
|
||||
@$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed 1000 $(FLASHER_PATH)RTL_FFlash.JLinkScript
|
||||
@$(JLINK_PATH)$(JLINK_EXE) -Device CORTEX-M3 -If SWD -Speed $(FLASHER_SPEED) $(FLASHER_PATH)RTL_FFlash.JLinkScript
|
||||
|
||||
|
||||
flash_boot:
|
||||
@echo define call1>$(FLASHER_PATH)file_info.jlink
|
||||
@echo set '$$'ImageSize = $(shell printf '0x%X\n' $$(stat --printf="%s" $(RAM1P_IMAGE))>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo set '$$'ImageAddr = 0x000000>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo end>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo define call2>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo FlasherWrite $(RAM2P_IMAGE) '$$'ImageAddr '$$'ImageSize>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo end>>$(FLASHER_PATH)file_info.jlink
|
||||
@cmd /K start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed $(FLASHER_SPEED)
|
||||
@$(GDB) -x $(FLASHER_PATH)gdb_wrfile.jlink
|
||||
|
||||
flash_images:
|
||||
@cmd /K start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed $(FLASHER_SPEED)
|
||||
@$(GDB) -x $(FLASHER_PATH)gdb_images.jlink
|
||||
|
||||
flash_OTA:
|
||||
@cmd /K start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed $(FLASHER_SPEED)
|
||||
@$(GDB) -x $(FLASHER_PATH)gdb_ota.jlink
|
||||
|
||||
flash_webfs:
|
||||
@echo define call1>$(FLASHER_PATH)file_info.jlink
|
||||
@echo set '$$'ImageSize = $(shell printf '0x%X\n' $$(stat --printf="%s" $(BIN_DIR)/WEBFiles.bin))>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo set '$$'ImageAddr = 0x0D0000>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo end>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo define call2>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo FlasherWrite $(BIN_DIR)/WEBFiles.bin '$$'ImageAddr '$$'ImageSize>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo end>>$(FLASHER_PATH)file_info.jlink
|
||||
@cmd /K start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed $(FLASHER_SPEED)
|
||||
@$(GDB) -x $(FLASHER_PATH)gdb_wrfile.jlink
|
||||
|
||||
flash_espfs:
|
||||
@echo define call1>$(FLASHER_PATH)file_info.jlink
|
||||
@echo set '$$'ImageSize = $(shell printf '0x%X\n' $$(stat --printf="%s" $(BIN_DIR)/webpages.espfs))>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo set '$$'ImageAddr = 0x0D0000>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo end>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo define call2>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo FlasherWrite $(BIN_DIR)/webpages.espfs '$$'ImageAddr '$$'ImageSize>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo end>>$(FLASHER_PATH)file_info.jlink
|
||||
@cmd /K start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed $(FLASHER_SPEED)
|
||||
@$(GDB) -x $(FLASHER_PATH)gdb_wrfile.jlink
|
||||
|
||||
|
||||
flashburn:
|
||||
|
@ -145,119 +136,75 @@ flashburn:
|
|||
@echo define call3>>$(FLASHER_PATH)flash_file.jlink
|
||||
@echo FlasherWrite build/bin/ram_all.bin '$$'Image2Addr '$$'Image2Size>>$(FLASHER_PATH)flash_file.jlink
|
||||
@echo end>>$(FLASHER_PATH)flash_file.jlink
|
||||
@cmd /K start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed 1000
|
||||
@cmd /K start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed $(FLASHER_SPEED)
|
||||
@$(GDB) -x $(FLASHER_PATH)gdb_wrflash.jlink
|
||||
#@taskkill /F /IM $(JLINK_GDBSRV)
|
||||
|
||||
flashboot:
|
||||
@echo define call1>$(FLASHER_PATH)file_info.jlink
|
||||
@echo set '$$'ImageSize = $(shell printf '0x%X\n' $$(stat --printf="%s" $(BIN_DIR)/ram_1.p.bin))>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo set '$$'ImageAddr = 0x000000>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo end>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo define call2>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo FlasherWrite $(BIN_DIR)/ram_1.p.bin '$$'ImageAddr '$$'ImageSize>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo end>>$(FLASHER_PATH)file_info.jlink
|
||||
@cmd /K start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed 1000
|
||||
@$(GDB) -x $(FLASHER_PATH)gdb_wrfile.jlink
|
||||
|
||||
flashwebfs:
|
||||
@echo define call1>$(FLASHER_PATH)file_info.jlink
|
||||
@echo set '$$'ImageSize = $(shell printf '0x%X\n' $$(stat --printf="%s" $(BIN_DIR)/WEBFiles.bin))>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo set '$$'ImageAddr = 0x0D0000>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo end>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo define call2>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo FlasherWrite $(BIN_DIR)/WEBFiles.bin '$$'ImageAddr '$$'ImageSize>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo end>>$(FLASHER_PATH)file_info.jlink
|
||||
@cmd /K start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed 1000
|
||||
@$(GDB) -x $(FLASHER_PATH)gdb_wrfile.jlink
|
||||
#@taskkill /F /IM $(JLINK_GDBSRV)
|
||||
|
||||
flashespfs:
|
||||
@echo define call1>$(FLASHER_PATH)file_info.jlink
|
||||
@echo set '$$'ImageSize = $(shell printf '0x%X\n' $$(stat --printf="%s" $(BIN_DIR)/webpages.espfs))>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo set '$$'ImageAddr = 0x0D0000>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo end>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo define call2>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo FlasherWrite $(BIN_DIR)/webpages.espfs '$$'ImageAddr '$$'ImageSize>>$(FLASHER_PATH)file_info.jlink
|
||||
@echo end>>$(FLASHER_PATH)file_info.jlink
|
||||
@cmd /K start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed 1000
|
||||
@$(GDB) -x $(FLASHER_PATH)gdb_wrfile.jlink
|
||||
#@taskkill /F /IM $(JLINK_GDBSRV)
|
||||
|
||||
|
||||
flash_OTA:
|
||||
@cmd /K start $(JLINK_PATH)$(JLINK_GDBSRV) -device Cortex-M3 -if SWD -ir -endian little -speed 1000
|
||||
@$(GDB) -x $(FLASHER_PATH)gdb_ota.jlink
|
||||
#@taskkill /F /IM $(JLINK_GDBSRV)
|
||||
|
||||
else
|
||||
ifeq ($(FLASHER_TYPE),cmsis-dap)
|
||||
FLASHER:=cmsis-dap
|
||||
|
||||
flashboot:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
flash_boot:
|
||||
@$(OPENOCD) -f interface/$(FLASHER_TYPE).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
|
||||
-c 'rtl8710_flash_write $(RAM1P_IMAGE) 0' \
|
||||
-c 'rtl8710_reboot' -c 'reset run' -c shutdown
|
||||
|
||||
flashburn:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
flash_images:
|
||||
@$(OPENOCD) -f interface/$(FLASHER_TYPE).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
|
||||
-c 'rtl8710_flash_write $(RAM1P_IMAGE) 0' \
|
||||
-c 'rtl8710_flash_write $(RAM2P_IMAGE) 0xb000' \
|
||||
-c 'rtl8710_reboot' -c 'reset run' -c shutdown
|
||||
|
||||
flashimage2p:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
|
||||
-c 'rtl8710_flash_write $(RAM2P_IMAGE) 0xb000' \
|
||||
-c 'rtl8710_flash_write $(OTA_IMAGE) 0x0b000' \
|
||||
-c 'rtl8710_reboot' -c 'reset run' -c shutdown
|
||||
|
||||
flash_OTA:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
@$(OPENOCD) -f interface/$(FLASHER_TYPE).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
|
||||
-c 'rtl8710_flash_write $(RAM2P_IMAGE) 0x80000' \
|
||||
-c 'rtl8710_flash_write $(OTA_IMAGE) 0x80000' \
|
||||
-c 'rtl8710_reboot' -c 'reset run' -c shutdown
|
||||
|
||||
flashwebfs:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
flash_webfs:
|
||||
@$(OPENOCD) -f interface/$(FLASHER_TYPE).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
|
||||
-c 'rtl8710_flash_write $(BIN_DIR)/WEBFiles.bin 0xd0000' \
|
||||
-c 'rtl8710_reboot' -c 'reset run' -c shutdown
|
||||
|
||||
flashespfs:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
@$(OPENOCD) -f interface/$(FLASHER_TYPE).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
|
||||
-c 'rtl8710_flash_write $(BIN_DIR)/webpages.espfs 0xd0000' \
|
||||
-c 'rtl8710_reboot' -c 'reset run' -c shutdown
|
||||
|
||||
reset:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
@$(OPENOCD) -f interface/$(FLASHER_TYPE).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'mww 0x40000210 0x111157' -c 'rtl8710_reboot' -c shutdown
|
||||
|
||||
runram:
|
||||
$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
@$(OPENOCD) -f interface/$(FLASHER_TYPE).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'load_image $(RAM1_IMAGE) 0x10000bc8 bin' \
|
||||
-c 'load_image $(RAM2_IMAGE) 0x10006000 bin' \
|
||||
-c 'mww 0x40000210 0x20111157' -c 'rtl8710_reboot' -c shutdown
|
||||
|
||||
runsdram:
|
||||
@$(OPENOCD) -f interface/$(FLASHER).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
@$(OPENOCD) -f interface/$(FLASHER_TYPE).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'load_image $(RAM1_IMAGE) 0x10000bc8 bin' \
|
||||
-c 'load_image $(RAM2_IMAGE) 0x10006000 bin' \
|
||||
-c 'boot_load_srdam $(RAM3_IMAGE) 0x30000000' \
|
||||
-c shutdown
|
||||
|
||||
endif
|
||||
flashburn:
|
||||
@$(OPENOCD) -f interface/$(FLASHER_TYPE).cfg -c 'transport select swd' -c 'adapter_khz 1000' \
|
||||
-f $(FLASHER_PATH)rtl8710.ocd -c 'init' -c 'reset halt' -c 'adapter_khz $(FLASHER_SPEED)' \
|
||||
-c 'rtl8710_flash_auto_erase 1' -c 'rtl8710_flash_auto_verify 1' \
|
||||
-c 'rtl8710_flash_write $(RAM1P_IMAGE) 0' \
|
||||
-c 'rtl8710_flash_write $(OTA_IMAGE) 0xb000' \
|
||||
-c 'rtl8710_reboot' -c 'reset run' -c shutdown
|
||||
|
||||
endif
|
||||
|
||||
clean:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
cd flasher
|
||||
cd USDK\flasher
|
||||
openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "load_ram_binary RTL00Console_ROM.bin 0x10000BA8" -c "exit"
|
||||
rem -c "shutdown"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
cd flasher
|
||||
openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "adapter_khz 5000" -c "rtl8710_flash_read ../fullflash.bin 0 1048576" -c "shutdown"
|
||||
cd USDK\flasher
|
||||
openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "adapter_khz 1000" -c "rtl8710_flash_read ../../fullflash.bin 0 2097152" -c "shutdown"
|
||||
echo flash read fullflash.bin
|
||||
pause
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
@cd flasher
|
||||
@cd USDK\flasher
|
||||
openocd -f interface/cmsis-dap.cfg -c "adapter_khz 1000" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "restart_from_falsh" -c "shutdown"
|
||||
rem
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
cd flasher
|
||||
openocd -f interface/cmsis-dap.cfg -c "adapter_khz 3500" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" -c "rtl8710_flash_write fullflash.bin 0" -c "shutdown"
|
||||
cd USDK\flasher
|
||||
openocd -f interface/cmsis-dap.cfg -c "adapter_khz 3500" -f rtl8710.ocd -f cortex.ocd -c "init" -c "reset halt" -c "rtl8710_flash_read_id" -c "rtl8710_flash_auto_erase 1" -c "rtl8710_flash_auto_verify 1" -c "rtl8710_flash_write ../../fullflash.bin 0" -c "shutdown"
|
||||
pause
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
start JLink.exe -Device CORTEX-M3 -If SWD -Speed 4000 flasher\RTL00ConsoleROM.JLinkScript
|
||||
start JLink.exe -Device CORTEX-M3 -If SWD -Speed 4000 USDK\flasher\RTL00ConsoleROM.JLinkScript
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
JLink.exe -Device CORTEX-M3 -If SWD -Speed 10000 flasher/RTL_FFlash.JLinkScript
|
||||
JLink.exe -Device CORTEX-M3 -If SWD -Speed 10000 USDK/flasher/RTL_FFlash.JLinkScript
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
JLink.exe -Device CORTEX-M3 -If SWD -Speed 1000 flasher\RTL_Reset.JLinkScript
|
||||
JLink.exe -Device CORTEX-M3 -If SWD -Speed 1000 USDK\flasher\RTL_Reset.JLinkScript
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
start JLinkGDBServer.exe -device Cortex-M3 -if SWD -ir -endian little -speed 1000
|
||||
arm-none-eabi-gdb.exe -x flasher/gdb_init.jlink
|
||||
arm-none-eabi-gdb.exe -x USDK/flasher/gdb_init.jlink
|
||||
taskkill /F /IM JLinkGDBServer.exe
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@echo off
|
||||
call paths.bat
|
||||
taskkill /F /IM openocd.exe
|
||||
start openocd -f interface\Jlink.cfg -f flasher\ameba1.cfg
|
||||
start openocd -f USDK\interface\Jlink.cfg -f flasher\ameba1.cfg
|
||||
|
|
|
@ -1 +1 @@
|
|||
PATH=D:\MCU\GNU_Tools_ARM_Embedded\5.4_2016q2\bin;D:\MCU\SEGGER\JLink_V612i;%PATH%
|
||||
PATH=D:\MCU\GNU_Tools_ARM_Embedded\7.2017-q4-major\bin;D:\MCU\SEGGER\JLink_V630g;D:\MCU\OpenOCD\bin;%PATH%
|
|
@ -1,19 +1,22 @@
|
|||
#---------------------------
|
||||
# User defined (in userset.mk)
|
||||
# Set Paths & Tools
|
||||
#---------------------------
|
||||
SDK_PATH ?= ../SDKRTLA/USDK/
|
||||
#GCC_PATH = d:/MCU/GNU_Tools_ARM_Embedded/6.2017-q1-update/bin/# + or set in PATH
|
||||
OPENOCD_PATH = d:/MCU/OpenOCD/bin/
|
||||
TOOLS_PATH ?= $(SDK_PATH)component/soc/realtek/8195a/misc/iar_utility/common/tools/
|
||||
SDK_PATH ?= ../RTL00_WEB/USDK/
|
||||
#GCC_PATH ?= d:/MCU/GNU_Tools_ARM_Embedded/7.2017-q4-major/bin/# + or set in PATH
|
||||
TOOLS_PATH ?= $(SDK_PATH)
|
||||
|
||||
FLASHER_TYPE ?= Jlink
|
||||
PYTHON27_PATH ?= c:/Python27/
|
||||
#FLASHER_TYPE ?= OCD
|
||||
FLASHER_PATH ?= $(SDK_PATH)flasher/
|
||||
JLINK_PATH ?= D:/MCU/SEGGER/JLink_V612i/
|
||||
JLINK_GDBSRV ?= JLinkGDBServer.exe
|
||||
#---------------------------
|
||||
# Default
|
||||
#---------------------------
|
||||
|
||||
ifneq ($(shell uname), Linux)
|
||||
PYTHON ?= C:/Python27/python
|
||||
OPENOCD ?= d:/MCU/OpenOCD/bin/openocd.exe
|
||||
JLINK_PATH ?= D:/MCU/SEGGER/JLink_V630g/
|
||||
else
|
||||
PYTHON ?= python
|
||||
OPENOCD ?= /mnt/d/MCU/OpenOCD/bin/openocd.exe
|
||||
JLINK_PATH ?= /mnt/d/MCU/SEGGER/JLink_V630g/
|
||||
endif
|
||||
|
||||
# Compilation tools
|
||||
CROSS_COMPILE = $(GCC_PATH)arm-none-eabi-
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
|
@ -32,15 +35,4 @@ OBJ_DIR ?= $(TARGET)/obj
|
|||
BIN_DIR ?= $(TARGET)/bin
|
||||
ELFFILE ?= $(OBJ_DIR)/$(TARGET).axf
|
||||
|
||||
# Make bunary tools
|
||||
ifneq ($(shell uname), Linux)
|
||||
EXE = .exe
|
||||
endif
|
||||
PICK = $(TOOLS_PATH)pick$(EXE)
|
||||
PADDING = $(TOOLS_PATH)padding$(EXE)
|
||||
CHCKSUM = $(TOOLS_PATH)checksum$(EXE)
|
||||
PYTHON = $(PYTHON27)python$(EXE)
|
||||
|
||||
# openocd tools
|
||||
OPENOCD = $(OPENOCD_PATH)openocd
|
||||
|
||||
|
|
|
@ -18,11 +18,6 @@ SRC_C_LIST = $(patsubst sdk/%,$(SDK_PATH)%,$(ADD_SRC_C)) $(patsubst sdk/%,$(SDK_
|
|||
OBJ_LIST = $(addprefix $(OBJ_DIR)/,$(patsubst %.c,%.o,$(SRC_C_LIST)))
|
||||
DEPENDENCY_LIST = $(patsubst %.c,$(OBJ_DIR)/%.d,$(SRC_C_LIST))
|
||||
|
||||
TARGET ?= build
|
||||
OBJ_DIR ?= $(TARGET)/obj
|
||||
BIN_DIR ?= $(TARGET)/bin
|
||||
ELFFILE ?= $(OBJ_DIR)/$(TARGET).axf
|
||||
|
||||
all: prerequirement application
|
||||
mp: prerequirement application
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ all: LIBS +=_rtsp _usbh _usbd
|
|||
mp: LIBS +=_rtsp _usbh _usbd
|
||||
endif
|
||||
# m c nosys gcc
|
||||
PATHLIBS = sdk/component/soc/realtek/8195a/misc/bsp/lib/common/gcc
|
||||
PATHLIBS = sdk/component/soc/realtek/8195a/misc/bsp/lib/common/GCC
|
||||
|
||||
ifdef USE_SDRAM
|
||||
CFLAGS += -DUSE_SDRAM=1
|
||||
|
@ -412,6 +412,10 @@ SRC_C += sdk/component/soc/realtek/8195a/misc/rtl_std_lib/lib_rtlstd/ram_libc.c
|
|||
SRC_C += sdk/component/soc/realtek/8195a/misc/rtl_std_lib/lib_rtlstd/ram_libgloss_retarget.c
|
||||
SRC_C += sdk/component/soc/realtek/8195a/misc/rtl_std_lib/lib_rtlstd/rtl_eabi_cast_ram.c
|
||||
SRC_C += sdk/component/soc/realtek/8195a/misc/rtl_std_lib/lib_rtlstd/rtl_math_ram.c
|
||||
ifdef SWO_DEBUG_OUT_ENA
|
||||
INCLUDES += sdk/component/soc/realtek/8195a/misc/rtl_std_lib/lib_rtlstd
|
||||
SRC_C += sdk/component/soc/realtek/8195a/misc/rtl_std_lib/lib_rtlstd/swo.c
|
||||
endif
|
||||
#if +- nostdlib..
|
||||
ifndef USE_GCC_LIB
|
||||
SRC_C += sdk/component/soc/realtek/8195a/misc/rtl_std_lib/lib_rtlstd/ram_pvvx_libc.c
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
<div class="content">
|
||||
<h2 class="title">Debug and Tests</h2>
|
||||
<p class="center">
|
||||
Chart <a href="/heap.htm">'heap'</a>, <a href="/tst.htm">ST-AP RSSI</a>, <a href="/wso_audio.htm">ADC Audio</a><br><br>
|
||||
Chart: <a href="/heap.htm">'Heap'</a>, <a href="/tst.htm">'ST-AP RSSI'</a>, <a href="/i219ws.htm">'INA219'</a><br>
|
||||
WebSocket: <a href="/wso_audio.htm">'ADC Audio'</a>, <a href="/ws_ina219.htm">'INA219'</a><br>
|
||||
<a href='/protect/timeout.htm?sys_restart=12345'>System Restart</a><br><br>
|
||||
Counter erase the last flash sector config: ~sys_rdec0x980FE000~<br><br>
|
||||
</p>
|
||||
|
|
158
WEBFiles/ws_ina219.htm
Normal file
158
WEBFiles/ws_ina219.htm
Normal file
|
@ -0,0 +1,158 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="ina2.css">
|
||||
<title>Get data INA219</title>
|
||||
<script type="text/javascript" src="dygraph.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div style="height: auto; width: auto; text-align: center;">
|
||||
<div id="div_v" style="height:400px;"></div>
|
||||
<input type="button" id="butOnOff" value="Stop">
|
||||
<input type="radio" checked name='rm1' id="FixEnd"/>
|
||||
<label for="FixEnd">Fixed</label>
|
||||
<input type="radio" name='rm1' id="FixNone"/>
|
||||
<label for="FixNone">Float</label>
|
||||
<input type="button" id="butSave" value="Save data.csv"><br>
|
||||
Window: <span id='wdsize'>?</span> sec, Sample Rate: <span id='smprate'>?</span> smps
|
||||
<div id='labdiv'></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var $ = function(id) { return document.getElementById(id);}
|
||||
var stg = 0;
|
||||
var smprate = 963.4; // 1819;
|
||||
var smps = smprate;
|
||||
var samples = 10*smprate;
|
||||
var rend = 1;
|
||||
var oldblkid = 0;
|
||||
var rdnextflg = false;
|
||||
var cur_idx = 0;
|
||||
var sttim = 0;
|
||||
$("butOnOff").onclick = function() {
|
||||
if(rend) {
|
||||
rend = 0;
|
||||
$("butOnOff").value = "Run";
|
||||
} else {
|
||||
rend = 1;
|
||||
$("butOnOff").value = "Stop";
|
||||
}
|
||||
}
|
||||
var datau = [];
|
||||
var gu;
|
||||
function wsping() {
|
||||
clearTimeout(wstt);
|
||||
ws.send('ina219');
|
||||
wstt = setTimeout(wsping, 150);
|
||||
}
|
||||
ws = new WebSocket("ws://"+window.location.host.toString()+"/web.cgi");
|
||||
ws.binaryType = 'arraybuffer';
|
||||
ws.onopen = function(){ ws.send('user=rtl871x:supervisor'); ws.send('sys_debug=0'); wstt = setTimeout(wsping, 50);};
|
||||
ws.onmessage = function (event) {
|
||||
if(event.data instanceof ArrayBuffer) {
|
||||
clearTimeout(wstt);
|
||||
var wordarray = new Int16Array(event.data);
|
||||
if(wordarray.length > 2) {
|
||||
var blksz = wordarray[0];
|
||||
if(wordarray.length == blksz*2 + 2) {
|
||||
if(!sttim) {
|
||||
sttim = new Date().getTime();
|
||||
setInterval(function(){wsSmpRate()}, 500);
|
||||
} else {
|
||||
var blkid = wordarray[1] & 0xFFFF;
|
||||
if(rdnextflg) {
|
||||
cur_idx += (blkid - oldblkid) & 0xFFFF;
|
||||
} else rdnextflg = true;
|
||||
oldblkid = blkid + blksz;
|
||||
for (var i=2; i<wordarray.length; i+=2) {
|
||||
if(rend) {
|
||||
if(cur_idx >= samples ) datau.shift();
|
||||
if(wordarray[i] & 2) datau.push([cur_idx/smprate, wordarray[i]*0.0005, wordarray[i+1]*0.1]);
|
||||
else datau.push([cur_idx/smprate]);
|
||||
}
|
||||
cur_idx++;
|
||||
}
|
||||
if(!stg) {
|
||||
gu = new Dygraph(
|
||||
$("div_v"),
|
||||
datau,
|
||||
{
|
||||
title: 'U & I (INA219)',
|
||||
showRangeSelector: true,
|
||||
showRoller: true,
|
||||
xlabel: 'T(sec)',
|
||||
ylabel: 'U(V)',
|
||||
y2label: 'I(mA)',
|
||||
colors: ['rgb(51,204,204)','rgb(255,100,100)'],
|
||||
series : { 'I': { axis: 'y2' } },
|
||||
axes: {
|
||||
x: {valueFormatter: function(x){return this.getLabels()[0] + ': '+ x.toPrecision(5);}},
|
||||
y: {valueRange: [0,]},
|
||||
y2: {valueRange: [0,]}},
|
||||
labels: ['T', 'U', 'I'],
|
||||
labelsDiv: $('labdiv'),
|
||||
legend: 'always',
|
||||
digitsAfterDecimal: 3,
|
||||
});
|
||||
setInterval(function(){renderChart()}, 50);
|
||||
stg = 1;
|
||||
}
|
||||
} }
|
||||
wstt = setTimeout(wsping, 40);
|
||||
} } }
|
||||
function wsSmpRate() {
|
||||
smps = cur_idx * 1000/ (new Date().getTime() - sttim);
|
||||
$('smprate').innerHTML = smps.toFixed(1);
|
||||
}
|
||||
var renderChart = function() {
|
||||
var dl;
|
||||
if (gu.dateWindow_) {
|
||||
dl = gu.dateWindow_[1] - gu.dateWindow_[0];
|
||||
if ($("FixEnd").checked) {
|
||||
var ls = datau.length - 1;
|
||||
gu.dateWindow_[1] = datau[ls][0];
|
||||
gu.dateWindow_[0] = datau[ls][0] - dl;
|
||||
} else if (gu.dateWindow_[0] < datau[0][0]) {
|
||||
gu.dateWindow_[0] = datau[0][0];
|
||||
gu.dateWindow_[1] = datau[0][0] + dl;
|
||||
}
|
||||
} else dl = datau.length/smprate;
|
||||
$("wdsize").innerHTML = dl.toFixed(3);
|
||||
if(rend) gu.updateOptions({'file': datau});
|
||||
}
|
||||
function convertArrayOfObjectsToCSV(value){
|
||||
var result, ctr, keys, columnDelimiter, lineDelimiter, data;
|
||||
data = value.data || null;
|
||||
if (data == null || !data.length) {return null;}
|
||||
columnDelimiter = value.columnDelimiter || ';';
|
||||
lineDelimiter = value.lineDelimiter || '\n';
|
||||
keys = Object.keys(data[1]);
|
||||
result = '';
|
||||
result += keys.join(columnDelimiter);
|
||||
result += lineDelimiter;
|
||||
data.forEach(function(item){
|
||||
ctr = 0;
|
||||
keys.forEach(function(key){
|
||||
if (ctr > 0)
|
||||
result += columnDelimiter;
|
||||
result += item[key];
|
||||
ctr++;
|
||||
});
|
||||
result += lineDelimiter;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
$("butSave").onclick = function() {
|
||||
var csv = convertArrayOfObjectsToCSV({data: datau});
|
||||
if (!csv.match(/^data:text\/csv/i)) {csv = 'data:text/csv;charset=utf-8,' + csv;}
|
||||
var encodedUri = encodeURI(csv);
|
||||
var link = document.createElement('a');
|
||||
link.setAttribute('href', encodedUri);
|
||||
link.setAttribute('download',"data.csv");
|
||||
link.click();
|
||||
}
|
||||
if(window.innerHeight > 320) $('div_v').style.height = (window.innerHeight-100) + 'px';
|
||||
window.onresize = function(){
|
||||
if(window.innerHeight > 320) $('div_v').style.height = (window.innerHeight-100) + 'px';
|
||||
}
|
||||
</script></body>
|
||||
</html>
|
|
@ -1,6 +0,0 @@
|
|||
h
|
||||
loadbin flasher/RTL00Console_ROM.bin 0x10000ba8
|
||||
r
|
||||
w4 0x40000210,0x4011113
|
||||
g
|
||||
q
|
Binary file not shown.
|
@ -1,119 +0,0 @@
|
|||
AppVersion = 47812
|
||||
[GENERAL]
|
||||
ConnectMode = 0
|
||||
CurrentFile = "fullflash.bin"
|
||||
DataFileSAddr = 0x98000000
|
||||
GUIMode = 0
|
||||
HostName = ""
|
||||
TargetIF = 1
|
||||
USBPort = 0
|
||||
USBSerialNo = 0x00000000
|
||||
[JTAG]
|
||||
IRLen = 0
|
||||
MultipleTargets = 0
|
||||
NumDevices = 0
|
||||
Speed0 = 400
|
||||
Speed1 = 12000
|
||||
TAP_Number = 0
|
||||
UseAdaptive0 = 0
|
||||
UseAdaptive1 = 0
|
||||
UseMaxSpeed0 = 0
|
||||
UseMaxSpeed1 = 0
|
||||
[CPU]
|
||||
CheckCoreID = 0
|
||||
ChipName = "RTL8710AF"
|
||||
ClockSpeed = 0x00000000
|
||||
Core = 0x030000FF
|
||||
CoreID = 0x00000000
|
||||
CoreIDMask = 0x0F000FFF
|
||||
DeviceFamily = 0x00000003
|
||||
EndianMode = 0
|
||||
HasInternalFlash = 0
|
||||
InitStep0_Action = "Reset"
|
||||
InitStep0_Comment = "Reset and Halt"
|
||||
InitStep0_Value0 = 0x00000000
|
||||
InitStep0_Value1 = 0x00000005
|
||||
InitStep1_Action = "Go"
|
||||
InitStep1_Comment = ""
|
||||
InitStep1_Value0 = 0x00000000
|
||||
InitStep1_Value1 = 0x00000000
|
||||
InitStep2_Action = "Reset"
|
||||
InitStep2_Comment = "Reset and halt target"
|
||||
InitStep2_Value0 = 0x00000000
|
||||
InitStep2_Value1 = 0x00000005
|
||||
InitStep3_Action = "Write Register"
|
||||
InitStep3_Comment = "Only T=1"
|
||||
InitStep3_Value0 = 0x00000010
|
||||
InitStep3_Value1 = 0x01000000
|
||||
InitStep4_Action = "Write 32bit"
|
||||
InitStep4_Comment = "Setup SystemCoreClock"
|
||||
InitStep4_Value0 = 0x40000014
|
||||
InitStep4_Value1 = 0x00000001
|
||||
InitStep5_Action = "Delay"
|
||||
InitStep5_Comment = ""
|
||||
InitStep5_Value0 = 0x00000000
|
||||
InitStep5_Value1 = 0x00000005
|
||||
InitStep6_Action = "Write 32bit"
|
||||
InitStep6_Comment = "Write Page Size"
|
||||
InitStep6_Value0 = 0x1FFFFFF0
|
||||
InitStep6_Value1 = 0x00000100
|
||||
InitStep7_Action = "Write 32bit"
|
||||
InitStep7_Comment = "Write Sector Size"
|
||||
InitStep7_Value0 = 0x1FFFFFF4
|
||||
InitStep7_Value1 = 0x00001000
|
||||
InitStep8_Action = "Write 32bit"
|
||||
InitStep8_Comment = "Write Block Size"
|
||||
InitStep8_Value0 = 0x1FFFFFF8
|
||||
InitStep8_Value1 = 0x00010000
|
||||
InitStep9_Action = "Write 32bit"
|
||||
InitStep9_Comment = "Write Block Count"
|
||||
InitStep9_Value0 = 0x1FFFFFFC
|
||||
InitStep9_Value1 = 0x00000010
|
||||
NumExitSteps = 0
|
||||
NumInitSteps = 10
|
||||
RAMAddr = 0x10000000
|
||||
RAMSize = 0x00010000
|
||||
ScriptFile = ""
|
||||
UseAutoSpeed = 0x00000001
|
||||
UseRAM = 1
|
||||
UseScriptFile = 0
|
||||
[FLASH]
|
||||
aSectorSel[0] =
|
||||
AutoDetect = 1
|
||||
BankName = ""
|
||||
BankSelMode = 1
|
||||
BaseAddr = 0x98000000
|
||||
CheckId = 3
|
||||
CustomRAMCode = "RTL8710AF.hex"
|
||||
DeviceName = "Auto detected flash memory"
|
||||
EndBank = 8191
|
||||
NumBanks = 1
|
||||
OrgNumBits = 16
|
||||
OrgNumChips = 1
|
||||
StartBank = 0
|
||||
UseCustomRAMCode = 1
|
||||
[PRODUCTION]
|
||||
AutoPerformsErase = 1
|
||||
AutoPerformsHardLock = 0
|
||||
AutoPerformsHardUnlock = 0
|
||||
AutoPerformsProgram = 1
|
||||
AutoPerformsSecure = 0
|
||||
AutoPerformsSoftLock = 0
|
||||
AutoPerformsSoftUnlock = 1
|
||||
AutoPerformsStartApp = 0
|
||||
AutoPerformsUnsecure = 0
|
||||
AutoPerformsVerify = 1
|
||||
EnableProductionMode = 0
|
||||
EnableTargetPower = 0
|
||||
EraseType = 2
|
||||
ProductionDelay = 0x000001F4
|
||||
ProductionThreshold = 0x00000BB8
|
||||
ProgramSN = 0
|
||||
SerialFile = ""
|
||||
SNAddr = 0x00000000
|
||||
SNInc = 0x00000001
|
||||
SNLen = 0x00000004
|
||||
SNListFile = ""
|
||||
SNValue = 0x00000001
|
||||
TargetPowerDelay = 0x00000014
|
||||
VerifyType = 1
|
|
@ -1,130 +0,0 @@
|
|||
:100000007D0439057F05FF056506D506D706000086
|
||||
:10001000D44908707047D44800680005FBD0D14827
|
||||
:100020000078C0B2704710B5D048006850F44070F6
|
||||
:10003000CE490860CE48006850F01000CC490860F6
|
||||
:10004000CC480468062000F0B7F934F00600C9492E
|
||||
:100050000860C848006850F00100C64908600020E8
|
||||
:10006000C54908600020C54908600120C4490860EE
|
||||
:100070000220C44908600020C34908600020C34929
|
||||
:1000800008600020C249086010BD2DE9F04104005D
|
||||
:100090000D001600B6B2002E01D1002048E0B6B225
|
||||
:1000A000112E01DB102006004FF4407000F084F99F
|
||||
:1000B00080465FF4401000F07FF95FF4403000F0BC
|
||||
:1000C0007BF95FF4402000F077F9032010FA08F084
|
||||
:1000D00010F44070AF490860B6B2AF480660032024
|
||||
:1000E000FFF796FF200CC0B2FFF792FF200AC0B2C4
|
||||
:1000F000FFF78EFF2000C0B2FFF78AFF01209E4964
|
||||
:100100000860002007003800310080B289B28842C0
|
||||
:1001100005D2FFF780FFBFB2E8557F1CF3E79F4889
|
||||
:100120000068C007FBD4002093490860300080B20B
|
||||
:10013000BDE8F08138B54FF4407000F03DF905009E
|
||||
:100140005FF4401000F038F95FF4403000F034F90B
|
||||
:100150005FF4402000F030F90320A84010F4407014
|
||||
:100160008C49086003208C4908600120824908609E
|
||||
:100170009F20FFF74DFFFFF74EFF0400FFF74BFFF7
|
||||
:1001800054EA00200400FFF746FF54EA0040040050
|
||||
:1001900082480068C007FBD400207749086020002F
|
||||
:1001A00032BD38B54FF4407000F006F905005FF439
|
||||
:1001B000401000F001F95FF4403000F0FDF85FF40A
|
||||
:1001C000402000F0F9F80320A84010F44070714975
|
||||
:1001D0000860012070490860012067490860052017
|
||||
:1001E000FFF716FFFFF717FF04006C480068C00711
|
||||
:1001F000FBD40020604908602000C0B232BD38B591
|
||||
:1002000004004FF4407000F0D7F805005FF4401090
|
||||
:1002100000F0D2F85FF4403000F0CEF85FF44020F8
|
||||
:1002200000F0CAF80120A84010F440705949086055
|
||||
:100230000120514908602000C0B2FFF7E9FE57488D
|
||||
:100240000068C007FBD400204B49086031BD38B5B9
|
||||
:1002500004004FF4407000F0AFF805005FF4401068
|
||||
:1002600000F0AAF85FF4403000F0A6F85FF44020F8
|
||||
:1002700000F0A2F80120A84010F440704549086041
|
||||
:1002800001203D4908602020FFF7C2FE200CC0B2CB
|
||||
:10029000FFF7BEFE200AC0B2FFF7BAFE2000C0B2D0
|
||||
:1002A000FFF7B6FE3D480068C007FBD40020324986
|
||||
:1002B000086031BD2DE9F04104000D001600B6B212
|
||||
:1002C000002E01D100204BE0B6B2B6F5807F02DDF2
|
||||
:1002D0004FF4807006004FF4407000F06DF88046D7
|
||||
:1002E0005FF4401000F068F85FF4403000F064F80C
|
||||
:1002F0005FF4402000F060F8012010FA08F010F4DC
|
||||
:1003000040702449086001201B4908600220FFF763
|
||||
:100310007FFE200CC0B2FFF77BFE200AC0B2FFF7C1
|
||||
:1003200077FE2000C0B2FFF773FE00200700380000
|
||||
:10033000310080B289B2884205D2BFB2E85DFFF7D2
|
||||
:1003400067FE7F1CF3E7154800684007FBD513489C
|
||||
:100350000068C007FBD4002007490860300080B265
|
||||
:10036000BDE8F08160600040246000403002004041
|
||||
:1003700010020040C0020040086000402C600040B5
|
||||
:100380001060004014600040186000401C60004095
|
||||
:100390004C60004000600040046000402860004065
|
||||
:1003A00080B5FFF7FEFEC007FBD401BD80B5FFF7A7
|
||||
:1003B000F8FE8007FBD501BD90FAA0F0B0FA80F0FE
|
||||
:1003C00070470000010051EA510151EA910151EAE0
|
||||
:1003D000111151EA112151EA1141064A7A441432AD
|
||||
:1003E000DFF8B03203FB01F3DB0E52F823201000DC
|
||||
:1003F000704700BF80030000DFF89C02006850F0E7
|
||||
:100400004070DFF894120860DFF89002006850F442
|
||||
:100410008070DFF888120860FF20DFF8841208601F
|
||||
:10042000FF20DFF880120860704780B500F054F9B3
|
||||
:1004300001BD0120DFF870120860704780B571B609
|
||||
:1004400072B6FFF7F6FFFFF7D7FFFFF7EEFF01BD2C
|
||||
:1004500080B5FFF7E8FDFFF7A3FFFFF76BFEFFF79F
|
||||
:100460009FFF92480068FFF7ADFF914908609148EF
|
||||
:100470000068FFF7A7FF9049086001BDF8B50400C8
|
||||
:100480000D0016008D4800688D49884204D18D48C2
|
||||
:1004900000688D49884209D08948884908608A489F
|
||||
:1004A00088490860FFF7CAFFFFF7D2FF814800685C
|
||||
:1004B00086490968864A12685143B1FBF0F27368B5
|
||||
:1004C00040271F807A4F3F689F700027DF70012709
|
||||
:1004D0001F7101275F7100279F710127DF710127BD
|
||||
:1004E0001F7200275F7201279F7201271F6100277B
|
||||
:1004F000DFF8DCC1DCF800C067451CD2DFF8CCC1F6
|
||||
:10050000DCF800C00CFB07FC5FF00C0E0EFB07FED6
|
||||
:100510009E44CEF814C05FF00C0C0CFB07FC9C440E
|
||||
:10052000CCF818205FF00C0C0CFB07FC9C44CCF8BA
|
||||
:100530001C007F1CDCE7F1BD2DE9F04704000D0035
|
||||
:1005400016007769D6F81080D6F80490002F14D0E2
|
||||
:10055000200000F0C0F8112F02D35FF0100A00E075
|
||||
:10056000BA46524692B249464046FFF78EFD1AEB14
|
||||
:100570000808D144B7EB0A07E8E7BDE8F0872DE9A2
|
||||
:10058000F84F04000D0016000020286077694848E5
|
||||
:100590000068B84638FA00F8D6F810904448006869
|
||||
:1005A00039FA00F9D6F804A0B8F1000F25D0B7F554
|
||||
:1005B000807F02D94FF4807B00E0BB46FFF7F0FE5E
|
||||
:1005C0000620FFF71CFEFFF7F1FE5A4692B2514695
|
||||
:1005D0003648006800FB09F0FFF76CFEFFF7E0FE0D
|
||||
:1005E0000420FFF70CFEFFF7DBFEDA44B7EB0B0746
|
||||
:1005F000B8F1010819F10109D6E7BDE8F18F2DE93D
|
||||
:10060000F84304000D00160030692B490968C84002
|
||||
:10061000070070698046002028602648006800FBBB
|
||||
:1006200007F08146B8F1000F1AD0200000F053F80F
|
||||
:10063000FFF7B6FE0620FFF7E2FDFFF7B7FE4846DC
|
||||
:10064000FFF705FEFFF7ACFE0420FFF7D8FDFFF72C
|
||||
:10065000A7FE1848006810EB0909B8F10108E1E7A6
|
||||
:10066000BDE8F18310B504001448006814498842BD
|
||||
:1006700004D1144800681449884209D010480F4931
|
||||
:10068000086011480F490860FFF7D8FEFFF7E0FE49
|
||||
:1006900010BD0000DDACC407300200401C02004069
|
||||
:1006A000200300402403004014000040F0FFFF1F1F
|
||||
:1006B000E0FFFF1FF4FFFF1FE4FFFF1FE8FFFF1F26
|
||||
:1006C000AA55AA55ECFFFF1F55AA55AAF8FFFF1F10
|
||||
:1006D000FCFFFF1F7047704710B51E48006850F4BC
|
||||
:1006E00040501C4908601C48006850F480501A496A
|
||||
:1006F00008601A4800684006FBD5194804685FF492
|
||||
:100700004000FFF759FE34F44000154908601448D2
|
||||
:10071000006850F4801012490860002011490860F8
|
||||
:100720001148006850F080000F49086044200F49CC
|
||||
:10073000086000200B49086003240320FFF73CFEFB
|
||||
:1007400014FA00F010F0030007490860002008497F
|
||||
:10075000086010BD3002004010020040143000401C
|
||||
:10076000C0020040043000400C3000400030004027
|
||||
:1007700008300040000000000900000001000000F7
|
||||
:100780000A0000000D00000015000000020000003B
|
||||
:100790001D0000000B0000000E0000001000000013
|
||||
:1007A0001200000016000000190000000300000005
|
||||
:1007B0001E000000080000000C00000014000000F3
|
||||
:1007C0001C0000000F0000001100000018000000D5
|
||||
:1007D00007000000130000001B00000017000000CD
|
||||
:1007E000060000001A0000000500000004000000E0
|
||||
:0407F0001F000000E6
|
||||
:0400000500000000F7
|
||||
:00000001FF
|
|
@ -1,17 +0,0 @@
|
|||
h
|
||||
r
|
||||
w4 0x40000230,0x0000D3C4
|
||||
w4 0x40000210,0x00200113
|
||||
w4 0x400002C0,0x00110001
|
||||
w4 0x40006008,0
|
||||
w4 0x4000602C,0
|
||||
w4 0x40006010,1
|
||||
w4 0x40006014,2
|
||||
w4 0x40006018,0
|
||||
w4 0x4000601C,0
|
||||
w4 0x4000604C,0
|
||||
savebin fullflash.bin 0x98000000 0x100000
|
||||
w4 0x40000210,0x211157
|
||||
r
|
||||
g
|
||||
q
|
|
@ -1,9 +0,0 @@
|
|||
r0
|
||||
trst0
|
||||
r1
|
||||
trst1
|
||||
h
|
||||
r
|
||||
w4 0x40000210,0x0011113
|
||||
g
|
||||
q
|
|
@ -1,12 +0,0 @@
|
|||
r0
|
||||
trst0
|
||||
r1
|
||||
trst1
|
||||
h
|
||||
r
|
||||
loadbin build/bin/ram_1.bin 0x10000bc8
|
||||
loadbin build/bin/ram_2.bin 0x10006000
|
||||
r
|
||||
w4 0x40000210,0x20011113
|
||||
g
|
||||
q
|
|
@ -1,18 +0,0 @@
|
|||
r0
|
||||
trst0
|
||||
r1
|
||||
trst1
|
||||
r
|
||||
h
|
||||
loadbin build/bin/ram_1.bin 0x10000bc8
|
||||
loadbin build/bin/ram_2.bin 0x10006000
|
||||
r
|
||||
w4 0x40000210,0x20011113
|
||||
w4 0x1FFF0000,0x12345678
|
||||
g
|
||||
sleep 1000
|
||||
h
|
||||
loadbin build/bin/sdram.bin 0x30000000
|
||||
w4 0x1FFF0000,1
|
||||
g
|
||||
q
|
|
@ -1,124 +0,0 @@
|
|||
# Main file for Ameba1 series Cortex-M3 parts
|
||||
#
|
||||
# !!!!!!
|
||||
#
|
||||
|
||||
set CHIPNAME rtl8195a
|
||||
set CHIPSERIES ameba1
|
||||
|
||||
# Adapt based on what transport is active.
|
||||
source [find target/swj-dp.tcl]
|
||||
|
||||
if { [info exists CHIPNAME] } {
|
||||
set _CHIPNAME $CHIPNAME
|
||||
} else {
|
||||
error "CHIPNAME not set. Please do not include ameba1.cfg directly."
|
||||
}
|
||||
|
||||
if { [info exists CHIPSERIES] } {
|
||||
# Validate chip series is supported
|
||||
if { $CHIPSERIES != "ameba1" } {
|
||||
error "Unsupported chip series specified."
|
||||
}
|
||||
set _CHIPSERIES $CHIPSERIES
|
||||
} else {
|
||||
error "CHIPSERIES not set. Please do not include ameba1.cfg directly."
|
||||
}
|
||||
|
||||
if { [info exists CPUTAPID] } {
|
||||
# Allow user override
|
||||
set _CPUTAPID $CPUTAPID
|
||||
} else {
|
||||
# Ameba1 use a Cortex M3 core.
|
||||
if { $_CHIPSERIES == "ameba1" } {
|
||||
if { [using_jtag] } {
|
||||
set _CPUTAPID 0x4ba00477
|
||||
} {
|
||||
set _CPUTAPID 0x2ba01477
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
|
||||
|
||||
set _TARGETNAME $_CHIPNAME.cpu
|
||||
target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
|
||||
|
||||
|
||||
# Run with *real slow* clock by default since the
|
||||
# boot rom could have been playing with the PLL, so
|
||||
# we have no idea what clock the target is running at.
|
||||
adapter_khz 1000
|
||||
|
||||
# delays on reset lines
|
||||
adapter_nsrst_delay 200
|
||||
if {[using_jtag]} {
|
||||
jtag_ntrst_delay 200
|
||||
}
|
||||
|
||||
|
||||
# Ameba1 (Cortex M3 core) support SYSRESETREQ
|
||||
if {![using_hla]} {
|
||||
# if srst is not fitted use SYSRESETREQ to
|
||||
# perform a soft reset
|
||||
cortex_m reset_config sysresetreq
|
||||
}
|
||||
|
||||
$_TARGETNAME configure -event reset-init {ameba1_init}
|
||||
|
||||
# Ameba1 SDRAM enable
|
||||
proc ameba1_init { } {
|
||||
# init System
|
||||
mww 0x40000014 0x00000021
|
||||
sleep 10
|
||||
mww 0x40000304 0x1fc00002
|
||||
sleep 10
|
||||
mww 0x40000250 0x00000400
|
||||
sleep 10
|
||||
mww 0x40000340 0x00000000
|
||||
sleep 10
|
||||
mww 0x40000230 0x0000dcc4
|
||||
sleep 10
|
||||
mww 0x40000210 0x00011117
|
||||
sleep 10
|
||||
mww 0x40000210 0x00011157
|
||||
sleep 10
|
||||
mww 0x400002c0 0x00110011
|
||||
sleep 10
|
||||
mww 0x40000320 0xffffffff
|
||||
sleep 10
|
||||
# init SDRAM
|
||||
mww 0x40000040 0x00fcc702
|
||||
sleep 10
|
||||
mdw 0x40000040
|
||||
mww 0x40005224 0x00000001
|
||||
sleep 10
|
||||
mww 0x40005004 0x00000208
|
||||
sleep 10
|
||||
mww 0x40005008 0xffffd000
|
||||
sleep 13
|
||||
mww 0x40005020 0x00000022
|
||||
sleep 13
|
||||
mww 0x40005010 0x09006201
|
||||
sleep 13
|
||||
mww 0x40005014 0x00002611
|
||||
sleep 13
|
||||
mww 0x40005018 0x00068413
|
||||
sleep 13
|
||||
mww 0x4000501c 0x00000042
|
||||
sleep 13
|
||||
mww 0x4000500c 0x700 ;# set Idle
|
||||
sleep 20
|
||||
mww 0x40005000 0x1 ;# start init
|
||||
sleep 100
|
||||
mdw 0x40005000
|
||||
mww 0x4000500c 0x600 ;# enter memory mode
|
||||
sleep 30
|
||||
|
||||
mww 0x40005008 0x00000000 ;# 0xf00
|
||||
;# mww 0x40005008 0x00000f00
|
||||
sleep 3
|
||||
mww 0x40000300 0x0006005e ;# 0x5e
|
||||
;# mww 0x40000300 0x0000005e
|
||||
sleep 3
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
proc cortex_bootstrap {start} {
|
||||
# disable interrupts
|
||||
reg faultmask 0x01
|
||||
set vectors ""
|
||||
mem2array vectors 32 $start 2
|
||||
reg sp $vectors(0)
|
||||
reg pc $vectors(1)
|
||||
resume
|
||||
}
|
||||
|
||||
proc cortex_reboot {} {
|
||||
set ddd [ format "0x%08x" [ rtl8710_flasher_mrw [ expr 0x40000210 ] ] ]
|
||||
# set aaa [ format "0x%08x" [ expr 0x40000210 ] ]
|
||||
echo "CLK_CTRL1 = $ddd"
|
||||
# echo "# Set processor clock to default before system reset"
|
||||
set ddd [ format "0x%08x" [ rtl8710_flasher_mrw [ expr 0x40000014 ] ] ]
|
||||
# set aaa [ format "0x%08x" [ expr 0x40000014 ] ]
|
||||
echo "SOC_FUNC_EN = $ddd"
|
||||
# mww 0x40000014 0x00000021
|
||||
sleep 10
|
||||
echo "# Reboot (system reset)"
|
||||
mww 0xE000ED0C 0x05FA0007
|
||||
}
|
||||
|
||||
proc init_system {} {
|
||||
# Set processor clock to default before system reset
|
||||
# CLK_CTRL1
|
||||
# mww 0x40000014 0x00000011
|
||||
mww 0x40000014 0x00000021
|
||||
sleep 10
|
||||
# PESOC_SOC_CTRL
|
||||
# mww 0x40000304 0x1fc00001
|
||||
mww 0x40000304 0x1fc00002
|
||||
sleep 10
|
||||
# PESOC_CLK_SEL
|
||||
mww 0x40000250 0x00000400
|
||||
sleep 10
|
||||
# GPIO_PULL_CTRL4
|
||||
mww 0x40000340 0x00000000
|
||||
sleep 10
|
||||
# PESOC_CLK_CTRL
|
||||
# mww 0x40000230 0x0000d3c4
|
||||
mww 0x40000230 0x0000dcc4
|
||||
sleep 10
|
||||
# SOC_FUNC_EN: FUN|OCP|LXBUS|FLASH|CPU|LOG_UART|GTIMER|SECURITY_ENGINE
|
||||
# mww 0x40000210 0x00211117
|
||||
mww 0x40000210 0x00011117
|
||||
sleep 10
|
||||
# SOC_FUNC_EN: FUN|OCP|LXBUS|FLASH|CPU|LOG_UART|GTIMER|SECURITY_ENGINE + MEM_CTRL
|
||||
mww 0x40000210 0x00011157
|
||||
sleep 10
|
||||
# CPU_PERIPHERAL_CTRL SPI_FLASH_PIN_EN|SDR_PIN_EN|SWD_PIN_EN|LOG_UART_PIN_EN ?
|
||||
# mww 0x400002c0 0x00110000
|
||||
mww 0x400002c0 0x00110011
|
||||
sleep 10
|
||||
# GPIO_SHTDN_CTRL
|
||||
# mww 0x40000320 0x00000033
|
||||
mww 0x40000320 0xffffffff
|
||||
sleep 10
|
||||
|
||||
mww 0x40005008 0x00000000
|
||||
sleep 10
|
||||
# PESOC_MEM_CTRL
|
||||
mww 0x40000300 0x0006005e
|
||||
sleep 10
|
||||
|
||||
# set baudrate to 38400
|
||||
# mww 0x40003010 0x00000080
|
||||
# mww 0x40003008 0x00000022
|
||||
# mww 0x4000300C 0x00000000
|
||||
# mww 0x40003010 0x00000000
|
||||
}
|
||||
|
||||
proc boot_from_flash {} {
|
||||
echo "# skip sdram init, it has been init in openocd config"
|
||||
mww 0x40000210 0x211157
|
||||
}
|
||||
|
||||
proc boot_from_ram {} {
|
||||
echo "# boot from ram, igonore loading flash"
|
||||
mww 0x40000210 0x8011157
|
||||
}
|
||||
|
||||
proc restart_from_falsh {} {
|
||||
init
|
||||
init_system
|
||||
boot_from_flash
|
||||
cortex_reboot
|
||||
}
|
||||
|
||||
proc load_ram_binary { local_filename address } {
|
||||
# set address 0x10000BC8
|
||||
init
|
||||
reset halt
|
||||
set size [file size $local_filename]
|
||||
load_image $local_filename $address bin $address $size
|
||||
boot_from_ram
|
||||
resume
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
define call1
|
||||
SetFirwareSize build/bin/ram_all.bin
|
||||
end
|
||||
define call2
|
||||
FlasherWrite build/bin/ram_all.bin 0 $Image1Size
|
||||
end
|
||||
define call3
|
||||
FlasherWrite build/bin/ram_all.bin $Image2Addr $Image2Size
|
||||
end
|
|
@ -1,232 +0,0 @@
|
|||
####################################
|
||||
# J-LINK GDB SERVER initialization #
|
||||
####################################
|
||||
define InitJlink
|
||||
printf "Jlink Init:\n"
|
||||
set verbose off
|
||||
set complaints 0
|
||||
set confirm off
|
||||
set exec-done-display off
|
||||
show exec-done-display
|
||||
set trace-commands off
|
||||
#set debug aix-thread off
|
||||
#set debug dwarf2-die 0
|
||||
set debug displaced off
|
||||
set debug expression 0
|
||||
set debug frame 0
|
||||
set debug infrun 0
|
||||
set debug observer 0
|
||||
set debug overload 0
|
||||
#set debugvarobj 0
|
||||
set pagination off
|
||||
set print address off
|
||||
set print symbol-filename off
|
||||
set print symbol off
|
||||
set print pretty off
|
||||
set print object off
|
||||
#set debug notification off
|
||||
set debug parser off
|
||||
set debug remote 0
|
||||
target remote localhost:2331
|
||||
set remotetimeout 10000
|
||||
monitor device Cortex-M3
|
||||
monitor endian little
|
||||
monitor reset
|
||||
# Set max speed
|
||||
monitor speed 4000
|
||||
set mem inaccessible-by-default off
|
||||
# Setup GDB FOR FASTER DOWNLOADS
|
||||
set remote memory-write-packet-size 8192
|
||||
set remote memory-write-packet-size fixed
|
||||
set $SPI_FLASH_BASE = 0x98000000
|
||||
end
|
||||
#############
|
||||
# Boot_Flash
|
||||
define SetBootFlash
|
||||
printf "SetBoot = Flash:\n"
|
||||
monitor long 0x40000210 = 0x00011113
|
||||
end
|
||||
# Boot RAM start_addr0() Run if ( v400001F4 & 0x8000000 ) && ( v40000210 & 0x80000000 )
|
||||
define SetBootCall0
|
||||
printf "SetBoot = Call0:\n"
|
||||
monitor long 0x40000210 = 0x80011113
|
||||
end
|
||||
# Boot RAM start_addr1() Run if ( v40000210 & 0x20000000 )
|
||||
define SetBootCall1
|
||||
printf "SetBoot = Call1:\n"
|
||||
monitor long 0x40000210 = 0x20011113
|
||||
end
|
||||
# Boot RAM start_addr2() Run if ( v40000210 & 0x10000000 )
|
||||
define SetBootCall2
|
||||
printf "SetBoot = Call2:\n"
|
||||
monitor long 0x40000210 = 0x10011113
|
||||
end
|
||||
# Boot RAM start_addr3() Run if ( v400001F4 & 0x8000000 ) && ( v40000210 & 0x8000000 )
|
||||
define SetBootCall3
|
||||
printf "SetBoot = Call3:\n"
|
||||
monitor long 0x40000210 = 0x8011113
|
||||
end
|
||||
# Boot RAM start_addr4() Init console, Run if ( v40000210 & 0x4000000 )
|
||||
define SetBootCall4
|
||||
printf "SetBoot = Call4:\n"
|
||||
monitor long 0x40000210 = 0x4011113
|
||||
end
|
||||
# CPU CLK 166 MHz?
|
||||
define SetClk166MHz
|
||||
printf "SetCLK 166.66MHz:\n"
|
||||
monitor long 0x40000014 = 0x00000011
|
||||
end
|
||||
# CPU CLK 83 MHz?
|
||||
define SetClk83MHz
|
||||
printf "SetCLK 83.33MHz:\n"
|
||||
monitor long 0x40000014 = 0x00000021
|
||||
end
|
||||
###############
|
||||
# System Init #
|
||||
###############
|
||||
define SystemInit
|
||||
printf "System Init:\n"
|
||||
monitor long 0x40000304 = 0x1FC00002
|
||||
monitor long 0x40000250 = 0x400
|
||||
monitor long 0x40000340 = 0x0
|
||||
monitor long 0x40000230 = 0xdcc4
|
||||
monitor long 0x40000210 = 0x11113
|
||||
monitor long 0x400002c0 = 0x110011
|
||||
monitor long 0x40000320 = 0xffffffff
|
||||
end
|
||||
############
|
||||
# SPI Init #
|
||||
############
|
||||
define SPI_Init
|
||||
printf "Init SPI:\n"
|
||||
#enable spi flash peripheral clock
|
||||
set $Temp = {int}(0x40000230)
|
||||
set $Temp = ($Temp | 0x300)
|
||||
set {int}(0x40000230) = $Temp
|
||||
#enable spi flash peripheral
|
||||
set $Temp = {int}(0x40000210)
|
||||
set $Temp = ($Temp | 0x10)
|
||||
set {int}(0x40000210) = $Temp
|
||||
#select spi flash pinout (0 - internal), enable spi flash pins
|
||||
set $Temp = {int}(0x400002C0)
|
||||
set $Temp = (($Temp & 0xFFFFFFF8) | 1)
|
||||
set {int}(0x400002C0) = $Temp
|
||||
#disable SPI FLASH operation
|
||||
monitor long 0x40006008 = 0
|
||||
#disable all interrupts
|
||||
monitor long 0x4000602C = 0
|
||||
#use first "slave select" pin
|
||||
monitor long 0x40006010 = 1
|
||||
#baud rate, default value
|
||||
monitor long 0x40006014 = 2
|
||||
#tx fifo threshold
|
||||
monitor long 0x40006018 = 0
|
||||
#rx fifo threshold
|
||||
monitor long 0x4000601C = 0
|
||||
#disable DMA
|
||||
monitor long 0x4000604C = 0
|
||||
end
|
||||
###################
|
||||
# SetFirwareSize #
|
||||
###################
|
||||
define SetFirwareSize
|
||||
set $rambuffer = 0x10000300
|
||||
printf "Get ImagesSize:\n"
|
||||
restore $arg0 binary $rambuffer 0 0x20
|
||||
set $Image1Size = {int}($rambuffer+0x10) + 32
|
||||
set $Image1LoadAddr = {int}($rambuffer+0x14)
|
||||
set $Image2Addr = {short}($rambuffer+0x18) * 1024
|
||||
if $Image1Size != 0 && $Image1Size < 0x1000000
|
||||
if $Image2Addr == 0
|
||||
set $Image2Addr = $Image1Size
|
||||
end
|
||||
printf "Image1Size = %d\n", $Image1Size
|
||||
printf "Image1LoadAddr = 0x%08x\n", $Image1LoadAddr
|
||||
printf "Image2FlashAddr = 0x%08x\n", $Image2Addr
|
||||
set $parms1 = $rambuffer - $Image2Addr
|
||||
set $parms3 = $Image2Addr + 0x08
|
||||
restore $arg0 binary $parms1 $Image2Addr $parms3
|
||||
set $Image2Size = {int}($rambuffer)
|
||||
set $Image2LoadAddr = {int}($rambuffer+0x4)
|
||||
if $Image2Size != 0xFFFFFFFF && $Image2Size != 0
|
||||
set $Image2Size = $Image2Size + 16
|
||||
printf "Image2Size = %d\n", $Image2Size
|
||||
printf "Image2LoadAddr = 0x%08x\n", $Image2LoadAddr
|
||||
set $FirmwareSize = $Image2Addr + $Image2Size
|
||||
set $Image3Addr = $FirmwareSize
|
||||
set $parms1 = $rambuffer - $FirmwareSize
|
||||
set $parms3 = $Image3Addr + 0x08
|
||||
restore $arg0 binary $parms1 $Image3Addr $parms3
|
||||
set $Image3Size = {int}($rambuffer)
|
||||
set $Image3LoadAddr = {int}($rambuffer+0x4)
|
||||
if $Image3Size != 0xFFFFFFFF && $Image3Size != 0
|
||||
set $Image3Size = $Image3Size + 16
|
||||
printf "Image3Size = %d\n", $Image3Size
|
||||
printf "Image3LoadAddr = 0x%08x\n", $Image3LoadAddr
|
||||
set $FirmwareSize = $Image3Addr + $Image3Size
|
||||
printf "FirmwareSize = %d\n", $FirmwareSize
|
||||
else
|
||||
set $Image3Size = 0
|
||||
if $Image3LoadAddr == 0x30000000
|
||||
set $FirmwareSize = $FirmwareSize + 8
|
||||
end
|
||||
printf "Image3 - None\n"
|
||||
printf "FirmwareSize = %d\n", $FirmwareSize
|
||||
end
|
||||
else
|
||||
set $Image2Size = 0
|
||||
printf "Image2 - None\n"
|
||||
set $FirmwareSize = $Image1Size
|
||||
printf "FirmwareSize = %d\n", $FirmwareSize
|
||||
end
|
||||
else
|
||||
set $Image1Size = 0
|
||||
set $Image2Size = 0
|
||||
set $Image3Size = 0
|
||||
set $Image2Addr = 0
|
||||
set $Image3Addr = 0
|
||||
set $FirmwareSize = 0
|
||||
printf "Image not format Firmware!\n"
|
||||
end
|
||||
end
|
||||
#####################
|
||||
# Flash Images Info #
|
||||
#####################
|
||||
define FlashImagesInfo
|
||||
set $Image2Size = 0
|
||||
set $Image3Size = 0
|
||||
set $Image2Addr = 0
|
||||
set $Image3Addr = 0
|
||||
printf "Flash Info:\n"
|
||||
set $Image1Size = {int}($SPI_FLASH_BASE + 0x10) + 32
|
||||
set $Image1LoadAddr = {int}($SPI_FLASH_BASE + 0x14)
|
||||
if $Image1LoadAddr == 0xFFFFFFFF
|
||||
printf "Image1 - None\n"
|
||||
else
|
||||
set $Image2FlashAddr = {short}($SPI_FLASH_BASE + 0x18) * 1024
|
||||
if $Image2FlashAddr == 0
|
||||
set $Image2FlashAddr = $Image1Size
|
||||
end
|
||||
set $Image2Size = {int}($Image2FlashAddr + $SPI_FLASH_BASE)
|
||||
set $Image2LoadAddr = {int}($Image2FlashAddr + $SPI_FLASH_BASE + 0x4)
|
||||
printf "Image1Size = %d\n", $Image1Size
|
||||
printf "Image1LoadAddr = 0x%08x\n", $Image1LoadAddr
|
||||
printf "Image2FlashAddr = 0x%08x\n", $Image2FlashAddr
|
||||
if $Image2Size != 0xFFFFFFFF && $Image2Size != 0
|
||||
printf "Image2Size = %d\n", $Image2Size
|
||||
printf "Image2LoadAddr = 0x%08x\n", $Image2LoadAddr
|
||||
set $Image3FlashAddr = $Image2FlashAddr + $Image2Size + 0x10
|
||||
set $Image3Size = {int}($Image3FlashAddr + $SPI_FLASH_BASE)
|
||||
set $Image3LoadAddr = {int}($Image3FlashAddr + $SPI_FLASH_BASE + 0x4)
|
||||
if $Image3Size != 0xFFFFFFFF && $Image3Size !=0
|
||||
printf "Image3FlashAddr = 0x%08x\n", $Image3FlashAddr
|
||||
printf "Image3Size = %d\n", $Image3Size
|
||||
printf "Image3LoadAddr = 0x%08x\n", $Image3LoadAddr
|
||||
else
|
||||
printf "Image3 - None\n"
|
||||
end
|
||||
else
|
||||
printf "Image2 - None\n"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,30 +0,0 @@
|
|||
#
|
||||
# J-LINK GDB SERVER initialization
|
||||
#
|
||||
target remote localhost:2331
|
||||
set remotetimeout 10000
|
||||
monitor device Cortex-M3
|
||||
monitor endian little
|
||||
monitor reset
|
||||
# Set max speed
|
||||
monitor speed 4000
|
||||
set mem inaccessible-by-default off
|
||||
# Setup GDB FOR FASTER DOWNLOADS
|
||||
#set remote memory-write-packet-size 4096
|
||||
#set remote memory-write-packet-size fixed
|
||||
# Boot Flash
|
||||
monitor long 0x40000210 = 0x00011113
|
||||
# Boot RAM start_addr0() Run if ( v400001F4 & 0x8000000 ) && ( v40000210 & 0x80000000 )
|
||||
#monitor long 0x40000210 = 0x80011113
|
||||
# Boot RAM start_addr1() Run if ( v40000210 & 0x20000000 )
|
||||
#monitor long 0x40000210 = 0x20011113
|
||||
# Boot RAM start_addr2() Run if ( v40000210 & 0x10000000 )
|
||||
#monitor long 0x40000210 = 0x10011113
|
||||
# Boot RAM start_addr3() Run if ( v400001F4 & 0x8000000 ) && ( v40000210 & 0x8000000 )
|
||||
#monitor long 0x40000210 = 0x8011113
|
||||
# Boot RAM start_addr4() Init console, Run if ( v40000210 & 0x4000000 )
|
||||
monitor long 0x40000210 = 0x4011113
|
||||
# CPU CLK 166 MHz?
|
||||
# monitor long 0x40000014 = 0x00000011
|
||||
# CPU CLK 83 MHz?
|
||||
#monitor long 0x40000014 = 0x00000021
|
|
@ -1,373 +0,0 @@
|
|||
####################################
|
||||
# J-LINK GDB SERVER initialization #
|
||||
####################################
|
||||
define InitJlink
|
||||
printf "Jlink Init:\n"
|
||||
set verbose off
|
||||
set complaints 0
|
||||
set confirm off
|
||||
set exec-done-display off
|
||||
show exec-done-display
|
||||
set trace-commands off
|
||||
#set debug aix-thread off
|
||||
#set debug dwarf2-die 0
|
||||
set debug displaced off
|
||||
set debug expression 0
|
||||
set debug frame 0
|
||||
set debug infrun 0
|
||||
set debug observer 0
|
||||
set debug overload 0
|
||||
#set debugvarobj 0
|
||||
set pagination off
|
||||
set print address off
|
||||
set print symbol-filename off
|
||||
set print symbol off
|
||||
set print pretty off
|
||||
set print object off
|
||||
#set debug notification off
|
||||
set debug parser off
|
||||
set debug remote 0
|
||||
target remote localhost:2331
|
||||
set remotetimeout 10000
|
||||
monitor device Cortex-M3
|
||||
monitor endian little
|
||||
monitor reset
|
||||
# Set max speed
|
||||
monitor speed 4000
|
||||
set mem inaccessible-by-default off
|
||||
# Setup GDB FOR FASTER DOWNLOADS
|
||||
set remote memory-write-packet-size 8192
|
||||
set remote memory-write-packet-size fixed
|
||||
end
|
||||
#############
|
||||
# Boot_Flash
|
||||
define SetBootFlash
|
||||
printf "SetBoot = Flash:\n"
|
||||
monitor long 0x40000210 = 0x011113
|
||||
end
|
||||
# Boot RAM start_addr0() Run if ( v400001F4 & 0x8000000 ) && ( v40000210 & 0x80000000 )
|
||||
define SetBootCall0
|
||||
printf "SetBoot = Call0:\n"
|
||||
monitor long 0x40000210 = 0x80011113
|
||||
end
|
||||
# Boot RAM start_addr1() Run if ( v40000210 & 0x20000000 )
|
||||
define SetBootCall1
|
||||
printf "SetBoot = Call1:\n"
|
||||
monitor long 0x40000210 = 0x20011113
|
||||
end
|
||||
# Boot RAM start_addr2() Run if ( v40000210 & 0x10000000 )
|
||||
define SetBootCall2
|
||||
printf "SetBoot = Call2:\n"
|
||||
monitor long 0x40000210 = 0x10011113
|
||||
end
|
||||
# Boot RAM start_addr3() Run if ( v400001F4 & 0x8000000 ) && ( v40000210 & 0x8000000 )
|
||||
define SetBootCall3
|
||||
printf "SetBoot = Call3:\n"
|
||||
monitor long 0x40000210 = 0x8011113
|
||||
end
|
||||
# Boot RAM start_addr4() Init console, Run if ( v40000210 & 0x4000000 )
|
||||
define SetBootCall4
|
||||
printf "SetBoot = Call4:\n"
|
||||
monitor long 0x40000210 = 0x4011113
|
||||
end
|
||||
# CPU CLK 166 MHz?
|
||||
define SetClk166MHz
|
||||
printf "SetCLK 166.66MHz:\n"
|
||||
monitor long 0x40000014 = 0x00000011
|
||||
end
|
||||
# CPU CLK 83 MHz?
|
||||
define SetClk83MHz
|
||||
printf "SetCLK 83.33MHz:\n"
|
||||
monitor long 0x40000014 = 0x00000021
|
||||
end
|
||||
###############
|
||||
# System Init #
|
||||
###############
|
||||
define SystemInit
|
||||
printf "System Init:\n"
|
||||
monitor long 0x40000304 = 0x1FC00002
|
||||
monitor long 0x40000250 = 0x400
|
||||
monitor long 0x40000340 = 0x0
|
||||
monitor long 0x40000230 = 0xdcc4
|
||||
monitor long 0x40000210 = 0x11113
|
||||
monitor long 0x400002c0 = 0x110011
|
||||
monitor long 0x40000320 = 0xffffffff
|
||||
end
|
||||
############
|
||||
# SPI Init #
|
||||
############
|
||||
define SPI_Init
|
||||
printf "Init SPI:\n"
|
||||
#enable spi flash peripheral clock
|
||||
set $Temp = {int}(0x40000230)
|
||||
set $Temp = ($Temp | 0x300)
|
||||
set {int}(0x40000230) = $Temp
|
||||
#enable spi flash peripheral
|
||||
set $Temp = {int}(0x40000210)
|
||||
set $Temp = ($Temp | 0x10)
|
||||
set {int}(0x40000210) = $Temp
|
||||
#select spi flash pinout (0 - internal), enable spi flash pins
|
||||
set $Temp = {int}(0x400002C0)
|
||||
set $Temp = (($Temp & 0xFFFFFFF8) | 1)
|
||||
set {int}(0x400002C0) = $Temp
|
||||
#disable SPI FLASH operation
|
||||
monitor long 0x40006008 = 0
|
||||
#disable all interrupts
|
||||
monitor long 0x4000602C = 0
|
||||
#use first "slave select" pin
|
||||
monitor long 0x40006010 = 1
|
||||
#baud rate, default value
|
||||
monitor long 0x40006014 = 2
|
||||
#tx fifo threshold
|
||||
monitor long 0x40006018 = 0
|
||||
#rx fifo threshold
|
||||
monitor long 0x4000601C = 0
|
||||
#disable DMA
|
||||
monitor long 0x4000604C = 0
|
||||
set $SPI_FLASH_BASE = 0x98000000
|
||||
end
|
||||
###################
|
||||
# GetOtaSize #
|
||||
###################
|
||||
define GetOtaSize
|
||||
set $rambuffer = 0x10000300
|
||||
printf "Get ImagesSize:\n"
|
||||
set $ImageOtaSize = 0
|
||||
restore $arg0 binary $rambuffer 0 4
|
||||
set $ImageAddSize = {int}($rambuffer+0)
|
||||
if $ImageAddSize != 0
|
||||
printf "Image2Size = %d\n", $ImageAddSize
|
||||
set $ImageOtaSize = $ImageOtaSize + $ImageAddSize + 16
|
||||
set $parms1 = $rambuffer - $ImageOtaSize
|
||||
set $parms3 = $ImageOtaSize + 4
|
||||
restore $arg0 binary $parms1 $ImageOtaSize $parms3
|
||||
set $ImageAddSize = {int}($rambuffer+0)
|
||||
if $ImageAddSize < 0x200000
|
||||
printf "ImageSdramSize = %d\n", $ImageAddSize
|
||||
set $ImageOtaSize = $ImageOtaSize + $ImageAddSize + 20
|
||||
end
|
||||
else
|
||||
printf "Image2Size = %d !\n", $ImageOtaSize
|
||||
end
|
||||
end
|
||||
#####################
|
||||
# Flash Images Info #
|
||||
#####################
|
||||
define FlashImagesInfo
|
||||
printf "Flash Info:\n"
|
||||
set $Image1Size = {int}($SPI_FLASH_BASE + 0x10) + 32
|
||||
set $Image1LoadAddr = {int}($SPI_FLASH_BASE + 0x14)
|
||||
if $Image1LoadAddr == 0xFFFFFFFF
|
||||
printf "Image1 - None\n"
|
||||
else
|
||||
set $Image2FlashAddr = {short}($SPI_FLASH_BASE + 0x18) * 1024
|
||||
if $Image2FlashAddr == 0
|
||||
$Image2FlashAddr = $Image1Size
|
||||
end
|
||||
set $Image2Size = {int}($Image2FlashAddr + $SPI_FLASH_BASE)
|
||||
set $Image2LoadAddr = {int}($Image2FlashAddr + $SPI_FLASH_BASE + 0x4)
|
||||
printf "Image1Size = %d\n", $Image1Size
|
||||
printf "Image1LoadAddr = 0x%08x\n", $Image1LoadAddr
|
||||
printf "Image2FlashAddr = 0x%08x\n", $Image2FlashAddr
|
||||
if $Image2Size != 0xFFFFFFFF
|
||||
printf "Image2Size = %d\n", $Image2Size
|
||||
printf "Image2LoadAddr = 0x%08x\n", $Image2LoadAddr
|
||||
else
|
||||
printf "Image2 - None\n"
|
||||
end
|
||||
end
|
||||
set $ImageOtaAddr = {int}($SPI_FLASH_BASE + 0x9000)
|
||||
if $ImageOtaAddr != 0x80000
|
||||
printf "ImageOtaAddr = 0x%08x - Invalid!\n", $ImageOtaAddr
|
||||
else
|
||||
printf "ImageOtaAddr = 0x%08x\n", $ImageOtaAddr
|
||||
end
|
||||
end
|
||||
###############
|
||||
# FlasherInit #
|
||||
###############
|
||||
define FlasherInit
|
||||
set $rtl8710_flasher_capacity = 0
|
||||
set $rtl8710_flasher_auto_erase = 1
|
||||
set $rtl8710_flasher_auto_verify = 1
|
||||
set $rtl8710_flasher_firmware_ptr = 0x10001000
|
||||
set $rtl8710_flasher_buffer = 0x10008000
|
||||
set $rtl8710_flasher_buffer_size = 421888
|
||||
set $rtl8710_flasher_sector_size = 4096
|
||||
set $rtl8710_flasher_auto_erase_sector = 0xFFFFFFFF
|
||||
end
|
||||
###############
|
||||
# FlasherWait #
|
||||
###############
|
||||
define FlasherWait
|
||||
set $fresult = {int}($rtl8710_flasher_buffer)
|
||||
while ($fresult != 0)
|
||||
set $fresult = {int}($rtl8710_flasher_buffer)
|
||||
end
|
||||
end
|
||||
###############
|
||||
# FlasherLoad #
|
||||
###############
|
||||
define FlasherLoad
|
||||
if $rtl8710_flasher_capacity == 0
|
||||
printf "initializing RTL8710 flasher\n"
|
||||
restore $arg0 binary $rtl8710_flasher_firmware_ptr 0 968
|
||||
monitor reset
|
||||
set $pc = $rtl8710_flasher_firmware_ptr
|
||||
set $sp = 0x1ffffffc
|
||||
set {int}($rtl8710_flasher_buffer + 0x08) = 0
|
||||
set {int}($rtl8710_flasher_buffer + 0x00) = 1
|
||||
#continue
|
||||
monitor go
|
||||
FlasherWait
|
||||
set $id = {int}($rtl8710_flasher_buffer + 0x0C)
|
||||
set $rtl8710_flasher_capacity = 1 << (($id >> 16) & 0x0ff)
|
||||
if ($id == 0x1420c2)
|
||||
printf "Flash ID = 0x%08x : MX25L8006E (%d kbytes)\n", $id, $rtl8710_flasher_capacity>>10
|
||||
else
|
||||
printf "Flash ID = 0x%08x : (%d kbytes)\n", $id, $rtl8710_flasher_capacity>>10
|
||||
end
|
||||
printf "RTL8710 flasher initialized\n"
|
||||
else
|
||||
printf "reinitializing RTL8710 flasher\n"
|
||||
end
|
||||
end
|
||||
##################
|
||||
# FlasherRdBlock #
|
||||
##################
|
||||
define FlasherRdBlock
|
||||
#printf "FlashRdBlock 0x%08x, 0x%08x\n", $arg0, $arg1
|
||||
set {int}($rtl8710_flasher_buffer + 0x04) = 3
|
||||
set {int}($rtl8710_flasher_buffer + 0x08) = 0
|
||||
set {int}($rtl8710_flasher_buffer + 0x10) = $arg0
|
||||
set {int}($rtl8710_flasher_buffer + 0x14) = $arg1
|
||||
set {int}($rtl8710_flasher_buffer + 0x00) = 1
|
||||
FlasherWait
|
||||
set $status = {int}($rtl8710_flasher_buffer + 0x08)
|
||||
if $status > 0
|
||||
error "read error, offset 0x%08x", $arg0
|
||||
end
|
||||
end
|
||||
##################
|
||||
# FlasherWrBlock #
|
||||
##################
|
||||
define FlasherWrBlock
|
||||
#printf "FlashWrBlock 0x%08x, 0x%08x\n", $arg0, $arg1
|
||||
set {int}($rtl8710_flasher_buffer + 0x04) = 4
|
||||
set {int}($rtl8710_flasher_buffer + 0x08) = 0
|
||||
set {int}($rtl8710_flasher_buffer + 0x10) = $arg0
|
||||
set {int}($rtl8710_flasher_buffer + 0x14) = $arg1
|
||||
set {int}($rtl8710_flasher_buffer + 0x00) = 1
|
||||
FlasherWait
|
||||
set $status = {int}($rtl8710_flasher_buffer + 0x08)
|
||||
if $status > 0
|
||||
error "write error, offset 0x%08x", $arg0
|
||||
end
|
||||
end
|
||||
##################
|
||||
# FlasherVrBlock #
|
||||
##################
|
||||
define FlasherVrBlock
|
||||
#printf "FlashVrBlock 0x%08x, 0x%08x\n", $arg0, $arg1
|
||||
set {int}($rtl8710_flasher_buffer + 0x04) = 5
|
||||
set {int}($rtl8710_flasher_buffer + 0x08) = 0
|
||||
set {int}($rtl8710_flasher_buffer + 0x10) = $arg0
|
||||
set {int}($rtl8710_flasher_buffer + 0x14) = $arg1
|
||||
set {int}($rtl8710_flasher_buffer + 0x00) = 1
|
||||
FlasherWait
|
||||
set $status = {int}($rtl8710_flasher_buffer + 0x08)
|
||||
if $status > 0
|
||||
set $status = {int}($rtl8710_flasher_buffer + 0x0C)
|
||||
set $status = {int}($status + $arg0)
|
||||
error "verify error, offset 0x%08x", $status
|
||||
end
|
||||
end
|
||||
#################
|
||||
# FlashSecErase #
|
||||
#################
|
||||
define FlashSecErase
|
||||
#printf "FlashSecErase 0x%08x, 0x%08x\n", $rtl8710_flasher_buffer, $arg0
|
||||
set {int}($rtl8710_flasher_buffer + 0x04) = 2
|
||||
set {int}($rtl8710_flasher_buffer + 0x08) = 0
|
||||
set {int}($rtl8710_flasher_buffer + 0x10) = $arg0
|
||||
set {int}($rtl8710_flasher_buffer + 0x00) = 1
|
||||
FlasherWait
|
||||
end
|
||||
################
|
||||
# FlasherWrite #
|
||||
################
|
||||
define FlasherWrite
|
||||
set $sector = 0
|
||||
set $offset = 0
|
||||
set $size = $arg2
|
||||
while $offset < $size
|
||||
set $len = $size - $offset
|
||||
if $len > $rtl8710_flasher_buffer_size
|
||||
set $len = $rtl8710_flasher_buffer_size
|
||||
end
|
||||
set $flash_offset = $arg1 + $offset
|
||||
printf "write offset 0x%08x\n", $flash_offset
|
||||
set $parms1 = $rtl8710_flasher_buffer + 0x20 - $offset
|
||||
set $parms2 = $offset
|
||||
set $parms3 = $offset + $len
|
||||
restore $arg0 binary $parms1 $parms2 $parms3
|
||||
if $rtl8710_flasher_auto_erase != 0
|
||||
set $count_i = $flash_offset
|
||||
while $count_i < ($flash_offset + $len)
|
||||
set $sector = $count_i/$rtl8710_flasher_sector_size
|
||||
if $rtl8710_flasher_auto_erase_sector != $sector
|
||||
set $parms1 = $sector * $rtl8710_flasher_sector_size
|
||||
printf "erase sector %d at 0x%08x\n", $sector, $parms1
|
||||
FlashSecErase $parms1
|
||||
set $rtl8710_flasher_auto_erase_sector = $sector
|
||||
end
|
||||
set $count_i = $count_i + 1
|
||||
end
|
||||
end
|
||||
FlasherWrBlock $flash_offset $len
|
||||
printf "write %d bytes at 0x%08x\n", $len, $flash_offset
|
||||
if $rtl8710_flasher_auto_verify != 0
|
||||
printf "verify offset 0x%08x len %d\n", $flash_offset, $len
|
||||
FlasherVrBlock $flash_offset $len
|
||||
end
|
||||
set $offset = $offset + $rtl8710_flasher_buffer_size
|
||||
end
|
||||
end
|
||||
#########################################
|
||||
InitJlink
|
||||
SystemInit
|
||||
SetClk166MHz
|
||||
SPI_Init
|
||||
GetOtaSize build/bin/ota.bin
|
||||
if $ImageOtaSize != 0
|
||||
FlasherInit
|
||||
FlasherLoad flasher/rtl8710_flasher.bin
|
||||
set $FixOtaAddr = 0x80000
|
||||
set $pbuffer = $rtl8710_flasher_buffer + 0x20
|
||||
FlasherRdBlock 0x9000 0x1000
|
||||
set $ImageOtaAddr = {int}($pbuffer)
|
||||
if $ImageOtaAddr != $FixOtaAddr
|
||||
printf "ImageOtaAddr = 0x%08x - Invalid!\n", $ImageOtaAddr
|
||||
set {int}($pbuffer) = $FixOtaAddr
|
||||
set $Temp = $ImageOtaAddr & $FixOtaAddr
|
||||
if $Temp != $FixOtaAddr
|
||||
printf "FlashSecErase at 0x9000\n"
|
||||
FlashSecErase 0x9000
|
||||
printf "Write offset 0x9000 4096 bytes\n"
|
||||
FlasherWrBlock 0x9000 0x1000
|
||||
else
|
||||
printf "Write offset 0x9000 4 bytes\n"
|
||||
FlasherWrBlock 0x9000 0x0004
|
||||
end
|
||||
end
|
||||
FlasherWrite build/bin/ota.bin $FixOtaAddr $ImageOtaSize
|
||||
restore build/bin/ota.bin binary $pbuffer 0 0x1000
|
||||
set {int}($pbuffer + 0x08) = 0x35393138
|
||||
set {int}($pbuffer + 0x0C) = 0x31313738
|
||||
FlasherWrBlock $FixOtaAddr 0x10
|
||||
FlashImagesInfo
|
||||
end
|
||||
monitor reset
|
||||
SetBootFlash
|
||||
monitor go
|
||||
quit
|
|
@ -1,16 +0,0 @@
|
|||
# GDB Jlink read fullflash
|
||||
# Init
|
||||
source -v flasher/gdb_flasher.jlink
|
||||
InitJlink
|
||||
SystemInit
|
||||
SPI_Init
|
||||
#FlashInfo
|
||||
# Read FullFlash
|
||||
printf "Read FullFlash:\n"
|
||||
set $dumpstartaddr = $SPI_FLASH_BASE
|
||||
set $dumpendaddr = $SPI_FLASH_BASE + 0x100000
|
||||
printf "Start addr of dumping = 0x%08x\n", $dumpstartaddr
|
||||
printf "End addr of dumping = 0x%08x\n", $dumpendaddr
|
||||
dump binary memory ./build/bin/fullflash.bin $dumpstartaddr $dumpendaddr
|
||||
printf "FullFlash saved in ./build/bin/fullflash.bin - OK.\n"
|
||||
quit
|
|
@ -1,11 +0,0 @@
|
|||
#
|
||||
# J-LINK GDB SERVER initialization
|
||||
#
|
||||
source -v flasher/gdb_flasher.jlink
|
||||
InitJlink
|
||||
load build/obj/build.axf
|
||||
SetBootCall4
|
||||
monitor reset
|
||||
monitor go
|
||||
quit
|
||||
|
|
@ -1,156 +0,0 @@
|
|||
###############
|
||||
# FlasherInit #
|
||||
###############
|
||||
define FlasherInit
|
||||
set $rtl8710_flasher_capacity = 0
|
||||
set $rtl8710_flasher_auto_erase = 1
|
||||
set $rtl8710_flasher_auto_verify = 1
|
||||
set $rtl8710_flasher_firmware_ptr = 0x10001000
|
||||
set $rtl8710_flasher_buffer = 0x10008000
|
||||
set $rtl8710_flasher_buffer_size = 421888
|
||||
set $rtl8710_flasher_sector_size = 4096
|
||||
set $rtl8710_flasher_auto_erase_sector = 0xFFFFFFFF
|
||||
end
|
||||
###############
|
||||
# FlasherWait #
|
||||
###############
|
||||
define FlasherWait
|
||||
set $fresult = {int}($rtl8710_flasher_buffer)
|
||||
while ($fresult != 0)
|
||||
set $fresult = {int}($rtl8710_flasher_buffer)
|
||||
end
|
||||
end
|
||||
###############
|
||||
# FlasherLoad #
|
||||
###############
|
||||
define FlasherLoad
|
||||
if $rtl8710_flasher_capacity == 0
|
||||
printf "initializing RTL8710 flasher\n"
|
||||
restore $arg0 binary $rtl8710_flasher_firmware_ptr 0 968
|
||||
monitor reset
|
||||
set $pc = $rtl8710_flasher_firmware_ptr
|
||||
set $sp = 0x1ffffffc
|
||||
set {int}($rtl8710_flasher_buffer + 0x08) = 0
|
||||
set {int}($rtl8710_flasher_buffer + 0x00) = 1
|
||||
#continue
|
||||
monitor go
|
||||
FlasherWait
|
||||
set $id = {int}($rtl8710_flasher_buffer + 0x0C)
|
||||
set $rtl8710_flasher_capacity = 1 << (($id >> 16) & 0x0ff)
|
||||
if ($id == 0x1420c2)
|
||||
printf "Flash ID = 0x%08x : MX25L8006E (%d kbytes)\n", $id, $rtl8710_flasher_capacity>>10
|
||||
else
|
||||
printf "Flash ID = 0x%08x : (%d kbytes)\n", $id, $rtl8710_flasher_capacity>>10
|
||||
end
|
||||
printf "RTL8710 flasher initialized\n"
|
||||
else
|
||||
printf "reinitializing RTL8710 flasher\n"
|
||||
end
|
||||
end
|
||||
##################
|
||||
# FlasherWrBlock #
|
||||
##################
|
||||
define FlasherWrBlock
|
||||
#printf "FlashWrBlock 0x%08x, 0x%08x\n", $arg0, $arg1
|
||||
set {int}($rtl8710_flasher_buffer + 0x04) = 4
|
||||
set {int}($rtl8710_flasher_buffer + 0x08) = 0
|
||||
set {int}($rtl8710_flasher_buffer + 0x10) = $arg0
|
||||
set {int}($rtl8710_flasher_buffer + 0x14) = $arg1
|
||||
set {int}($rtl8710_flasher_buffer + 0x00) = 1
|
||||
FlasherWait
|
||||
set $status = {int}($rtl8710_flasher_buffer + 0x08)
|
||||
if $status > 0
|
||||
error "write error, offset 0x%08x", $arg0
|
||||
end
|
||||
end
|
||||
##################
|
||||
# FlasherVrBlock #
|
||||
##################
|
||||
define FlasherVrBlock
|
||||
#printf "FlashVrBlock 0x%08x, 0x%08x\n", $arg0, $arg1
|
||||
set {int}($rtl8710_flasher_buffer + 0x04) = 5
|
||||
set {int}($rtl8710_flasher_buffer + 0x08) = 0
|
||||
set {int}($rtl8710_flasher_buffer + 0x10) = $arg0
|
||||
set {int}($rtl8710_flasher_buffer + 0x14) = $arg1
|
||||
set {int}($rtl8710_flasher_buffer + 0x00) = 1
|
||||
FlasherWait
|
||||
set $status = {int}($rtl8710_flasher_buffer + 0x08)
|
||||
if $status > 0
|
||||
set $status = {int}($rtl8710_flasher_buffer + 0x0C)
|
||||
set $status = {int}($status + $arg0)
|
||||
error "verify error, offset 0x%08x", $status
|
||||
end
|
||||
end
|
||||
#################
|
||||
# FlashSecErase #
|
||||
#################
|
||||
define FlashSecErase
|
||||
#printf "FlashSecErase 0x%08x, 0x%08x\n", $rtl8710_flasher_buffer, $arg0
|
||||
set {int}($rtl8710_flasher_buffer + 0x04) = 2
|
||||
set {int}($rtl8710_flasher_buffer + 0x08) = 0
|
||||
set {int}($rtl8710_flasher_buffer + 0x10) = $arg0
|
||||
set {int}($rtl8710_flasher_buffer + 0x00) = 1
|
||||
FlasherWait
|
||||
end
|
||||
################
|
||||
# FlasherWrite #
|
||||
################
|
||||
define FlasherWrite
|
||||
set $sector = 0
|
||||
set $offset = 0
|
||||
set $size = $arg2
|
||||
while $offset < $size
|
||||
set $len = $size - $offset
|
||||
if $len > $rtl8710_flasher_buffer_size
|
||||
set $len = $rtl8710_flasher_buffer_size
|
||||
end
|
||||
set $flash_offset = $arg1 + $offset
|
||||
printf "write offset 0x%08x\n", $flash_offset
|
||||
set $parms1 = $rtl8710_flasher_buffer + 0x20 - $offset
|
||||
set $parms2 = $offset
|
||||
set $parms3 = $offset + $len
|
||||
restore $arg0 binary $parms1 $parms2 $parms3
|
||||
if $rtl8710_flasher_auto_erase != 0
|
||||
set $count_i = $flash_offset
|
||||
while $count_i < ($flash_offset + $len)
|
||||
set $sector = $count_i/$rtl8710_flasher_sector_size
|
||||
if $rtl8710_flasher_auto_erase_sector != $sector
|
||||
set $parms1 = $sector * $rtl8710_flasher_sector_size
|
||||
printf "erase sector %d at 0x%08x\n", $sector, $parms1
|
||||
FlashSecErase $parms1
|
||||
set $rtl8710_flasher_auto_erase_sector = $sector
|
||||
end
|
||||
set $count_i = $count_i + 1
|
||||
end
|
||||
end
|
||||
FlasherWrBlock $flash_offset $len
|
||||
printf "wrote %d bytes at 0x%08x\n", $len, $flash_offset
|
||||
if $rtl8710_flasher_auto_verify != 0
|
||||
printf "verify offset 0x%08x len %d\n", $flash_offset, $len
|
||||
FlasherVrBlock $flash_offset $len
|
||||
end
|
||||
set $offset = $offset + $rtl8710_flasher_buffer_size
|
||||
end
|
||||
end
|
||||
#########################################
|
||||
source -v flasher/gdb_flasher.jlink
|
||||
source -v flasher/file_info.jlink
|
||||
InitJlink
|
||||
SystemInit
|
||||
SetClk83MHz
|
||||
SPI_Init
|
||||
FlasherInit
|
||||
FlasherLoad flasher/rtl8710_flasher.bin
|
||||
call1
|
||||
if $ImageSize != 0
|
||||
set $ImageEnd = $ImageSize + $ImageAddr + 0x4000
|
||||
if $rtl8710_flasher_capacity >= $ImageEnd
|
||||
printf "Write Image size %d to Flash addr 0x%08x:\n", $ImageSize, $ImageAddr
|
||||
call2
|
||||
else
|
||||
printf "Error: Image size is too big!\n"
|
||||
end
|
||||
else
|
||||
printf "Error: Image size is zero!\n"
|
||||
end
|
||||
quit
|
|
@ -1,169 +0,0 @@
|
|||
###############
|
||||
# FlasherInit #
|
||||
###############
|
||||
define FlasherInit
|
||||
set $rtl8710_flasher_capacity = 0
|
||||
set $rtl8710_flasher_auto_erase = 1
|
||||
set $rtl8710_flasher_auto_verify = 1
|
||||
set $rtl8710_flasher_firmware_ptr = 0x10001000
|
||||
set $rtl8710_flasher_buffer = 0x10008000
|
||||
set $rtl8710_flasher_buffer_size = 421888
|
||||
set $rtl8710_flasher_sector_size = 4096
|
||||
set $rtl8710_flasher_auto_erase_sector = 0xFFFFFFFF
|
||||
end
|
||||
###############
|
||||
# FlasherWait #
|
||||
###############
|
||||
define FlasherWait
|
||||
set $fresult = {int}($rtl8710_flasher_buffer)
|
||||
while ($fresult != 0)
|
||||
set $fresult = {int}($rtl8710_flasher_buffer)
|
||||
end
|
||||
end
|
||||
###############
|
||||
# FlasherLoad #
|
||||
###############
|
||||
define FlasherLoad
|
||||
if $rtl8710_flasher_capacity == 0
|
||||
printf "initializing RTL8710 flasher\n"
|
||||
restore $arg0 binary $rtl8710_flasher_firmware_ptr 0 968
|
||||
monitor reset
|
||||
set $pc = $rtl8710_flasher_firmware_ptr
|
||||
set $sp = 0x1ffffffc
|
||||
set {int}($rtl8710_flasher_buffer + 0x08) = 0
|
||||
set {int}($rtl8710_flasher_buffer + 0x00) = 1
|
||||
#continue
|
||||
monitor go
|
||||
FlasherWait
|
||||
set $id = {int}($rtl8710_flasher_buffer + 0x0C)
|
||||
set $rtl8710_flasher_capacity = 1 << (($id >> 16) & 0x0ff)
|
||||
if ($id == 0x1420c2)
|
||||
printf "Flash ID = 0x%08x : MX25L8006E (%d kbytes)\n", $id, $rtl8710_flasher_capacity>>10
|
||||
else
|
||||
printf "Flash ID = 0x%08x : (%d kbytes)\n", $id, $rtl8710_flasher_capacity>>10
|
||||
end
|
||||
printf "RTL8710 flasher initialized\n"
|
||||
else
|
||||
printf "reinitializing RTL8710 flasher\n"
|
||||
end
|
||||
end
|
||||
##################
|
||||
# FlasherWrBlock #
|
||||
##################
|
||||
define FlasherWrBlock
|
||||
#printf "FlashWrBlock 0x%08x, 0x%08x\n", $arg0, $arg1
|
||||
set {int}($rtl8710_flasher_buffer + 0x04) = 4
|
||||
set {int}($rtl8710_flasher_buffer + 0x08) = 0
|
||||
set {int}($rtl8710_flasher_buffer + 0x10) = $arg0
|
||||
set {int}($rtl8710_flasher_buffer + 0x14) = $arg1
|
||||
set {int}($rtl8710_flasher_buffer + 0x00) = 1
|
||||
FlasherWait
|
||||
set $status = {int}($rtl8710_flasher_buffer + 0x08)
|
||||
if $status > 0
|
||||
error "write error, offset 0x%08x", $arg0
|
||||
end
|
||||
end
|
||||
##################
|
||||
# FlasherVrBlock #
|
||||
##################
|
||||
define FlasherVrBlock
|
||||
#printf "FlashVrBlock 0x%08x, 0x%08x\n", $arg0, $arg1
|
||||
set {int}($rtl8710_flasher_buffer + 0x04) = 5
|
||||
set {int}($rtl8710_flasher_buffer + 0x08) = 0
|
||||
set {int}($rtl8710_flasher_buffer + 0x10) = $arg0
|
||||
set {int}($rtl8710_flasher_buffer + 0x14) = $arg1
|
||||
set {int}($rtl8710_flasher_buffer + 0x00) = 1
|
||||
FlasherWait
|
||||
set $status = {int}($rtl8710_flasher_buffer + 0x08)
|
||||
if $status > 0
|
||||
set $status = {int}($rtl8710_flasher_buffer + 0x0C)
|
||||
set $status = {int}($status + $arg0)
|
||||
error "verify error, offset 0x%08x", $status
|
||||
end
|
||||
end
|
||||
#################
|
||||
# FlashSecErase #
|
||||
#################
|
||||
define FlashSecErase
|
||||
#printf "FlashSecErase 0x%08x, 0x%08x\n", $rtl8710_flasher_buffer, $arg0
|
||||
set {int}($rtl8710_flasher_buffer + 0x04) = 2
|
||||
set {int}($rtl8710_flasher_buffer + 0x08) = 0
|
||||
set {int}($rtl8710_flasher_buffer + 0x10) = $arg0
|
||||
set {int}($rtl8710_flasher_buffer + 0x00) = 1
|
||||
FlasherWait
|
||||
end
|
||||
################
|
||||
# FlasherWrite #
|
||||
################
|
||||
define FlasherWrite
|
||||
set $sector = 0
|
||||
set $offset = 0
|
||||
set $size = $arg2
|
||||
while $offset < $size
|
||||
set $len = $size - $offset
|
||||
if $len > $rtl8710_flasher_buffer_size
|
||||
set $len = $rtl8710_flasher_buffer_size
|
||||
end
|
||||
set $flash_offset = $arg1 + $offset
|
||||
printf "write offset 0x%08x\n", $flash_offset
|
||||
set $parms1 = $rtl8710_flasher_buffer + 0x20 - $flash_offset
|
||||
set $parms2 = $flash_offset
|
||||
set $parms3 = $flash_offset + $len
|
||||
restore $arg0 binary $parms1 $parms2 $parms3
|
||||
if $rtl8710_flasher_auto_erase != 0
|
||||
set $count_i = $flash_offset
|
||||
while $count_i < ($flash_offset + $len)
|
||||
set $sector = $count_i/$rtl8710_flasher_sector_size
|
||||
if $rtl8710_flasher_auto_erase_sector != $sector
|
||||
set $parms1 = $sector * $rtl8710_flasher_sector_size
|
||||
printf "erase sector %d at 0x%08x\n", $sector, $parms1
|
||||
FlashSecErase $parms1
|
||||
set $rtl8710_flasher_auto_erase_sector = $sector
|
||||
end
|
||||
set $count_i = $count_i + 1
|
||||
end
|
||||
end
|
||||
FlasherWrBlock $flash_offset $len
|
||||
printf "wrote %d bytes at 0x%08x\n", $len, $flash_offset
|
||||
if $rtl8710_flasher_auto_verify != 0
|
||||
printf "verify offset 0x%08x len %d\n", $flash_offset, $len
|
||||
FlasherVrBlock $flash_offset $len
|
||||
end
|
||||
set $offset = $offset + $rtl8710_flasher_buffer_size
|
||||
end
|
||||
end
|
||||
#########################################
|
||||
source -v flasher/gdb_flasher.jlink
|
||||
source -v flasher/flash_file.jlink
|
||||
InitJlink
|
||||
SystemInit
|
||||
SetClk166MHz
|
||||
SPI_Init
|
||||
FlashImagesInfo
|
||||
#SetFirwareSize $wr_flile
|
||||
call1
|
||||
if $FirmwareSize == 0
|
||||
error "FirmwareSize = 0!"
|
||||
end
|
||||
FlasherInit
|
||||
FlasherLoad flasher/rtl8710_flasher.bin
|
||||
if $Image1Size != 0
|
||||
printf "Write Image1 size %d to Flash addr 0x00000000:\n", $Image1Size
|
||||
#FlasherWrite $wr_flile 0 $Image1Size
|
||||
call2
|
||||
if $Image2Size != 0 && $Image2Addr >= $Image1Size
|
||||
if $Image3Size != 0 && $Image3Addr > $Image2Size
|
||||
set $Image2Size = $Image2Size + $Image3Size
|
||||
printf "Write Image2&3 size %d to Flash addr 0x%08x:\n", $Image2Size, $Image2Addr
|
||||
else
|
||||
printf "Write Image2 size %d to Flash addr 0x%08x:\n", $Image2Size, $Image2Addr
|
||||
end
|
||||
#FlasherWrite $wr_flile $Image2Addr $Image2Size
|
||||
call3
|
||||
end
|
||||
end
|
||||
FlashImagesInfo
|
||||
monitor reset
|
||||
SetBootFlash
|
||||
monitor go
|
||||
quit
|
|
@ -1,356 +0,0 @@
|
|||
#
|
||||
# OpenOCD script for RTL8710
|
||||
# Copyright (C) 2016 Rebane, rebane@alkohol.ee
|
||||
#
|
||||
set CHIPNAME rtl8195a
|
||||
set CHIPSERIES ameba1
|
||||
|
||||
# Adapt based on what transport is active.
|
||||
|
||||
source [find target/swj-dp.tcl]
|
||||
|
||||
if { [info exists CHIPNAME] } {
|
||||
set _CHIPNAME $CHIPNAME
|
||||
} else {
|
||||
set _CHIPNAME rtl8710
|
||||
}
|
||||
|
||||
if { [info exists ENDIAN] } {
|
||||
set _ENDIAN $ENDIAN
|
||||
} else {
|
||||
set _ENDIAN little
|
||||
}
|
||||
|
||||
if { [info exists WORKAREASIZE] } {
|
||||
set _WORKAREASIZE $WORKAREASIZE
|
||||
} else {
|
||||
set _WORKAREASIZE 0x800
|
||||
}
|
||||
|
||||
if { [info exists CPUTAPID] } {
|
||||
set _CPUTAPID $CPUTAPID
|
||||
} else {
|
||||
set _CPUTAPID 0x2ba01477
|
||||
}
|
||||
|
||||
swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
|
||||
|
||||
set _TARGETNAME $_CHIPNAME.cpu
|
||||
target create $_TARGETNAME cortex_m -endian $_ENDIAN -chain-position $_TARGETNAME
|
||||
|
||||
$_TARGETNAME configure -work-area-phys 0x10001000 -work-area-size $_WORKAREASIZE -work-area-backup 0
|
||||
|
||||
# adapter_khz 500
|
||||
adapter_nsrst_delay 100
|
||||
|
||||
if {![using_hla]} {
|
||||
cortex_m reset_config sysresetreq vectreset
|
||||
}
|
||||
|
||||
set rtl8710_flasher_firmware_ptr 0x10001000
|
||||
set rtl8710_flasher_buffer 0x10008000
|
||||
set rtl8710_flasher_buffer_size 262144
|
||||
set rtl8710_flasher_sector_size 4096
|
||||
|
||||
array set rtl8710_flasher_code {
|
||||
0 0xB671B57F 1 0x25FF4B58 2 0x6B196B1A 3 0x7040F042 4 0x69D96318 5 0xF4414E55
|
||||
6 0x69D97480 7 0xF8D361DC 8 0xF8C32120 9 0xF8D35120 10 0xF8C31124 11 0x47B05124
|
||||
12 0x47B04E4F 13 0x47984B4F 14 0x60104A4F 15 0x484F47B0 16 0x60012100 17 0x2C006804
|
||||
18 0x4D4DD0FC 19 0xB93E682E 20 0x60264C49 21 0x47B04E46 22 0x47984B46 23 0xE7ED6020
|
||||
24 0x2B01682B 25 0x4E42D109 26 0x4C4647B0 27 0x47A02006 28 0x47904A45 29 0x47A020C7
|
||||
30 0x682AE00D 31 0xD10E2A02 32 0x47B04E3B 33 0x20064C3F 34 0x483F47A0 35 0x493F4780
|
||||
36 0x68084D3F 37 0x47B047A8 38 0x47A02004 39 0x6828E7CE 40 0xD1132803 41 0x47A04C32
|
||||
42 0x24004838 43 0x4E396805 44 0x68311960 45 0xD206428C 46 0x4B384A37 47 0x221018A1
|
||||
48 0x34104798 49 0x4D2AE7F3 50 0xE7B847A8 51 0x29046829 52 0x2400D11B 53 0x6806482F
|
||||
54 0xD2B042B4 55 0x47A84D24 56 0x20064E28 57 0x4B2847B0 58 0x49284798 59 0x680A4B2A
|
||||
60 0x18A018E1 61 0xF44F4B2A 62 0x47987280 63 0x200447A8 64 0xF50447B0 65 0x47A87480
|
||||
66 0x682CE7E4 67 0xD1232C05 68 0x47984B17 69 0x4D1F2400 70 0x4294682A 71 0x481BD28F
|
||||
72 0x68012210 73 0x18604E1D 74 0x47B04669 75 0x1B19682B 76 0xBF282910 77 0x23002110
|
||||
78 0xD011428B 79 0xF81D4A16 80 0x18A05003 81 0x42B55CC6 82 0x3301D101 83 0x4A15E7F4
|
||||
84 0x60112101 85 0xE7726054 86 0x25014E12 87 0xE76E6035 88 0x47A84D03 89 0xE7D63410
|
||||
90 0x40000200 91 0x100011BD 92 0x100013DD 93 0x10001289 94 0x1000800C 95 0x10008000
|
||||
96 0x10008004 97 0x1000130D 98 0x100013ED 99 0x10008010 100 0x10001335 101 0x10008014
|
||||
102 0x10008020 103 0x10001221 104 0x10001375 105 0x10008008 106 0x6A5A4B03 107 0xD0FB0512
|
||||
108 0x0060F893 109 0xBF004770 110 0x40006000 111 0x6B194B17 112 0xF4416B1A 113 0x63187040
|
||||
114 0x69186919 115 0x0110F041 116 0xF8D36119 117 0x220000C0 118 0x0106F020 119 0x00C0F8D3
|
||||
120 0x10C0F8C3 121 0x00C0F8D3 122 0x0101F040 123 0x00C0F8D3 124 0x10C0F8C3 125 0x43BCF503
|
||||
126 0x609A6899 127 0x20016AD9 128 0x691962DA 129 0x69596118 130 0x61592102 131 0x619A6999
|
||||
132 0x61DA69D9 133 0x64DA6CD9 134 0xBF004770 135 0x40000200 136 0x460EB570 137 0xB34A4614
|
||||
138 0xF3C04B15 139 0x681A4507 140 0x7240F44F 141 0x685A601A 142 0xF3C02103 143 0x2C102207
|
||||
144 0x2410BF28 145 0x605CB2C0 146 0x1060F883 147 0x5060F883 148 0xF8832101 149 0xF8832060
|
||||
150 0x689A0060 151 0x60992500 152 0x47984B08 153 0x35015570 154 0x42A2B2AA 155 0x4804D3F8
|
||||
156 0xF0116A81 157 0xD1FA0301 158 0x60836881 159 0xBD704620 160 0x40006000 161 0x100011A9
|
||||
162 0x4C10B5F8 163 0x68232003 164 0x7340F44F 165 0x68636023 166 0x60602101 167 0x68A3229F
|
||||
168 0x60A14D0B 169 0x2060F884 170 0x460647A8 171 0x460747A8 172 0x040347A8 173 0x2707EA43
|
||||
174 0x0006EA47 175 0x4B036AA1 176 0x0201F011 177 0x6899D1FA 178 0xBDF8609A 179 0x40006000
|
||||
180 0x100011A9 181 0x4C0BB510 182 0x68232001 183 0x7340F44F 184 0x68636023 185 0x60602105
|
||||
186 0x60A068A2 187 0xF8844A06 188 0x47901060 189 0x4B036AA1 190 0x0201F011 191 0x6899D1FA
|
||||
192 0xBD10609A 193 0x40006000 194 0x100011A9 195 0x21014B08 196 0xF44F681A 197 0x601A7280
|
||||
198 0x6099689A 199 0x0060F883 200 0x48036A9A 201 0x0101F012 202 0x6883D1FA 203 0x47706081
|
||||
204 0x40006000 205 0x21014B0E 206 0xF44F681A 207 0x601A7280 208 0x2220689A 209 0xF8836099
|
||||
210 0xF3C02060 211 0xF3C04107 212 0xB2C02207 213 0x1060F883 214 0x2060F883 215 0x0060F883
|
||||
216 0x4A036A99 217 0x0001F011 218 0x6893D1FA 219 0x47706090 220 0x40006000 221 0xB36AB530
|
||||
222 0x25014B17 223 0xF44F681C 224 0x601C7480 225 0x2402689C 226 0xF883609D 227 0xF3C04060
|
||||
228 0xF3C04507 229 0xB2C02407 230 0x5060F883 231 0x7F80F5B2 232 0xF44FBF28 233 0xF8837280
|
||||
234 0xF8834060 235 0x20000060 236 0x4C095C0D 237 0xF8843001 238 0xB2855060 239 0xD3F74295
|
||||
240 0x07496A99 241 0x6AA0D5FC 242 0xF0104B03 243 0xD1FA0101 244 0x60996898 245 0xBD304610
|
||||
246 0x40006000 247 0x4B02B508 248 0x07C04798 249 0xBD08D4FB 250 0x100012D5 251 0x4B04B508
|
||||
252 0xF0004798 253 0xB2C10002 254 0xD0F82900 255 0xBF00BD08 256 0x100012D5
|
||||
}
|
||||
|
||||
set rtl8710_flasher_command_read_id 0
|
||||
set rtl8710_flasher_command_mass_erase 1
|
||||
set rtl8710_flasher_command_sector_erase 2
|
||||
set rtl8710_flasher_command_read 3
|
||||
set rtl8710_flasher_command_write 4
|
||||
set rtl8710_flasher_command_verify 5
|
||||
|
||||
set rtl8710_flasher_ready 0
|
||||
set rtl8710_flasher_capacity 0
|
||||
set rtl8710_flasher_auto_erase 0
|
||||
set rtl8710_flasher_auto_verify 0
|
||||
set rtl8710_flasher_auto_erase_sector 0xFFFFFFFF
|
||||
|
||||
proc rtl8710_flasher_init {} {
|
||||
global rtl8710_flasher_firmware_ptr
|
||||
global rtl8710_flasher_buffer
|
||||
global rtl8710_flasher_capacity
|
||||
global rtl8710_flasher_ready
|
||||
global rtl8710_flasher_code
|
||||
|
||||
if {[expr {$rtl8710_flasher_ready == 0}]} {
|
||||
echo "initializing RTL8710 flasher"
|
||||
halt
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x08}] 0x00000000
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x00}] 0x00000001
|
||||
array2mem rtl8710_flasher_code 32 $rtl8710_flasher_firmware_ptr [array size rtl8710_flasher_code]
|
||||
reg faultmask 0x01
|
||||
reg sp 0x20000000
|
||||
reg pc $rtl8710_flasher_firmware_ptr
|
||||
resume
|
||||
rtl8710_flasher_wait
|
||||
set id [rtl8710_flasher_mrw [expr {$rtl8710_flasher_buffer + 0x0C}]]
|
||||
set rtl8710_flasher_capacity [expr {2 ** [expr {($id >> 16) & 0xFF}]}]
|
||||
set rtl8710_flasher_ready 1
|
||||
echo "RTL8710 flasher initialized"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
proc rtl8710_flasher_mrw {reg} {
|
||||
set value ""
|
||||
mem2array value 32 $reg 1
|
||||
return $value(0)
|
||||
}
|
||||
|
||||
proc rtl8710_flasher_wait {} {
|
||||
global rtl8710_flasher_buffer
|
||||
while {[rtl8710_flasher_mrw [expr {$rtl8710_flasher_buffer + 0x00}]]} { }
|
||||
}
|
||||
|
||||
proc rtl8710_flasher_load_block {local_filename offset len} {
|
||||
global rtl8710_flasher_buffer
|
||||
load_image $local_filename [expr {$rtl8710_flasher_buffer + 0x20 - $offset}] bin [expr {$rtl8710_flasher_buffer + 0x20}] $len
|
||||
}
|
||||
|
||||
proc rtl8710_flasher_read_block {offset len} {
|
||||
global rtl8710_flasher_buffer
|
||||
global rtl8710_flasher_command_read
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x04}] $rtl8710_flasher_command_read
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x08}] 0x00000000
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x10}] $offset
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x14}] $len
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x00}] 0x00000001
|
||||
rtl8710_flasher_wait
|
||||
set status [rtl8710_flasher_mrw [expr {$rtl8710_flasher_buffer + 0x08}]]
|
||||
if {[expr {$status > 0}]} {
|
||||
error "read error, offset $offset"
|
||||
}
|
||||
}
|
||||
|
||||
proc rtl8710_flasher_write_block {offset len} {
|
||||
global rtl8710_flasher_buffer
|
||||
global rtl8710_flasher_command_write
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x04}] $rtl8710_flasher_command_write
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x08}] 0x00000000
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x10}] $offset
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x14}] $len
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x00}] 0x00000001
|
||||
rtl8710_flasher_wait
|
||||
set status [rtl8710_flasher_mrw [expr {$rtl8710_flasher_buffer + 0x08}]]
|
||||
if {[expr {$status > 0}]} {
|
||||
error "write error, offset $offset"
|
||||
}
|
||||
}
|
||||
|
||||
proc rtl8710_flasher_verify_block {offset len} {
|
||||
global rtl8710_flasher_buffer
|
||||
global rtl8710_flasher_command_verify
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x04}] $rtl8710_flasher_command_verify
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x08}] 0x00000000
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x10}] $offset
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x14}] $len
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x00}] 0x00000001
|
||||
rtl8710_flasher_wait
|
||||
set status [rtl8710_flasher_mrw [expr {$rtl8710_flasher_buffer + 0x08}]]
|
||||
if {[expr {$status > 0}]} {
|
||||
set status [rtl8710_flasher_mrw [expr {$rtl8710_flasher_buffer + 0x0C}]]
|
||||
set status [expr {$status + $offset}]
|
||||
error "verify error, offset $status"
|
||||
}
|
||||
}
|
||||
|
||||
proc rtl8710_flash_read_id {} {
|
||||
global rtl8710_flasher_buffer
|
||||
global rtl8710_flasher_capacity
|
||||
global rtl8710_flasher_command_read_id
|
||||
rtl8710_flasher_init
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x04}] $rtl8710_flasher_command_read_id
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x08}] 0x00000000
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x00}] 0x00000001
|
||||
rtl8710_flasher_wait
|
||||
set id [rtl8710_flasher_mrw [expr {$rtl8710_flasher_buffer + 0x0C}]]
|
||||
set manufacturer_id [format "0x%02X" [expr {$id & 0xFF}]]
|
||||
set memory_type [format "0x%02X" [expr {($id >> 8) & 0xFF}]]
|
||||
set memory_capacity [expr {2 ** [expr {($id >> 16) & 0xFF}]}]
|
||||
echo "manufacturer ID: $manufacturer_id, memory type: $memory_type, memory capacity: $memory_capacity bytes"
|
||||
}
|
||||
|
||||
proc rtl8710_flash_mass_erase {} {
|
||||
global rtl8710_flasher_buffer
|
||||
global rtl8710_flasher_command_mass_erase
|
||||
rtl8710_flasher_init
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x04}] $rtl8710_flasher_command_mass_erase
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x08}] 0x00000000
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x00}] 0x00000001
|
||||
rtl8710_flasher_wait
|
||||
}
|
||||
|
||||
proc rtl8710_flash_sector_erase {offset} {
|
||||
global rtl8710_flasher_buffer
|
||||
global rtl8710_flasher_command_sector_erase
|
||||
rtl8710_flasher_init
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x04}] $rtl8710_flasher_command_sector_erase
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x08}] 0x00000000
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x10}] $offset
|
||||
mww [expr {$rtl8710_flasher_buffer + 0x00}] 0x00000001
|
||||
rtl8710_flasher_wait
|
||||
}
|
||||
|
||||
proc rtl8710_flash_read {local_filename loc size} {
|
||||
global rtl8710_flasher_buffer
|
||||
global rtl8710_flasher_buffer_size
|
||||
rtl8710_flasher_init
|
||||
for {set offset 0} {$offset < $size} {set offset [expr {$offset + $rtl8710_flasher_buffer_size}]} {
|
||||
set len [expr {$size - $offset}]
|
||||
if {[expr {$len > $rtl8710_flasher_buffer_size}]} {
|
||||
set len $rtl8710_flasher_buffer_size
|
||||
}
|
||||
set flash_offset [expr {$loc + $offset}]
|
||||
echo "read offset $flash_offset"
|
||||
rtl8710_flasher_read_block $flash_offset $len
|
||||
dump_image _rtl8710_flasher.bin [expr {$rtl8710_flasher_buffer + 0x20}] $len
|
||||
exec dd conv=notrunc if=_rtl8710_flasher.bin "of=$local_filename" bs=1 "seek=$offset"
|
||||
echo "read $len bytes"
|
||||
}
|
||||
}
|
||||
|
||||
proc rtl8710_flash_write {local_filename loc} {
|
||||
global rtl8710_flasher_buffer_size
|
||||
global rtl8710_flasher_sector_size
|
||||
global rtl8710_flasher_auto_erase
|
||||
global rtl8710_flasher_auto_verify
|
||||
global rtl8710_flasher_auto_erase_sector
|
||||
rtl8710_flasher_init
|
||||
set sector 0
|
||||
set size [file size $local_filename]
|
||||
for {set offset 0} {$offset < $size} {set offset [expr {$offset + $rtl8710_flasher_buffer_size}]} {
|
||||
set len [expr {$size - $offset}]
|
||||
if {[expr {$len > $rtl8710_flasher_buffer_size}]} {
|
||||
set len $rtl8710_flasher_buffer_size
|
||||
}
|
||||
set flash_offset [expr {$loc + $offset}]
|
||||
echo "write offset $flash_offset"
|
||||
rtl8710_flasher_load_block $local_filename $offset $len
|
||||
if {[expr {$rtl8710_flasher_auto_erase != 0}]} {
|
||||
for {set i $flash_offset} {$i < [expr {$flash_offset + $len}]} {incr i} {
|
||||
set sector [expr {$i / $rtl8710_flasher_sector_size}]
|
||||
if {[expr {$rtl8710_flasher_auto_erase_sector != $sector}]} {
|
||||
echo "erase sector $sector"
|
||||
rtl8710_flash_sector_erase [expr {$sector * $rtl8710_flasher_sector_size}]
|
||||
set rtl8710_flasher_auto_erase_sector $sector
|
||||
}
|
||||
}
|
||||
}
|
||||
rtl8710_flasher_write_block $flash_offset $len
|
||||
echo "wrote $len bytes"
|
||||
if {[expr {$rtl8710_flasher_auto_verify != 0}]} {
|
||||
echo "verify offset $flash_offset"
|
||||
rtl8710_flasher_verify_block $flash_offset $len
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
proc rtl8710_flash_verify {local_filename loc} {
|
||||
global rtl8710_flasher_buffer_size
|
||||
rtl8710_flasher_init
|
||||
set size [file size $local_filename]
|
||||
for {set offset 0} {$offset < $size} {set offset [expr {$offset + $rtl8710_flasher_buffer_size}]} {
|
||||
set len [expr {$size - $offset}]
|
||||
if {[expr {$len > $rtl8710_flasher_buffer_size}]} {
|
||||
set len $rtl8710_flasher_buffer_size
|
||||
}
|
||||
set flash_offset [expr {$loc + $offset}]
|
||||
echo "read offset $flash_offset"
|
||||
rtl8710_flasher_load_block $local_filename $offset $len
|
||||
echo "verify offset $flash_offset"
|
||||
rtl8710_flasher_verify_block $flash_offset $len
|
||||
}
|
||||
}
|
||||
|
||||
proc rtl8710_flash_auto_erase {on} {
|
||||
global rtl8710_flasher_auto_erase
|
||||
if {[expr {$on != 0}]} {
|
||||
set rtl8710_flasher_auto_erase 1
|
||||
echo "auto erase on"
|
||||
} else {
|
||||
set rtl8710_flasher_auto_erase 0
|
||||
echo "auto erase off"
|
||||
}
|
||||
}
|
||||
|
||||
proc rtl8710_flash_auto_verify {on} {
|
||||
global rtl8710_flasher_auto_verify
|
||||
if {[expr {$on != 0}]} {
|
||||
set rtl8710_flasher_auto_verify 1
|
||||
echo "auto verify on"
|
||||
} else {
|
||||
set rtl8710_flasher_auto_verify 0
|
||||
echo "auto verify off"
|
||||
}
|
||||
}
|
||||
|
||||
proc rtl8710_reboot {} {
|
||||
echo "# Set processor clock to default before system reset"
|
||||
mww 0x40000014 0x00000021
|
||||
sleep 10
|
||||
echo "# Reboot (system reset)"
|
||||
mww 0xE000ED0C 0x05FA0007
|
||||
}
|
||||
|
||||
proc boot_load_srdam {local_filename loc} {
|
||||
echo "# Set flag WISDRAM"
|
||||
mww 0x1FFF0000 0x12345678
|
||||
mww 0x40000210 0x20011113
|
||||
resume
|
||||
echo "# Wait Init SDRAM..."
|
||||
# sleep 1000
|
||||
while {[rtl8710_flasher_mrw 0x1FFF0000] == 0x12345678 } { sleep 10 }
|
||||
halt
|
||||
echo "# Load SDRAM image..."
|
||||
load_image $local_filename $loc
|
||||
resume
|
||||
# echo "# Go"
|
||||
mww 0x1FFF0000 1
|
||||
}
|
||||
|
Binary file not shown.
|
@ -1 +1 @@
|
|||
PATH=D:\MCU\GNU_Tools_ARM_Embedded\6.2017-q1-update\bin;D:\MCU\SEGGER\JLink_V612i;D:\MCU\OpenOCD\bin;%PATH%
|
||||
PATH=D:\MCU\GNU_Tools_ARM_Embedded\7.2017-q4-major\bin;D:\MCU\SEGGER\JLink_V630g;D:\MCU\OpenOCD\bin;C:\MinGW\msys\1.0\bin;%PATH%
|
|
@ -2,7 +2,8 @@
|
|||
# SDK CONFIG
|
||||
#=============================================
|
||||
USE_SDRAM = 1
|
||||
#WEB_INA219_DRV = 1
|
||||
#SWO_DEBUG_OUT_ENA = 1
|
||||
WEB_INA219_DRV = 1
|
||||
#WEB_MLX90614_DRV = 1
|
||||
WEB_ADC_DRV = 1
|
||||
#USE_SDCARD = 1
|
||||
|
@ -98,3 +99,7 @@ else
|
|||
ADD_SRC_C += project/src/web/_sci_web.c
|
||||
ADD_SRC_C += project/src/web/_sci_web_user.c
|
||||
endif
|
||||
|
||||
ifdef SWO_DEBUG_OUT_ENA
|
||||
CFLAGS += -DSWO_DEBUG_OUT_ENA=1
|
||||
endif
|
||||
|
|
|
@ -31,35 +31,19 @@ LOCAL void fATPN(int argc, char *argv[]){
|
|||
show_wifi_st_cfg();
|
||||
}
|
||||
else {
|
||||
strncpy(wifi_st_cfg.ssid, argv[1], NDIS_802_11_LENGTH_SSID);
|
||||
int pswlen;
|
||||
strncpy(wifi_st_cfg.ssid, argv[1], sizeof(wifi_st_cfg.ssid));
|
||||
wifi_st_cfg.security = IDX_SECURITY_OPEN;
|
||||
int pswlen = strlen(strncpy(wifi_st_cfg.password, argv[2], sizeof(wifi_st_cfg.password)));
|
||||
if(argc > 2) {
|
||||
pswlen = strlen(wifi_st_cfg.password);
|
||||
strncpy(wifi_st_cfg.password, argv[2], NDIS_802_11_LENGTH_SSID);
|
||||
if(pswlen > 7) {
|
||||
wifi_st_cfg.security = IDX_SECURITY_WPA2_AES_PSK;
|
||||
}
|
||||
else if(!pswlen) {
|
||||
wifi_st_cfg.security = IDX_SECURITY_OPEN;
|
||||
}
|
||||
else {
|
||||
}
|
||||
else if(pswlen != 0) {
|
||||
printf("password len < 8!\n");
|
||||
wifi_st_cfg.security = IDX_SECURITY_OPEN;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// default
|
||||
wifi_st_cfg.password[0] = 0;
|
||||
wifi_st_cfg.security = IDX_SECURITY_OPEN;
|
||||
}
|
||||
if(argc > 3) {
|
||||
if(pswlen > 7) {
|
||||
wifi_st_cfg.security = atoi(argv[3]);
|
||||
}
|
||||
else {
|
||||
printf("password len < 8!\n");
|
||||
wifi_st_cfg.security = IDX_SECURITY_OPEN;
|
||||
}
|
||||
wifi_st_cfg.security = atoi(argv[3]);
|
||||
}
|
||||
if(argc > 4) {
|
||||
wifi_st_cfg.autoreconnect = atoi(argv[4]);
|
||||
|
@ -85,25 +69,17 @@ LOCAL void fATPA(int argc, char *argv[]){
|
|||
show_wifi_ap_cfg();
|
||||
}
|
||||
else {
|
||||
strncpy(wifi_ap_cfg.ssid, argv[1], NDIS_802_11_LENGTH_SSID);
|
||||
strncpy(wifi_ap_cfg.ssid, argv[1], sizeof(wifi_ap_cfg.ssid));
|
||||
wifi_ap_cfg.security = 0; // IDX_SECURITY_OPEN;
|
||||
int pswlen = strlen(strncpy(wifi_ap_cfg.password, argv[2], sizeof(wifi_ap_cfg.password)));
|
||||
if(argc > 2) {
|
||||
strncpy(wifi_ap_cfg.password, argv[2], NDIS_802_11_LENGTH_SSID);
|
||||
int i = strlen(wifi_ap_cfg.password);
|
||||
if(i > 7) {
|
||||
if(pswlen > 7) {
|
||||
wifi_ap_cfg.security = 1; // IDX_SECURITY_WPA2_AES_PSK;
|
||||
}
|
||||
else if(i == 0) {
|
||||
wifi_ap_cfg.security = 0; // IDX_SECURITY_OPEN;
|
||||
}
|
||||
else {
|
||||
else if(pswlen != 0) {
|
||||
printf("password len < 8!\n");
|
||||
wifi_ap_cfg.security = 0; // IDX_SECURITY_OPEN;
|
||||
}
|
||||
}
|
||||
else {
|
||||
wifi_ap_cfg.password[0] = 0;
|
||||
wifi_ap_cfg.security = 0; // IDX_SECURITY_OPEN;
|
||||
}
|
||||
if(argc > 3) {
|
||||
wifi_ap_cfg.security = (argv[3][0] == '0')? 0 : 1; //RTW_SECURITY_OPEN : RTW_SECURITY_WPA2_AES_PSK;
|
||||
}
|
||||
|
|
|
@ -384,6 +384,36 @@ void ICACHE_FLASH_ATTR web_int_callback(TCP_SERV_CONN *ts_conn, uint8 *cstr)
|
|||
#endif
|
||||
ifcmp("start") tcp_puts("0x%08x", web_conn->udata_start);
|
||||
else ifcmp("stop") tcp_puts("0x%08x", web_conn->udata_stop);
|
||||
#ifdef WEB_INA219_DRV
|
||||
else ifcmp("ina219") {
|
||||
if(CheckSCB(SCB_WEBSOC)) {
|
||||
extern int ina219_ws(TCP_SERV_CONN *ts_conn, char cmd);
|
||||
int x = ina219_ws(ts_conn, cstr[6]);
|
||||
if(x < 0) SetSCB(SCB_FCLOSE|SCB_DISCONNECT);
|
||||
else tcp_puts("%d", x);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef WEB_MLX90614_DRV
|
||||
else ifcmp("mlx90614") {
|
||||
if(CheckSCB(SCB_WEBSOC)) {
|
||||
extern int mlx90614_ws(TCP_SERV_CONN *ts_conn, char cmd);
|
||||
int x = mlx90614_ws(ts_conn, cstr[8]);
|
||||
if(x < 0) SetSCB(SCB_FCLOSE|SCB_DISCONNECT);
|
||||
else tcp_puts("%d", x);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef WEB_ADC_DRV
|
||||
else ifcmp("adc") {
|
||||
if(CheckSCB(SCB_WEBSOC)) {
|
||||
extern int adc_ws(TCP_SERV_CONN *ts_conn, char cmd);
|
||||
int x = adc_ws(ts_conn, cstr[3]);
|
||||
if(x < 0) SetSCB(SCB_FCLOSE|SCB_DISCONNECT);
|
||||
else tcp_puts("%d", x);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if USE_WEB_AUTH_LEVEL
|
||||
else ifcmp("realm") tcp_puts("%u", web_conn->auth_realm);
|
||||
else ifcmp("auth") tcp_puts("%u", web_conn->auth_level);
|
||||
|
@ -441,7 +471,7 @@ void ICACHE_FLASH_ATTR web_int_callback(TCP_SERV_CONN *ts_conn, uint8 *cstr)
|
|||
else ifcmp("rdec") tcp_puts("%d", *((uint32 *)(ahextoul(cstr+4)&(~3))));
|
||||
#endif // #if WEB_DEBUG_FUNCTIONS
|
||||
else ifcmp("ip") {
|
||||
uint32 cur_ip;
|
||||
uint32 cur_ip = 0;
|
||||
if(netif_default != NULL) cur_ip = netif_default->ip_addr.addr;
|
||||
tcp_puts(IPSTR, IP2STR(&cur_ip));
|
||||
}
|
||||
|
@ -452,36 +482,6 @@ void ICACHE_FLASH_ATTR web_int_callback(TCP_SERV_CONN *ts_conn, uint8 *cstr)
|
|||
#endif
|
||||
else tcp_put('?');
|
||||
}
|
||||
#ifdef WEB_INA219_DRV
|
||||
else ifcmp("ina219") {
|
||||
if(CheckSCB(SCB_WEBSOC)) {
|
||||
extern int ina219_ws(TCP_SERV_CONN *ts_conn, char cmd);
|
||||
int x = ina219_ws(ts_conn, cstr[6]);
|
||||
if(x < 0) SetSCB(SCB_FCLOSE|SCB_DISCONNECT);
|
||||
else tcp_puts("%d", x);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef WEB_MLX90614_DRV
|
||||
else ifcmp("mlx90614") {
|
||||
if(CheckSCB(SCB_WEBSOC)) {
|
||||
extern int mlx90614_ws(TCP_SERV_CONN *ts_conn, char cmd);
|
||||
int x = mlx90614_ws(ts_conn, cstr[8]);
|
||||
if(x < 0) SetSCB(SCB_FCLOSE|SCB_DISCONNECT);
|
||||
else tcp_puts("%d", x);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef WEB_ADC_DRV
|
||||
else ifcmp("adc") {
|
||||
if(CheckSCB(SCB_WEBSOC)) {
|
||||
extern int adc_ws(TCP_SERV_CONN *ts_conn, char cmd);
|
||||
int x = adc_ws(ts_conn, cstr[3]);
|
||||
if(x < 0) SetSCB(SCB_FCLOSE|SCB_DISCONNECT);
|
||||
else tcp_puts("%d", x);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else ifcmp("cfg_") {
|
||||
cstr += 4;
|
||||
ifcmp("web_") {
|
||||
|
|
|
@ -214,7 +214,7 @@ WebsocketTxFrame(TCP_SERV_CONN *ts_conn, uint32 opcode, uint8 *raw_data, uint32
|
|||
head_len = 2;
|
||||
};
|
||||
if(opcode & (WS_MASK_FLG << 8)) {
|
||||
mask.ud ^= rand();
|
||||
mask.ud = rand();
|
||||
head.uc[1] |= WS_MASK_FLG;
|
||||
head.uc[head_len] = mask.uc[0];
|
||||
head.uc[head_len+1] = mask.uc[1];
|
||||
|
|
22
userset.mk
22
userset.mk
|
@ -1,14 +1,24 @@
|
|||
#=============================================
|
||||
# User defined
|
||||
#=============================================
|
||||
#SDK_PATH = ../RTL00MP3/RTL00_SDKV35a/
|
||||
SDK_PATH = USDK/
|
||||
#GCC_PATH = d:/MCU/GNU_Tools_ARM_Embedded/6.2017-q1-update/bin/# + or set in PATH
|
||||
#OPENOCD_PATH = D:/MCU/OpenOCD/bin/# + or set in PATH
|
||||
TOOLS_PATH ?= $(SDK_PATH)component/soc/realtek/8195a/misc/iar_utility/common/tools/
|
||||
#----------------------------------
|
||||
# Set JTAG/SWD
|
||||
#----------------------------------
|
||||
#FLASHER_TYPE = Jlink
|
||||
#FLASHER_TYPE = stlink-v2
|
||||
FLASHER_TYPE = cmsis-dap
|
||||
FLASHER_SPEED = 3500
|
||||
FLASHER_PATH = flasher/
|
||||
JLINK_PATH ?= D:/MCU/SEGGER/JLink_V612i/
|
||||
JLINK_GDBSRV ?= JLinkGDBServer.exe
|
||||
#----------------------------------
|
||||
# Tools Path
|
||||
#----------------------------------
|
||||
ifneq ($(shell uname), Linux)
|
||||
PYTHON ?= C:/Python27/python
|
||||
OPENOCD ?= d:/MCU/OpenOCD/bin/openocd.exe
|
||||
JLINK_PATH ?= D:/MCU/SEGGER/JLink_V630g/
|
||||
else
|
||||
PYTHON ?= python
|
||||
OPENOCD ?= /mnt/d/MCU/OpenOCD/bin/openocd.exe
|
||||
JLINK_PATH ?= /mnt/d/MCU/SEGGER/JLink_V630g/
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue