mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 19:47:02 +03:00
more ota work-ota cmd line implemented-not tested
This commit is contained in:
424
.cproject
424
.cproject
@@ -1,114 +1,316 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786" name="Default" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786.1800826258" name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.811827721" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.base">
|
||||
<option id="cdt.managedbuild.option.gnu.cross.prefix.1666584715" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix"/>
|
||||
<option id="cdt.managedbuild.option.gnu.cross.path.144124148" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1562292378" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder arguments="" command="make" id="cdt.managedbuild.builder.gnu.cross.1011968237" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.1502936757" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1614739014" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.254690821" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1365876654" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.407309631" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.765822218" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.655344480" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1494383819" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.280698320" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1422333326" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="squeezelite-esp32.null.1272501664" name="squeezelite-esp32"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.1943329896;cdt.managedbuild.toolchain.gnu.cross.base.1943329896.30011915;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1749746745;cdt.managedbuild.tool.gnu.cpp.compiler.input.1914005798">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.1476804786;cdt.managedbuild.toolchain.gnu.cross.base.1476804786.1800826258;cdt.managedbuild.tool.gnu.cross.cpp.compiler.254690821;cdt.managedbuild.tool.gnu.cpp.compiler.input.1365876654">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.1943329896;cdt.managedbuild.toolchain.gnu.cross.base.1943329896.30011915;cdt.managedbuild.tool.gnu.cross.c.compiler.2083405506;cdt.managedbuild.tool.gnu.c.compiler.input.404320567">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.1476804786;cdt.managedbuild.toolchain.gnu.cross.base.1476804786.1800826258;cdt.managedbuild.tool.gnu.cross.c.compiler.1502936757;cdt.managedbuild.tool.gnu.c.compiler.input.1614739014">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Default">
|
||||
<resource resourceType="PROJECT" workspacePath="/squeezelite-esp32"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||
<buildTargets>
|
||||
<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments>-j8</buildArguments>
|
||||
<buildTarget>all</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>false</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="size-components" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildTarget>size-components</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="flash" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildTarget>flash</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="recovery" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments>-j8 app PROJECT_NAME="recovery.custom" EXTRA_CFLAGS=" -DRECOVERY_APPLICATION=1"</buildArguments>
|
||||
<buildTarget>recovery</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>false</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
<target name="app" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>python</buildCommand>
|
||||
<buildArguments>${IDF_PATH}/tools/windows/eclipse_make.py -j8</buildArguments>
|
||||
<buildTarget>app</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
</buildTargets>
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
|
||||
<cconfiguration id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786">
|
||||
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||
|
||||
<externalSettings/>
|
||||
|
||||
<extensions>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
</extensions>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786" name="Default" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
|
||||
<folderInfo id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786.1800826258" name="/" resourcePath="">
|
||||
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.811827721" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.base">
|
||||
|
||||
<option id="cdt.managedbuild.option.gnu.cross.prefix.1666584715" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix"/>
|
||||
|
||||
<option id="cdt.managedbuild.option.gnu.cross.path.144124148" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path"/>
|
||||
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1562292378" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
|
||||
<builder arguments="" command="make" id="cdt.managedbuild.builder.gnu.cross.1011968237" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.1502936757" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1614739014" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.254690821" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1365876654" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.407309631" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.765822218" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.655344480" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
|
||||
</inputType>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1494383819" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.280698320" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1422333326" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
|
||||
</tool>
|
||||
|
||||
</toolChain>
|
||||
|
||||
</folderInfo>
|
||||
|
||||
</configuration>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
|
||||
</cconfiguration>
|
||||
|
||||
<cconfiguration id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495">
|
||||
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495" moduleId="org.eclipse.cdt.core.settings" name="recovery">
|
||||
|
||||
<externalSettings/>
|
||||
|
||||
<extensions>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
|
||||
</extensions>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495" name="recovery" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
|
||||
<folderInfo id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495." name="/" resourcePath="">
|
||||
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.1615055647" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.base">
|
||||
|
||||
<option id="cdt.managedbuild.option.gnu.cross.prefix.1669084138" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix"/>
|
||||
|
||||
<option id="cdt.managedbuild.option.gnu.cross.path.1601842088" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path"/>
|
||||
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.2065316488" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
|
||||
<builder arguments="" command="make" id="cdt.managedbuild.builder.gnu.cross.442472928" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.802362645" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.123064752" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.425997512" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1366677700" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1792747550" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.199471499" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1088734719" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
|
||||
</inputType>
|
||||
|
||||
</tool>
|
||||
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.878488427" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.939007176" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1973534280" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
|
||||
</tool>
|
||||
|
||||
</toolChain>
|
||||
|
||||
</folderInfo>
|
||||
|
||||
</configuration>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
|
||||
</cconfiguration>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
||||
<project id="squeezelite-esp32.null.1272501664" name="squeezelite-esp32"/>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.1943329896;cdt.managedbuild.toolchain.gnu.cross.base.1943329896.30011915;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1749746745;cdt.managedbuild.tool.gnu.cpp.compiler.input.1914005798">
|
||||
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
|
||||
</scannerConfigBuildInfo>
|
||||
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.1476804786;cdt.managedbuild.toolchain.gnu.cross.base.1476804786.1800826258;cdt.managedbuild.tool.gnu.cross.cpp.compiler.254690821;cdt.managedbuild.tool.gnu.cpp.compiler.input.1365876654">
|
||||
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
|
||||
</scannerConfigBuildInfo>
|
||||
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.1943329896;cdt.managedbuild.toolchain.gnu.cross.base.1943329896.30011915;cdt.managedbuild.tool.gnu.cross.c.compiler.2083405506;cdt.managedbuild.tool.gnu.c.compiler.input.404320567">
|
||||
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
|
||||
</scannerConfigBuildInfo>
|
||||
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.1476804786;cdt.managedbuild.toolchain.gnu.cross.base.1476804786.1800826258;cdt.managedbuild.tool.gnu.cross.c.compiler.1502936757;cdt.managedbuild.tool.gnu.c.compiler.input.1614739014">
|
||||
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
|
||||
</scannerConfigBuildInfo>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
|
||||
<configuration configurationName="Default">
|
||||
|
||||
<resource resourceType="PROJECT" workspacePath="/squeezelite-esp32"/>
|
||||
|
||||
</configuration>
|
||||
|
||||
</storageModule>
|
||||
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||
|
||||
<buildTargets>
|
||||
|
||||
<target name="all" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
|
||||
<buildCommand>make</buildCommand>
|
||||
|
||||
<buildArguments>-j8</buildArguments>
|
||||
|
||||
<buildTarget>all</buildTarget>
|
||||
|
||||
<stopOnError>true</stopOnError>
|
||||
|
||||
<useDefaultCommand>false</useDefaultCommand>
|
||||
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="size-components" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
|
||||
<buildCommand>make</buildCommand>
|
||||
|
||||
<buildArguments>-j2</buildArguments>
|
||||
|
||||
<buildTarget>size-components</buildTarget>
|
||||
|
||||
<stopOnError>true</stopOnError>
|
||||
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="flash" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
|
||||
<buildCommand>make</buildCommand>
|
||||
|
||||
<buildArguments>-j2</buildArguments>
|
||||
|
||||
<buildTarget>flash</buildTarget>
|
||||
|
||||
<stopOnError>true</stopOnError>
|
||||
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="recovery" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
|
||||
<buildCommand>make</buildCommand>
|
||||
|
||||
<buildArguments>-j8 PROJECT_NAME="recovery.custom" EXTRA_CFLAGS=" -DRECOVERY_APPLICATION=1"</buildArguments>
|
||||
|
||||
<buildTarget>app</buildTarget>
|
||||
|
||||
<stopOnError>true</stopOnError>
|
||||
|
||||
<useDefaultCommand>false</useDefaultCommand>
|
||||
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="app" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
|
||||
<buildCommand>python</buildCommand>
|
||||
|
||||
<buildArguments>${IDF_PATH}/tools/windows/eclipse_make.py -j8</buildArguments>
|
||||
|
||||
<buildTarget>app</buildTarget>
|
||||
|
||||
<stopOnError>true</stopOnError>
|
||||
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
|
||||
</target>
|
||||
|
||||
</buildTargets>
|
||||
|
||||
</storageModule>
|
||||
|
||||
</cproject>
|
||||
|
||||
@@ -1,12 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project>
|
||||
<configuration id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786" name="Default">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<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.GCCBuildCommandParser" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
</extension>
|
||||
</configuration>
|
||||
|
||||
<configuration id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786" name="Default">
|
||||
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
|
||||
<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.GCCBuildCommandParser" ref="shared-provider"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" ref="shared-provider"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
|
||||
</extension>
|
||||
|
||||
</configuration>
|
||||
|
||||
<configuration id="cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495" name="recovery">
|
||||
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
|
||||
<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.GCCBuildCommandParser" ref="shared-provider"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" ref="shared-provider"/>
|
||||
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
|
||||
</extension>
|
||||
|
||||
</configuration>
|
||||
|
||||
</project>
|
||||
|
||||
23
.settings/org.eclipse.cdt.core.prefs
Normal file
23
.settings/org.eclipse.cdt.core.prefs
Normal file
@@ -0,0 +1,23 @@
|
||||
eclipse.preferences.version=1
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495/BATCH_BUILD/delimiter=\:
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495/BATCH_BUILD/operation=append
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495/BATCH_BUILD/value=1
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495/EXTRA_CFLAGS/delimiter=\:
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495/EXTRA_CFLAGS/operation=replace
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495/EXTRA_CFLAGS/value=-DRECOVERY_APPLICATION\=1
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495/IDF_PATH/delimiter=\:
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495/IDF_PATH/operation=replace
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495/IDF_PATH/value=/var/opt/esp-idf
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495/append=true
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786.212420495/appendContributed=true
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/BATCH_BUILD/delimiter=\:
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/BATCH_BUILD/operation=append
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/BATCH_BUILD/value=1
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/EXTRA_CFLAGS/delimiter=\:
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/EXTRA_CFLAGS/operation=replace
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/EXTRA_CFLAGS/value=
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/IDF_PATH/delimiter=\:
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/IDF_PATH/operation=replace
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/IDF_PATH/value=/var/opt/esp-idf
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/append=true
|
||||
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1476804786/appendContributed=true
|
||||
@@ -8,3 +8,5 @@
|
||||
#
|
||||
|
||||
COMPONENT_ADD_INCLUDEDIRS := .
|
||||
CFLAGS += -I$(COMPONENT_PATH)/../squeezelite-ota
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* platform setting definition
|
||||
*
|
||||
* (c) Philippe, philippe_44@outlook.com
|
||||
@@ -16,112 +16,112 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_H
|
||||
#define __PLATFORM_H
|
||||
|
||||
#ifdef WIN32
|
||||
#define LINUX 0
|
||||
#define WIN 1
|
||||
#else
|
||||
#define LINUX 1
|
||||
#define WIN 0
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <signal.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <io.h>
|
||||
#include <iphlpapi.h>
|
||||
#include <sys/timeb.h>
|
||||
|
||||
typedef unsigned __int8 u8_t;
|
||||
typedef unsigned __int16 u16_t;
|
||||
typedef unsigned __int32 u32_t;
|
||||
typedef unsigned __int64 u64_t;
|
||||
typedef __int16 s16_t;
|
||||
typedef __int32 s32_t;
|
||||
typedef __int64 s64_t;
|
||||
|
||||
#define inline __inline
|
||||
|
||||
int gettimeofday(struct timeval *tv, struct timezone *tz);
|
||||
char *strcasestr(const char *haystack, const char *needle);
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_H
|
||||
#define __PLATFORM_H
|
||||
|
||||
#ifdef WIN32
|
||||
#define LINUX 0
|
||||
#define WIN 1
|
||||
#else
|
||||
#define LINUX 1
|
||||
#define WIN 0
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <signal.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <io.h>
|
||||
#include <iphlpapi.h>
|
||||
#include <sys/timeb.h>
|
||||
|
||||
typedef unsigned __int8 u8_t;
|
||||
typedef unsigned __int16 u16_t;
|
||||
typedef unsigned __int32 u32_t;
|
||||
typedef unsigned __int64 u64_t;
|
||||
typedef __int16 s16_t;
|
||||
typedef __int32 s32_t;
|
||||
typedef __int64 s64_t;
|
||||
|
||||
#define inline __inline
|
||||
|
||||
int gettimeofday(struct timeval *tv, struct timezone *tz);
|
||||
char *strcasestr(const char *haystack, const char *needle);
|
||||
|
||||
#define usleep(x) Sleep((x)/1000)
|
||||
|
||||
#define sleep(x) Sleep((x)*1000)
|
||||
#define last_error() WSAGetLastError()
|
||||
#define ERROR_WOULDBLOCK WSAEWOULDBLOCK
|
||||
#define open _open
|
||||
#define read _read
|
||||
#define poll WSAPoll
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#define _random(x) random(x)
|
||||
#define VALGRIND_MAKE_MEM_DEFINED(x,y)
|
||||
#define S_ADDR(X) X.S_un.S_addr
|
||||
|
||||
#define in_addr_t u32_t
|
||||
#define socklen_t int
|
||||
#define ssize_t int
|
||||
|
||||
#define RTLD_NOW 0
|
||||
|
||||
#else
|
||||
|
||||
#include <strings.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <inttypes.h>
|
||||
/*
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <sys/time.h>
|
||||
#include <netdb.h>
|
||||
*/
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/poll.h>
|
||||
#include <lwip/inet.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
|
||||
#define sleep(x) Sleep((x)*1000)
|
||||
#define last_error() WSAGetLastError()
|
||||
#define ERROR_WOULDBLOCK WSAEWOULDBLOCK
|
||||
#define open _open
|
||||
#define read _read
|
||||
#define poll WSAPoll
|
||||
#define snprintf _snprintf
|
||||
#define strcasecmp stricmp
|
||||
#define _random(x) random(x)
|
||||
#define VALGRIND_MAKE_MEM_DEFINED(x,y)
|
||||
#define S_ADDR(X) X.S_un.S_addr
|
||||
|
||||
#define in_addr_t u32_t
|
||||
#define socklen_t int
|
||||
#define ssize_t int
|
||||
|
||||
#define RTLD_NOW 0
|
||||
|
||||
#else
|
||||
|
||||
#include <strings.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <inttypes.h>
|
||||
/*
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <sys/time.h>
|
||||
#include <netdb.h>
|
||||
*/
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/poll.h>
|
||||
#include <lwip/inet.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
typedef int16_t s16_t;
|
||||
typedef int32_t s32_t;
|
||||
typedef int64_t s64_t;
|
||||
typedef uint8_t u8_t;
|
||||
typedef uint16_t u16_t;
|
||||
typedef uint32_t u32_t;
|
||||
typedef unsigned long long u64_t;
|
||||
|
||||
#define last_error() errno
|
||||
#define ERROR_WOULDBLOCK EWOULDBLOCK
|
||||
|
||||
char *strlwr(char *str);
|
||||
#define _random(x) random()
|
||||
#define closesocket(s) close(s)
|
||||
#define S_ADDR(X) X.s_addr
|
||||
|
||||
#endif
|
||||
|
||||
typedef unsigned long long u64_t;
|
||||
|
||||
#define last_error() errno
|
||||
#define ERROR_WOULDBLOCK EWOULDBLOCK
|
||||
|
||||
char *strlwr(char *str);
|
||||
#define _random(x) random()
|
||||
#define closesocket(s) close(s)
|
||||
#define S_ADDR(X) X.s_addr
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct ntp_s {
|
||||
u32_t seconds;
|
||||
u32_t fraction;
|
||||
|
||||
|
||||
} ntp_t;
|
||||
|
||||
u64_t timeval_to_ntp(struct timeval tv, struct ntp_s *ntp);
|
||||
u64_t get_ntp(struct ntp_s *ntp);
|
||||
|
||||
u64_t timeval_to_ntp(struct timeval tv, struct ntp_s *ntp);
|
||||
u64_t get_ntp(struct ntp_s *ntp);
|
||||
// we expect somebody to provide the ms clock, system-wide
|
||||
u32_t _gettime_ms_(void);
|
||||
#define gettime_ms _gettime_ms_
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* AirConnect: Chromecast & UPnP to AirPlay
|
||||
*
|
||||
* (c) Philippe 2016-2017, philippe_44@outlook.com
|
||||
@@ -16,11 +16,11 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#ifdef WIN32
|
||||
*/
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <iphlpapi.h>
|
||||
#else
|
||||
/*
|
||||
@@ -34,63 +34,63 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "pthread.h"
|
||||
#include "util.h"
|
||||
#include "log_util.h"
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* globals */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
extern log_level util_loglevel;
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* locals */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
static log_level *loglevel = &util_loglevel;
|
||||
|
||||
static char *ltrim(char *s);
|
||||
static int read_line(int fd, char *line, int maxlen, int timeout);
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* */
|
||||
/* NETWORKING utils */
|
||||
/* */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
#include "pthread.h"
|
||||
#include "util.h"
|
||||
#include "log_util.h"
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define MAX_INTERFACES 256
|
||||
#define DEFAULT_INTERFACE 1
|
||||
#if !defined(WIN32)
|
||||
#define INVALID_SOCKET (-1)
|
||||
#endif
|
||||
in_addr_t get_localhost(char **name)
|
||||
{
|
||||
#ifdef WIN32
|
||||
char buf[256];
|
||||
struct hostent *h = NULL;
|
||||
struct sockaddr_in LocalAddr;
|
||||
|
||||
memset(&LocalAddr, 0, sizeof(LocalAddr));
|
||||
|
||||
gethostname(buf, 256);
|
||||
h = gethostbyname(buf);
|
||||
|
||||
if (name) *name = strdup(buf);
|
||||
|
||||
if (h != NULL) {
|
||||
memcpy(&LocalAddr.sin_addr, h->h_addr_list[0], 4);
|
||||
return LocalAddr.sin_addr.s_addr;
|
||||
}
|
||||
else return INADDR_ANY;
|
||||
#else
|
||||
// missing platform here ...
|
||||
return INADDR_ANY;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* globals */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
extern log_level util_loglevel;
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* locals */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
static log_level *loglevel = &util_loglevel;
|
||||
|
||||
static char *ltrim(char *s);
|
||||
static int read_line(int fd, char *line, int maxlen, int timeout);
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* */
|
||||
/* NETWORKING utils */
|
||||
/* */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define MAX_INTERFACES 256
|
||||
#define DEFAULT_INTERFACE 1
|
||||
#if !defined(WIN32)
|
||||
#define INVALID_SOCKET (-1)
|
||||
#endif
|
||||
in_addr_t get_localhost(char **name)
|
||||
{
|
||||
#ifdef WIN32
|
||||
char buf[256];
|
||||
struct hostent *h = NULL;
|
||||
struct sockaddr_in LocalAddr;
|
||||
|
||||
memset(&LocalAddr, 0, sizeof(LocalAddr));
|
||||
|
||||
gethostname(buf, 256);
|
||||
h = gethostbyname(buf);
|
||||
|
||||
if (name) *name = strdup(buf);
|
||||
|
||||
if (h != NULL) {
|
||||
memcpy(&LocalAddr.sin_addr, h->h_addr_list[0], 4);
|
||||
return LocalAddr.sin_addr.s_addr;
|
||||
}
|
||||
else return INADDR_ANY;
|
||||
#else
|
||||
// missing platform here ...
|
||||
return INADDR_ANY;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
#ifdef WIN32
|
||||
void winsock_init(void) {
|
||||
WSADATA wsaData;
|
||||
@@ -108,92 +108,92 @@ void winsock_close(void) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
int shutdown_socket(int sd)
|
||||
{
|
||||
if (sd <= 0) return -1;
|
||||
|
||||
#ifdef WIN32
|
||||
shutdown(sd, SD_BOTH);
|
||||
#else
|
||||
shutdown(sd, SHUT_RDWR);
|
||||
#endif
|
||||
|
||||
LOG_DEBUG("closed socket %d", sd);
|
||||
|
||||
return closesocket(sd);
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
int bind_socket(unsigned short *port, int mode)
|
||||
{
|
||||
int sock;
|
||||
socklen_t len = sizeof(struct sockaddr);
|
||||
struct sockaddr_in addr;
|
||||
|
||||
if ((sock = socket(AF_INET, mode, 0)) < 0) {
|
||||
LOG_ERROR("cannot create socket %d", sock);
|
||||
return sock;
|
||||
}
|
||||
|
||||
/* Populate socket address structure */
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sin_family = AF_INET;
|
||||
addr.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
addr.sin_port = htons(*port);
|
||||
#ifdef SIN_LEN
|
||||
si.sin_len = sizeof(si);
|
||||
#endif
|
||||
|
||||
if (bind(sock, (struct sockaddr*) &addr, sizeof(addr)) < 0) {
|
||||
closesocket(sock);
|
||||
LOG_ERROR("cannot bind socket %d", sock);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!*port) {
|
||||
getsockname(sock, (struct sockaddr *) &addr, &len);
|
||||
*port = ntohs(addr.sin_port);
|
||||
}
|
||||
|
||||
LOG_DEBUG("socket binding %d on port %d", sock, *port);
|
||||
|
||||
return sock;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
int conn_socket(unsigned short port)
|
||||
{
|
||||
struct sockaddr_in addr;
|
||||
int sd;
|
||||
|
||||
sd = socket(AF_INET, SOCK_STREAM, 0);
|
||||
|
||||
addr.sin_family = AF_INET;
|
||||
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
||||
addr.sin_port = htons(port);
|
||||
|
||||
if (sd < 0 || connect(sd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
|
||||
close(sd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
LOG_DEBUG("created socket %d", sd);
|
||||
|
||||
return sd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* */
|
||||
/* SYSTEM utils */
|
||||
/* */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
int shutdown_socket(int sd)
|
||||
{
|
||||
if (sd <= 0) return -1;
|
||||
|
||||
#ifdef WIN32
|
||||
shutdown(sd, SD_BOTH);
|
||||
#else
|
||||
shutdown(sd, SHUT_RDWR);
|
||||
#endif
|
||||
|
||||
LOG_DEBUG("closed socket %d", sd);
|
||||
|
||||
return closesocket(sd);
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
int bind_socket(unsigned short *port, int mode)
|
||||
{
|
||||
int sock;
|
||||
socklen_t len = sizeof(struct sockaddr);
|
||||
struct sockaddr_in addr;
|
||||
|
||||
if ((sock = socket(AF_INET, mode, 0)) < 0) {
|
||||
LOG_ERROR("cannot create socket %d", sock);
|
||||
return sock;
|
||||
}
|
||||
|
||||
/* Populate socket address structure */
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sin_family = AF_INET;
|
||||
addr.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
addr.sin_port = htons(*port);
|
||||
#ifdef SIN_LEN
|
||||
si.sin_len = sizeof(si);
|
||||
#endif
|
||||
|
||||
if (bind(sock, (struct sockaddr*) &addr, sizeof(addr)) < 0) {
|
||||
closesocket(sock);
|
||||
LOG_ERROR("cannot bind socket %d", sock);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!*port) {
|
||||
getsockname(sock, (struct sockaddr *) &addr, &len);
|
||||
*port = ntohs(addr.sin_port);
|
||||
}
|
||||
|
||||
LOG_DEBUG("socket binding %d on port %d", sock, *port);
|
||||
|
||||
return sock;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
int conn_socket(unsigned short port)
|
||||
{
|
||||
struct sockaddr_in addr;
|
||||
int sd;
|
||||
|
||||
sd = socket(AF_INET, SOCK_STREAM, 0);
|
||||
|
||||
addr.sin_family = AF_INET;
|
||||
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
||||
addr.sin_port = htons(port);
|
||||
|
||||
if (sd < 0 || connect(sd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
|
||||
close(sd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
LOG_DEBUG("created socket %d", sd);
|
||||
|
||||
return sd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* */
|
||||
/* SYSTEM utils */
|
||||
/* */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef WIN32
|
||||
/*----------------------------------------------------------------------------*/
|
||||
void *dlopen(const char *filename, int flag) {
|
||||
@@ -222,14 +222,14 @@ char *dlerror(void) {
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* */
|
||||
/* STDLIB extensions */
|
||||
/* */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef WIN32
|
||||
/*---------------------------------------------------------------------------*/
|
||||
char *strcasestr(const char *haystack, const char *needle) {
|
||||
/* */
|
||||
/* STDLIB extensions */
|
||||
/* */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef WIN32
|
||||
/*---------------------------------------------------------------------------*/
|
||||
char *strcasestr(const char *haystack, const char *needle) {
|
||||
size_t length_needle;
|
||||
size_t length_haystack;
|
||||
size_t i;
|
||||
@@ -242,7 +242,7 @@ char *strcasestr(const char *haystack, const char *needle) {
|
||||
|
||||
if (length_haystack < length_needle) return NULL;
|
||||
|
||||
length_haystack -= length_needle - 1;
|
||||
length_haystack -= length_needle - 1;
|
||||
|
||||
for (i = 0; i < length_haystack; i++)
|
||||
{
|
||||
@@ -264,92 +264,92 @@ char *strcasestr(const char *haystack, const char *needle) {
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
char* strsep(char** stringp, const char* delim)
|
||||
{
|
||||
char* start = *stringp;
|
||||
char* p;
|
||||
|
||||
p = (start != NULL) ? strpbrk(start, delim) : NULL;
|
||||
|
||||
if (p == NULL) {
|
||||
*stringp = NULL;
|
||||
} else {
|
||||
*p = '\0';
|
||||
*stringp = p + 1;
|
||||
}
|
||||
|
||||
return start;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
char *strndup(const char *s, size_t n) {
|
||||
char *p = malloc(n + 1);
|
||||
strncpy(p, s, n);
|
||||
p[n] = '\0';
|
||||
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
char* strextract(char *s1, char *beg, char *end)
|
||||
{
|
||||
char *p1, *p2, *res;
|
||||
|
||||
p1 = strcasestr(s1, beg);
|
||||
if (!p1) return NULL;
|
||||
|
||||
p1 += strlen(beg);
|
||||
p2 = strcasestr(p1, end);
|
||||
if (!p2) return strdup(p1);
|
||||
|
||||
res = malloc(p2 - p1 + 1);
|
||||
memcpy(res, p1, p2 - p1);
|
||||
res[p2 - p1] = '\0';
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
/*----------------------------------------------------------------------------*/
|
||||
int asprintf(char **strp, const char *fmt, ...)
|
||||
{
|
||||
va_list args, cp;
|
||||
int len, ret = 0;
|
||||
|
||||
va_start(args, fmt);
|
||||
len = vsnprintf(NULL, 0, fmt, args);
|
||||
*strp = malloc(len + 1);
|
||||
|
||||
if (*strp) ret = vsprintf(*strp, fmt, args);
|
||||
|
||||
va_end(args);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static char *ltrim(char *s)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
char* strsep(char** stringp, const char* delim)
|
||||
{
|
||||
char* start = *stringp;
|
||||
char* p;
|
||||
|
||||
p = (start != NULL) ? strpbrk(start, delim) : NULL;
|
||||
|
||||
if (p == NULL) {
|
||||
*stringp = NULL;
|
||||
} else {
|
||||
*p = '\0';
|
||||
*stringp = p + 1;
|
||||
}
|
||||
|
||||
return start;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
char *strndup(const char *s, size_t n) {
|
||||
char *p = malloc(n + 1);
|
||||
strncpy(p, s, n);
|
||||
p[n] = '\0';
|
||||
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
char* strextract(char *s1, char *beg, char *end)
|
||||
{
|
||||
char *p1, *p2, *res;
|
||||
|
||||
p1 = strcasestr(s1, beg);
|
||||
if (!p1) return NULL;
|
||||
|
||||
p1 += strlen(beg);
|
||||
p2 = strcasestr(p1, end);
|
||||
if (!p2) return strdup(p1);
|
||||
|
||||
res = malloc(p2 - p1 + 1);
|
||||
memcpy(res, p1, p2 - p1);
|
||||
res[p2 - p1] = '\0';
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
/*----------------------------------------------------------------------------*/
|
||||
int asprintf(char **strp, const char *fmt, ...)
|
||||
{
|
||||
va_list args, cp;
|
||||
int len, ret = 0;
|
||||
|
||||
va_start(args, fmt);
|
||||
len = vsnprintf(NULL, 0, fmt, args);
|
||||
*strp = malloc(len + 1);
|
||||
|
||||
if (*strp) ret = vsprintf(*strp, fmt, args);
|
||||
|
||||
va_end(args);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static char *ltrim(char *s)
|
||||
{
|
||||
while(isspace((int) *s)) s++;
|
||||
return s;
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* */
|
||||
/* HTTP management */
|
||||
/* */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
bool http_parse(int sock, char *method, key_data_t *rkd, char **body, int *len)
|
||||
{
|
||||
/* */
|
||||
/* HTTP management */
|
||||
/* */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
bool http_parse(int sock, char *method, key_data_t *rkd, char **body, int *len)
|
||||
{
|
||||
char line[256], *dp;
|
||||
unsigned j;
|
||||
int i, timeout = 100;
|
||||
@@ -357,14 +357,14 @@ bool http_parse(int sock, char *method, key_data_t *rkd, char **body, int *len)
|
||||
rkd[0].key = NULL;
|
||||
|
||||
if ((i = read_line(sock, line, sizeof(line), timeout)) <= 0) {
|
||||
if (i < 0) {
|
||||
LOG_ERROR("cannot read method", NULL);
|
||||
}
|
||||
if (i < 0) {
|
||||
LOG_ERROR("cannot read method", NULL);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!sscanf(line, "%s", method)) {
|
||||
LOG_ERROR("missing method", NULL);
|
||||
LOG_ERROR("missing method", NULL);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ bool http_parse(int sock, char *method, key_data_t *rkd, char **body, int *len)
|
||||
// line folding should be deprecated
|
||||
if (i && rkd[i].key && (line[0] == ' ' || line[0] == '\t')) {
|
||||
for(j = 0; j < strlen(line); j++) if (line[j] != ' ' && line[j] != '\t') break;
|
||||
rkd[i].data = realloc(rkd[i].data, strlen(rkd[i].data) + strlen(line + j) + 1);
|
||||
rkd[i].data = realloc(rkd[i].data, strlen(rkd[i].data) + strlen(line + j) + 1);
|
||||
strcat(rkd[i].data, line + j);
|
||||
continue;
|
||||
}
|
||||
@@ -403,7 +403,7 @@ bool http_parse(int sock, char *method, key_data_t *rkd, char **body, int *len)
|
||||
if (*len) {
|
||||
int size = 0;
|
||||
|
||||
*body = malloc(*len + 1);
|
||||
*body = malloc(*len + 1);
|
||||
while (*body && size < *len) {
|
||||
int bytes = recv(sock, *body + size, *len - size, 0);
|
||||
if (bytes <= 0) break;
|
||||
@@ -467,23 +467,23 @@ static int read_line(int fd, char *line, int maxlen, int timeout)
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
char *http_send(int sock, char *method, key_data_t *rkd)
|
||||
{
|
||||
unsigned sent, len;
|
||||
char *resp = kd_dump(rkd);
|
||||
char *data = malloc(strlen(method) + 2 + strlen(resp) + 2 + 1);
|
||||
|
||||
len = sprintf(data, "%s\r\n%s\r\n", method, resp);
|
||||
NFREE(resp);
|
||||
|
||||
sent = send(sock, data, len, 0);
|
||||
|
||||
if (sent != len) {
|
||||
LOG_ERROR("HTTP send() error:%s %u (strlen=%u)", data, sent, len);
|
||||
NFREE(data);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
{
|
||||
unsigned sent, len;
|
||||
char *resp = kd_dump(rkd);
|
||||
char *data = malloc(strlen(method) + 2 + strlen(resp) + 2 + 1);
|
||||
|
||||
len = sprintf(data, "%s\r\n%s\r\n", method, resp);
|
||||
NFREE(resp);
|
||||
|
||||
sent = send(sock, data, len, 0);
|
||||
|
||||
if (sent != len) {
|
||||
LOG_ERROR("HTTP send() error:%s %u (strlen=%u)", data, sent, len);
|
||||
NFREE(data);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
@@ -534,7 +534,7 @@ char *kd_dump(key_data_t *kd)
|
||||
char *str = NULL;
|
||||
|
||||
if (!kd || !kd[0].key) return strdup("\r\n");
|
||||
|
||||
|
||||
while (kd && kd[i].key) {
|
||||
char *buf;
|
||||
int len;
|
||||
@@ -545,8 +545,8 @@ char *kd_dump(key_data_t *kd)
|
||||
void *p = realloc(str, size + 1024);
|
||||
size += 1024;
|
||||
if (!p) {
|
||||
free(str);
|
||||
return NULL;
|
||||
free(str);
|
||||
return NULL;
|
||||
}
|
||||
str = p;
|
||||
}
|
||||
@@ -574,28 +574,28 @@ void free_metadata(struct metadata_s *metadata)
|
||||
NFREE(metadata->artwork);
|
||||
NFREE(metadata->remote_title);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
int _fprintf(FILE *file, ...)
|
||||
{
|
||||
va_list args;
|
||||
/*----------------------------------------------------------------------------*/
|
||||
int n;
|
||||
|
||||
|
||||
int _fprintf(FILE *file, ...)
|
||||
{
|
||||
va_list args;
|
||||
char *fmt;
|
||||
int n;
|
||||
|
||||
va_start(args, file);
|
||||
fmt = va_arg(args, char*);
|
||||
|
||||
n = vfprintf(file, fmt, args);
|
||||
va_end(args);
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
fmt = va_arg(args, char*);
|
||||
|
||||
n = vfprintf(file, fmt, args);
|
||||
va_end(args);
|
||||
return n;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Misc utilities
|
||||
*
|
||||
* (c) Adrian Smith 2012-2014, triode1@btinternet.com
|
||||
@@ -17,43 +17,43 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __UTIL_H
|
||||
#define __UTIL_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "platform.h"
|
||||
#include "pthread.h"
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __UTIL_H
|
||||
#define __UTIL_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "platform.h"
|
||||
#include "pthread.h"
|
||||
|
||||
#define NFREE(p) if (p) { free(p); p = NULL; }
|
||||
|
||||
typedef struct metadata_s {
|
||||
char *artist;
|
||||
char *album;
|
||||
char *title;
|
||||
char *genre;
|
||||
char *path;
|
||||
char *artwork;
|
||||
char *remote_title;
|
||||
u32_t track;
|
||||
u32_t duration;
|
||||
u32_t track_hash;
|
||||
u32_t sample_rate;
|
||||
u8_t sample_size;
|
||||
u8_t channels;
|
||||
} metadata_t;
|
||||
|
||||
/*
|
||||
void free_metadata(struct metadata_s *metadata);
|
||||
void dup_metadata(struct metadata_s *dst, struct metadata_s *src);
|
||||
*/
|
||||
char *artist;
|
||||
char *album;
|
||||
char *title;
|
||||
char *genre;
|
||||
char *path;
|
||||
char *artwork;
|
||||
char *remote_title;
|
||||
u32_t track;
|
||||
u32_t duration;
|
||||
u32_t track_hash;
|
||||
u32_t sample_rate;
|
||||
u8_t sample_size;
|
||||
u8_t channels;
|
||||
} metadata_t;
|
||||
|
||||
/*
|
||||
void free_metadata(struct metadata_s *metadata);
|
||||
void dup_metadata(struct metadata_s *dst, struct metadata_s *src);
|
||||
*/
|
||||
|
||||
|
||||
u32_t gettime_ms(void);
|
||||
u32_t gettime_ms(void);
|
||||
|
||||
#ifdef WIN32
|
||||
char* strsep(char** stringp, const char* delim);
|
||||
@@ -64,22 +64,22 @@ void winsock_close(void);
|
||||
|
||||
#else
|
||||
char *strlwr(char *str);
|
||||
#endif
|
||||
char* strextract(char *s1, char *beg, char *end);
|
||||
in_addr_t get_localhost(char **name);
|
||||
void get_mac(u8_t mac[]);
|
||||
int shutdown_socket(int sd);
|
||||
#endif
|
||||
char* strextract(char *s1, char *beg, char *end);
|
||||
in_addr_t get_localhost(char **name);
|
||||
void get_mac(u8_t mac[]);
|
||||
int shutdown_socket(int sd);
|
||||
int bind_socket(short unsigned *port, int mode);
|
||||
int conn_socket(unsigned short port);
|
||||
|
||||
typedef struct {
|
||||
typedef struct {
|
||||
|
||||
char *key;
|
||||
char *data;
|
||||
char *data;
|
||||
} key_data_t;
|
||||
|
||||
} key_data_t;
|
||||
|
||||
bool http_parse(int sock, char *method, key_data_t *rkd, char **body, int *len);
|
||||
char* http_send(int sock, char *method, key_data_t *rkd);
|
||||
|
||||
char* kd_lookup(key_data_t *kd, char *key);
|
||||
bool kd_add(key_data_t *kd, char *key, char *value);
|
||||
bool kd_add(key_data_t *kd, char *key, char *value);
|
||||
char* kd_dump(key_data_t *kd);
|
||||
|
||||
@@ -27,21 +27,46 @@
|
||||
#include "sdkconfig.h"
|
||||
|
||||
static const char * TAG = "platform_esp32";
|
||||
|
||||
extern void start_ota(const char * bin_url);
|
||||
static struct {
|
||||
struct arg_str *url;
|
||||
struct arg_end *end;
|
||||
} ota_args;
|
||||
/* 'heap' command prints minumum heap size */
|
||||
static int perform_ota_update(int argc, char **argv)
|
||||
{
|
||||
int nerrors = arg_parse(argc, argv, (void **) &ota_args);
|
||||
if (nerrors != 0) {
|
||||
arg_print_errors(stderr, ota_args.end, argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
const char *url = ota_args.url->sval[0];
|
||||
|
||||
esp_err_t err=ESP_OK;
|
||||
start_ota(url);
|
||||
|
||||
|
||||
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGE(TAG, "%s", esp_err_to_name(err));
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void register_ota_cmd()
|
||||
void register_ota_cmd()
|
||||
{
|
||||
ota_args.url= arg_str1(NULL, NULL, "<url>", "url of the binary app file");
|
||||
ota_args.end = arg_end(2);
|
||||
|
||||
const esp_console_cmd_t cmd = {
|
||||
.command = "ota_update",
|
||||
.help = "Updates the application binary from the provided URL",
|
||||
.hint = NULL,
|
||||
.func = &perform_ota_update,
|
||||
.argtable = &ota_args
|
||||
};
|
||||
ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) );
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
// Register system functions
|
||||
static void register_ota_cmd();
|
||||
void register_ota_cmd();
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -41,12 +41,15 @@ esp_err_t _http_event_handler(esp_http_client_event_t *evt)
|
||||
switch (evt->event_id) {
|
||||
case HTTP_EVENT_ERROR:
|
||||
ESP_LOGD(TAG, "HTTP_EVENT_ERROR");
|
||||
strncpy(ota_status,sizeof(ota_status)-1,"HTTP_EVENT_ERROR");
|
||||
break;
|
||||
case HTTP_EVENT_ON_CONNECTED:
|
||||
ESP_LOGD(TAG, "HTTP_EVENT_ON_CONNECTED");
|
||||
break;
|
||||
strncpy(ota_status,sizeof(ota_status)-1,"HTTP_EVENT_ON_CONNECTED");
|
||||
break;
|
||||
case HTTP_EVENT_HEADER_SENT:
|
||||
ESP_LOGD(TAG, "HTTP_EVENT_HEADER_SENT");
|
||||
strncpy(ota_status,sizeof(ota_status)-1,"HTTP_EVENT_HEADER_SENT");
|
||||
break;
|
||||
case HTTP_EVENT_ON_HEADER:
|
||||
ESP_LOGD(TAG, "HTTP_EVENT_ON_HEADER, key=%s, value=%s", evt->header_key, evt->header_value);
|
||||
@@ -59,6 +62,7 @@ esp_err_t _http_event_handler(esp_http_client_event_t *evt)
|
||||
break;
|
||||
case HTTP_EVENT_DISCONNECTED:
|
||||
ESP_LOGD(TAG, "HTTP_EVENT_DISCONNECTED");
|
||||
strncpy(ota_status,sizeof(ota_status)-1,"HTTP_EVENT_DISCONNECTED");
|
||||
break;
|
||||
}
|
||||
return ESP_OK;
|
||||
|
||||
@@ -407,7 +407,7 @@ void wifi_manager_generate_ip_info_json(update_reason_code_t update_reason_code)
|
||||
wifi_config_t *config = wifi_manager_get_wifi_sta_config();
|
||||
if(config){
|
||||
#if !RECOVERY_APPLICATION
|
||||
const char ip_info_json_format[] = ",\"ip\":\"%s\",\"netmask\":\"%s\",\"gw\":\"%s\",\"urc\":%d}\n";
|
||||
const char ip_info_json_format[] = ",\"ip\":\"%s\",\"netmask\":\"%s\",\"gw\":\"%s\",\"urc\":%d,\"appname\":\"%s\",\"vers\":\"%s\"}\n";
|
||||
#else
|
||||
const char ip_info_json_format[] = ",\"ip\":\"%s\",\"netmask\":\"%s\",\"gw\":\"%s\",\"urc\":%d, \"ota_dsc\":\"%s\", \"ota_pct\":%d}\n";
|
||||
#endif
|
||||
|
||||
@@ -240,11 +240,11 @@ void console_start() {
|
||||
esp_console_register_help_command();
|
||||
register_system();
|
||||
register_nvs();
|
||||
#if !RECOVERY_APPLICATION
|
||||
#pragma message "compiling for squeezelite""
|
||||
#if ! RECOVERY_APPLICATION
|
||||
#warning "compiling for squeezelite"
|
||||
register_squeezelite();
|
||||
#else
|
||||
#pragma message "compiling for recovery"
|
||||
#warning "compiling for recovery"
|
||||
register_ota_cmd();
|
||||
#endif
|
||||
register_i2ctools();
|
||||
|
||||
Reference in New Issue
Block a user