Commit bf3463d0 authored by zeroday's avatar zeroday
Browse files

Merge pull request #75 from nodemcu/dev095

Dev095
parents 0a3702f8 729603fa
...@@ -4,12 +4,66 @@ ifndef PDIR ...@@ -4,12 +4,66 @@ ifndef PDIR
endif endif
AR = xt-ar #############################################################
CC = xt-xcc # Select compile
NM = xt-nm #
CPP = xt-cpp ifeq ($(OS),Windows_NT)
OBJCOPY = xt-objcopy # WIN32
#MAKE = xt-make # We are under windows.
ifeq ($(XTENSA_CORE),lx106)
# It is xcc
AR = xt-ar
CC = xt-xcc
NM = xt-nm
CPP = xt-cpp
OBJCOPY = xt-objcopy
#MAKE = xt-make
CCFLAGS += -Os --rename-section .text=.irom0.text --rename-section .literal=.irom0.literal
else
# It is gcc, may be cygwin
# Can we use -fdata-sections?
CCFLAGS += -Os -ffunction-sections -fno-jump-tables
AR = xtensa-lx106-elf-ar
CC = xtensa-lx106-elf-gcc
NM = xtensa-lx106-elf-nm
CPP = xtensa-lx106-elf-cpp
OBJCOPY = xtensa-lx106-elf-objcopy
endif
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
# ->AMD64
endif
ifeq ($(PROCESSOR_ARCHITECTURE),x86)
# ->IA32
endif
else
# We are under other system, may be Linux. Assume using gcc.
# Can we use -fdata-sections?
CCFLAGS += -Os -ffunction-sections -fno-jump-tables
AR = xtensa-lx106-elf-ar
CC = xtensa-lx106-elf-gcc
NM = xtensa-lx106-elf-nm
CPP = xtensa-lx106-elf-cpp
OBJCOPY = xtensa-lx106-elf-objcopy
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
# LINUX
endif
ifeq ($(UNAME_S),Darwin)
# OSX
endif
UNAME_P := $(shell uname -p)
ifeq ($(UNAME_P),x86_64)
# ->AMD64
endif
ifneq ($(filter %86,$(UNAME_P)),)
# ->IA32
endif
ifneq ($(filter arm%,$(UNAME_P)),)
# ->ARM
endif
endif
#############################################################
CSRCS ?= $(wildcard *.c) CSRCS ?= $(wildcard *.c)
ASRCs ?= $(wildcard *.s) ASRCs ?= $(wildcard *.s)
......
# **NodeMcu** # # **NodeMcu** #
version 0.9.4 version 0.9.5
###A lua based firmware for wifi-soc esp8266 ###A lua based firmware for wifi-soc esp8266
Build on [ESP8266 sdk 0.9.4](http://bbs.espressif.com/viewtopic.php?f=5&t=90)<br /> Build on [ESP8266 sdk 0.9.5](http://bbs.espressif.com/viewtopic.php?f=7&t=104)<br />
Lua core based on [eLua project](http://www.eluaproject.net/)<br /> Lua core based on [eLua project](http://www.eluaproject.net/)<br />
File system based on [spiffs](https://github.com/pellepl/spiffs)<br /> File system based on [spiffs](https://github.com/pellepl/spiffs)<br />
Open source development kit for NodeMCU [nodemcu-devkit](https://github.com/nodemcu/nodemcu-devkit)<br /> Open source development kit for NodeMCU [nodemcu-devkit](https://github.com/nodemcu/nodemcu-devkit)<br />
...@@ -13,6 +13,13 @@ bbs: [中文论坛Chinese bbs](http://bbs.nodemcu.com)<br /> ...@@ -13,6 +13,13 @@ bbs: [中文论坛Chinese bbs](http://bbs.nodemcu.com)<br />
Tencent QQ group QQ群: 309957875<br /> Tencent QQ group QQ群: 309957875<br />
# Change log # Change log
2015-01-06<br />
update sdk to 0.9.5.<br />
pre_build bin now compiled by gcc toolchain.<br />
memory/heap usage optimized.<br />
add support for multiple platform and toolchain include eclipse. <br />
combine firmware for 512K, 1M, 2M, 4M flash to one. flash size auto-detected.
2014-12-30<br /> 2014-12-30<br />
modify uart.on api, when run_input set to 0, uart.on now can read raw data from uart.<br /> modify uart.on api, when run_input set to 0, uart.on now can read raw data from uart.<br />
serial input now accept non-ascii chars.<br /> serial input now accept non-ascii chars.<br />
...@@ -98,13 +105,13 @@ add tmr.time() api to get rtc time and calibration. ...@@ -98,13 +105,13 @@ add tmr.time() api to get rtc time and calibration.
</table> </table>
#Build option #Build option
####*GNU toolchain is not tested*
####file ./app/include/user_config.h ####file ./app/include/user_config.h
```c ```c
#define FLASH_512K // #define FLASH_512K
// #define FLASH_1M // #define FLASH_1M
// #define FLASH_2M // #define FLASH_2M
// #define FLASH_4M // #define FLASH_4M
#define FLASH_AUTOSIZE
... ...
#define LUA_USE_MODULES #define LUA_USE_MODULES
#ifdef LUA_USE_MODULES #ifdef LUA_USE_MODULES
...@@ -119,12 +126,12 @@ add tmr.time() api to get rtc time and calibration. ...@@ -119,12 +126,12 @@ add tmr.time() api to get rtc time and calibration.
#define LUA_USE_MODULES_ADC #define LUA_USE_MODULES_ADC
#define LUA_USE_MODULES_UART #define LUA_USE_MODULES_UART
#define LUA_USE_MODULES_OW #define LUA_USE_MODULES_OW
//#define LUA_USE_MODULES_BIT #define LUA_USE_MODULES_BIT
#endif /* LUA_USE_MODULES */ #endif /* LUA_USE_MODULES */
``` ```
#Flash the firmware #Flash the firmware
nodemcu_512k.bin: 0x00000<br /> nodemcu_latest.bin: 0x00000<br />
for most esp8266 modules, just pull GPIO0 down and restart.<br /> for most esp8266 modules, just pull GPIO0 down and restart.<br />
You can use the [nodemcu-flasher](https://github.com/nodemcu/nodemcu-flasher) to burn the firmware. You can use the [nodemcu-flasher](https://github.com/nodemcu/nodemcu-flasher) to burn the firmware.
......
<?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.992255352">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.cross.base.992255352" moduleId="org.eclipse.cdt.core.settings" name="Default">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.cross.base.992255352" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="cdt.managedbuild.toolchain.gnu.cross.base.992255352.1209976491" name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.1901907892" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.base">
<option id="cdt.managedbuild.option.gnu.cross.prefix.1771691886" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix"/>
<option id="cdt.managedbuild.option.gnu.cross.path.1831805518" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.2055058514" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
<builder command="gen_misc.bat" enableAutoBuild="false" enabledIncrementalBuild="true" id="cdt.managedbuild.builder.gnu.cross.415628675" incrementalBuildTarget="" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="false" superClass="cdt.managedbuild.builder.gnu.cross">
<outputEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name=""/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="bin"/>
</outputEntries>
</builder>
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.972920545" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1985687892" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.36308842" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1696212951" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1453974065" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.2057246668" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.2049169207" 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.2111505538" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.353143895" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1235194497" 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="nodemcu-firmware.null.292794708" name="nodemcu-firmware"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Default">
<resource resourceType="PROJECT" workspacePath="/nodemcu-firmware"/>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.992255352;cdt.managedbuild.toolchain.gnu.cross.base.992255352.1209976491;cdt.managedbuild.tool.gnu.cross.c.compiler.972920545;cdt.managedbuild.tool.gnu.c.compiler.input.1985687892">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.cross.base.992255352;cdt.managedbuild.toolchain.gnu.cross.base.992255352.1209976491;cdt.managedbuild.tool.gnu.cross.cpp.compiler.36308842;cdt.managedbuild.tool.gnu.cpp.compiler.input.1696212951">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
</cproject>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>nodemcu-firmware</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
<linkedResources>
<link>
<name>bin</name>
<type>2</type>
<locationURI>PARENT-1-PROJECT_LOC/bin</locationURI>
</link>
</linkedResources>
</projectDescription>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="cdt.managedbuild.toolchain.gnu.cross.base.992255352" 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 copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1912993350869412582" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
</extension>
</configuration>
</project>
eclipse.preferences.version=1
org.eclipse.cdt.codan.checkers.errnoreturn=Warning
org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},implicit\=>false}
org.eclipse.cdt.codan.checkers.errreturnvalue=Error
org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.checkers.noreturn=Error
org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},implicit\=>false}
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false}
org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},unknown\=>false,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=Warning
org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},skip\=>true}
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error
org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error
org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},paramNot\=>false}
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},else\=>false,afterelse\=>false}
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true}
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true}
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true,exceptions\=>("@(\#)","$Id")}
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
eclipse.preferences.version=1
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/PATH/delimiter=;
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/PATH/operation=append
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/PATH/value=C\:\\Espressif\\xtensa-lx106-elf\\bin
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/append=true
environment/project/cdt.managedbuild.toolchain.gnu.cross.base.992255352/appendContributed=true
...@@ -41,7 +41,6 @@ endif # } PDIR ...@@ -41,7 +41,6 @@ endif # } PDIR
APPDIR = . APPDIR = .
LDDIR = ../ld LDDIR = ../ld
CCFLAGS += -Os
TARGET_LDFLAGS = \ TARGET_LDFLAGS = \
-nostdlib \ -nostdlib \
...@@ -49,6 +48,7 @@ TARGET_LDFLAGS = \ ...@@ -49,6 +48,7 @@ TARGET_LDFLAGS = \
--longcalls \ --longcalls \
--text-section-literals --text-section-literals
ifeq ($(FLAVOR),debug) ifeq ($(FLAVOR),debug)
TARGET_LDFLAGS += -g -O2 TARGET_LDFLAGS += -g -O2
endif endif
......
...@@ -72,7 +72,7 @@ static uint8_t LastFamilyDiscrepancy[NUM_OW]; ...@@ -72,7 +72,7 @@ static uint8_t LastFamilyDiscrepancy[NUM_OW];
static uint8_t LastDeviceFlag[NUM_OW]; static uint8_t LastDeviceFlag[NUM_OW];
#endif #endif
void ICACHE_FLASH_ATTR onewire_init(uint8_t pin) void onewire_init(uint8_t pin)
{ {
// pinMode(pin, INPUT); // pinMode(pin, INPUT);
platform_gpio_mode(pin, PLATFORM_GPIO_INPUT, PLATFORM_GPIO_PULLUP); platform_gpio_mode(pin, PLATFORM_GPIO_INPUT, PLATFORM_GPIO_PULLUP);
...@@ -88,7 +88,7 @@ void ICACHE_FLASH_ATTR onewire_init(uint8_t pin) ...@@ -88,7 +88,7 @@ void ICACHE_FLASH_ATTR onewire_init(uint8_t pin)
// //
// Returns 1 if a device asserted a presence pulse, 0 otherwise. // Returns 1 if a device asserted a presence pulse, 0 otherwise.
// //
uint8_t ICACHE_FLASH_ATTR onewire_reset(uint8_t pin) uint8_t onewire_reset(uint8_t pin)
{ {
uint8_t r; uint8_t r;
uint8_t retries = 125; uint8_t retries = 125;
...@@ -120,7 +120,7 @@ uint8_t ICACHE_FLASH_ATTR onewire_reset(uint8_t pin) ...@@ -120,7 +120,7 @@ uint8_t ICACHE_FLASH_ATTR onewire_reset(uint8_t pin)
// Write a bit. Port and bit is used to cut lookup time and provide // Write a bit. Port and bit is used to cut lookup time and provide
// more certain timing. // more certain timing.
// //
static void ICACHE_FLASH_ATTR onewire_write_bit(uint8_t pin, uint8_t v) static void onewire_write_bit(uint8_t pin, uint8_t v)
{ {
if (v & 1) { if (v & 1) {
noInterrupts(); noInterrupts();
...@@ -145,7 +145,7 @@ static void ICACHE_FLASH_ATTR onewire_write_bit(uint8_t pin, uint8_t v) ...@@ -145,7 +145,7 @@ static void ICACHE_FLASH_ATTR onewire_write_bit(uint8_t pin, uint8_t v)
// Read a bit. Port and bit is used to cut lookup time and provide // Read a bit. Port and bit is used to cut lookup time and provide
// more certain timing. // more certain timing.
// //
static uint8_t ICACHE_FLASH_ATTR onewire_read_bit(uint8_t pin) static uint8_t onewire_read_bit(uint8_t pin)
{ {
uint8_t r; uint8_t r;
...@@ -168,7 +168,7 @@ static uint8_t ICACHE_FLASH_ATTR onewire_read_bit(uint8_t pin) ...@@ -168,7 +168,7 @@ static uint8_t ICACHE_FLASH_ATTR onewire_read_bit(uint8_t pin)
// go tri-state at the end of the write to avoid heating in a short or // go tri-state at the end of the write to avoid heating in a short or
// other mishap. // other mishap.
// //
void ICACHE_FLASH_ATTR onewire_write(uint8_t pin, uint8_t v, uint8_t power /* = 0 */) { void onewire_write(uint8_t pin, uint8_t v, uint8_t power /* = 0 */) {
uint8_t bitMask; uint8_t bitMask;
for (bitMask = 0x01; bitMask; bitMask <<= 1) { for (bitMask = 0x01; bitMask; bitMask <<= 1) {
...@@ -182,7 +182,7 @@ void ICACHE_FLASH_ATTR onewire_write(uint8_t pin, uint8_t v, uint8_t power /* = ...@@ -182,7 +182,7 @@ void ICACHE_FLASH_ATTR onewire_write(uint8_t pin, uint8_t v, uint8_t power /* =
} }
} }
void ICACHE_FLASH_ATTR onewire_write_bytes(uint8_t pin, const uint8_t *buf, uint16_t count, bool power /* = 0 */) { void onewire_write_bytes(uint8_t pin, const uint8_t *buf, uint16_t count, bool power /* = 0 */) {
uint16_t i; uint16_t i;
for (i = 0 ; i < count ; i++) for (i = 0 ; i < count ; i++)
onewire_write(pin, buf[i], 0); onewire_write(pin, buf[i], 0);
...@@ -197,7 +197,7 @@ void ICACHE_FLASH_ATTR onewire_write_bytes(uint8_t pin, const uint8_t *buf, uint ...@@ -197,7 +197,7 @@ void ICACHE_FLASH_ATTR onewire_write_bytes(uint8_t pin, const uint8_t *buf, uint
// //
// Read a byte // Read a byte
// //
uint8_t ICACHE_FLASH_ATTR onewire_read(uint8_t pin) { uint8_t onewire_read(uint8_t pin) {
uint8_t bitMask; uint8_t bitMask;
uint8_t r = 0; uint8_t r = 0;
...@@ -207,7 +207,7 @@ uint8_t ICACHE_FLASH_ATTR onewire_read(uint8_t pin) { ...@@ -207,7 +207,7 @@ uint8_t ICACHE_FLASH_ATTR onewire_read(uint8_t pin) {
return r; return r;
} }
void ICACHE_FLASH_ATTR onewire_read_bytes(uint8_t pin, uint8_t *buf, uint16_t count) { void onewire_read_bytes(uint8_t pin, uint8_t *buf, uint16_t count) {
uint16_t i; uint16_t i;
for (i = 0 ; i < count ; i++) for (i = 0 ; i < count ; i++)
buf[i] = onewire_read(pin); buf[i] = onewire_read(pin);
...@@ -216,7 +216,7 @@ void ICACHE_FLASH_ATTR onewire_read_bytes(uint8_t pin, uint8_t *buf, uint16_t co ...@@ -216,7 +216,7 @@ void ICACHE_FLASH_ATTR onewire_read_bytes(uint8_t pin, uint8_t *buf, uint16_t co
// //
// Do a ROM select // Do a ROM select
// //
void ICACHE_FLASH_ATTR onewire_select(uint8_t pin, const uint8_t rom[8]) void onewire_select(uint8_t pin, const uint8_t rom[8])
{ {
uint8_t i; uint8_t i;
...@@ -228,12 +228,12 @@ void ICACHE_FLASH_ATTR onewire_select(uint8_t pin, const uint8_t rom[8]) ...@@ -228,12 +228,12 @@ void ICACHE_FLASH_ATTR onewire_select(uint8_t pin, const uint8_t rom[8])
// //
// Do a ROM skip // Do a ROM skip
// //
void ICACHE_FLASH_ATTR onewire_skip(uint8_t pin) void onewire_skip(uint8_t pin)
{ {
onewire_write(pin, 0xCC, 0); // Skip ROM onewire_write(pin, 0xCC, 0); // Skip ROM
} }
void ICACHE_FLASH_ATTR onewire_depower(uint8_t pin) void onewire_depower(uint8_t pin)
{ {
noInterrupts(); noInterrupts();
DIRECT_MODE_INPUT(pin); DIRECT_MODE_INPUT(pin);
...@@ -246,7 +246,7 @@ void ICACHE_FLASH_ATTR onewire_depower(uint8_t pin) ...@@ -246,7 +246,7 @@ void ICACHE_FLASH_ATTR onewire_depower(uint8_t pin)
// You need to use this function to start a search again from the beginning. // You need to use this function to start a search again from the beginning.
// You do not need to do it for the first search, though you could. // You do not need to do it for the first search, though you could.
// //
void ICACHE_FLASH_ATTR onewire_reset_search(uint8_t pin) void onewire_reset_search(uint8_t pin)
{ {
// reset the search state // reset the search state
LastDiscrepancy[pin] = 0; LastDiscrepancy[pin] = 0;
...@@ -262,7 +262,7 @@ void ICACHE_FLASH_ATTR onewire_reset_search(uint8_t pin) ...@@ -262,7 +262,7 @@ void ICACHE_FLASH_ATTR onewire_reset_search(uint8_t pin)
// Setup the search to find the device type 'family_code' on the next call // Setup the search to find the device type 'family_code' on the next call
// to search(*newAddr) if it is present. // to search(*newAddr) if it is present.
// //
void ICACHE_FLASH_ATTR onewire_target_search(uint8_t pin, uint8_t family_code) void onewire_target_search(uint8_t pin, uint8_t family_code)
{ {
// set the search state to find SearchFamily type devices // set the search state to find SearchFamily type devices
ROM_NO[pin][0] = family_code; ROM_NO[pin][0] = family_code;
...@@ -290,7 +290,7 @@ void ICACHE_FLASH_ATTR onewire_target_search(uint8_t pin, uint8_t family_code) ...@@ -290,7 +290,7 @@ void ICACHE_FLASH_ATTR onewire_target_search(uint8_t pin, uint8_t family_code)
// Return TRUE : device found, ROM number in ROM_NO buffer // Return TRUE : device found, ROM number in ROM_NO buffer
// FALSE : device not found, end of search // FALSE : device not found, end of search
// //
uint8_t ICACHE_FLASH_ATTR onewire_search(uint8_t pin, uint8_t *newAddr) uint8_t onewire_search(uint8_t pin, uint8_t *newAddr)
{ {
uint8_t id_bit_number; uint8_t id_bit_number;
uint8_t last_zero, rom_byte_number, search_result; uint8_t last_zero, rom_byte_number, search_result;
...@@ -449,7 +449,7 @@ static const uint8_t dscrc_table[] = { ...@@ -449,7 +449,7 @@ static const uint8_t dscrc_table[] = {
// compared to all those delayMicrosecond() calls. But I got // compared to all those delayMicrosecond() calls. But I got
// confused, so I use this table from the examples.) // confused, so I use this table from the examples.)
// //
uint8_t ICACHE_FLASH_ATTR onewire_crc8(const uint8_t *addr, uint8_t len) uint8_t onewire_crc8(const uint8_t *addr, uint8_t len)
{ {
uint8_t crc = 0; uint8_t crc = 0;
...@@ -463,7 +463,7 @@ uint8_t ICACHE_FLASH_ATTR onewire_crc8(const uint8_t *addr, uint8_t len) ...@@ -463,7 +463,7 @@ uint8_t ICACHE_FLASH_ATTR onewire_crc8(const uint8_t *addr, uint8_t len)
// Compute a Dallas Semiconductor 8 bit CRC directly. // Compute a Dallas Semiconductor 8 bit CRC directly.
// this is much slower, but much smaller, than the lookup table. // this is much slower, but much smaller, than the lookup table.
// //
uint8_t ICACHE_FLASH_ATTR onewire_crc8(const uint8_t *addr, uint8_t len) uint8_t onewire_crc8(const uint8_t *addr, uint8_t len)
{ {
uint8_t crc = 0; uint8_t crc = 0;
...@@ -501,7 +501,7 @@ uint8_t ICACHE_FLASH_ATTR onewire_crc8(const uint8_t *addr, uint8_t len) ...@@ -501,7 +501,7 @@ uint8_t ICACHE_FLASH_ATTR onewire_crc8(const uint8_t *addr, uint8_t len)
// *not* at a 16-bit integer. // *not* at a 16-bit integer.
// @param crc - The crc starting value (optional) // @param crc - The crc starting value (optional)
// @return True, iff the CRC matches. // @return True, iff the CRC matches.
bool ICACHE_FLASH_ATTR onewire_check_crc16(const uint8_t* input, uint16_t len, const uint8_t* inverted_crc, uint16_t crc) bool onewire_check_crc16(const uint8_t* input, uint16_t len, const uint8_t* inverted_crc, uint16_t crc)
{ {
crc = ~onewire_crc16(input, len, crc); crc = ~onewire_crc16(input, len, crc);
return (crc & 0xFF) == inverted_crc[0] && (crc >> 8) == inverted_crc[1]; return (crc & 0xFF) == inverted_crc[0] && (crc >> 8) == inverted_crc[1];
...@@ -519,7 +519,7 @@ bool ICACHE_FLASH_ATTR onewire_check_crc16(const uint8_t* input, uint16_t len, c ...@@ -519,7 +519,7 @@ bool ICACHE_FLASH_ATTR onewire_check_crc16(const uint8_t* input, uint16_t len, c
// @param len - How many bytes to use. // @param len - How many bytes to use.
// @param crc - The crc starting value (optional) // @param crc - The crc starting value (optional)
// @return The CRC16, as defined by Dallas Semiconductor. // @return The CRC16, as defined by Dallas Semiconductor.
uint16_t ICACHE_FLASH_ATTR onewire_crc16(const uint8_t* input, uint16_t len, uint16_t crc) uint16_t onewire_crc16(const uint8_t* input, uint16_t len, uint16_t crc)
{ {
static const uint8_t oddparity[16] = static const uint8_t oddparity[16] =
{ 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 }; { 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 };
......
...@@ -305,7 +305,7 @@ pwm_get_freq(uint8 channel) ...@@ -305,7 +305,7 @@ pwm_get_freq(uint8 channel)
* Parameters : NONE * Parameters : NONE
* Returns : NONE * Returns : NONE
*******************************************************************************/ *******************************************************************************/
LOCAL void LOCAL void ICACHE_RAM_ATTR
pwm_tim1_intr_handler(void) pwm_tim1_intr_handler(void)
{ {
uint8 local_toggle = pwm_toggle; // pwm_toggle may change outside uint8 local_toggle = pwm_toggle; // pwm_toggle may change outside
......
...@@ -11,7 +11,7 @@ extern UartDevice UartDev; ...@@ -11,7 +11,7 @@ extern UartDevice UartDev;
#define uart_putc uart0_putc #define uart_putc uart0_putc
bool ICACHE_FLASH_ATTR uart_getc(char *c){ bool uart_getc(char *c){
RcvMsgBuff *pRxBuff = &(UartDev.rcv_buff); RcvMsgBuff *pRxBuff = &(UartDev.rcv_buff);
if(pRxBuff->pWritePos == pRxBuff->pReadPos){ // empty if(pRxBuff->pWritePos == pRxBuff->pReadPos){ // empty
return false; return false;
...@@ -30,7 +30,7 @@ bool ICACHE_FLASH_ATTR uart_getc(char *c){ ...@@ -30,7 +30,7 @@ bool ICACHE_FLASH_ATTR uart_getc(char *c){
} }
#if 0 #if 0
int ICACHE_FLASH_ATTR readline4lua(const char *prompt, char *buffer, int length){ int readline4lua(const char *prompt, char *buffer, int length){
char ch; char ch;
int line_position; int line_position;
......
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
// UartDev is defined and initialized in rom code. // UartDev is defined and initialized in rom code.
extern UartDevice UartDev; extern UartDevice UartDev;
LOCAL void uart0_rx_intr_handler(void *para); LOCAL void ICACHE_RAM_ATTR
uart0_rx_intr_handler(void *para);
/****************************************************************************** /******************************************************************************
* FunctionName : uart_config * FunctionName : uart_config
......
...@@ -3,17 +3,31 @@ set BACKPATH=%PATH% ...@@ -3,17 +3,31 @@ set BACKPATH=%PATH%
set PATH=%BACKPATH%;%CD%\..\tools set PATH=%BACKPATH%;%CD%\..\tools
@echo on @echo on
make %1
del /F ..\bin\eagle.app.v6.flash.bin ..\bin\eagle.app.v6.irom0text.bin ..\bin\eagle.app.v6.dump ..\bin\eagle.app.v6.S del /F ..\bin\eagle.app.v6.flash.bin ..\bin\eagle.app.v6.irom0text.bin ..\bin\eagle.app.v6.dump ..\bin\eagle.app.v6.S
cd .output\eagle\debug\image cd .output\eagle\debug\image
xt-objdump -x -s eagle.app.v6.out > ..\..\..\..\..\bin\eagle.app.v6.dump @echo off
xt-objdump -S eagle.app.v6.out > ..\..\..\..\..\bin\eagle.app.v6.S set OBJDUMP=xt-objdump
set OBJCOPY=xt-objcopy
if defined XTENSA_CORE (
set OBJDUMP=xt-objdump
set OBJCOPY=xt-objcopy
) else (
set OBJDUMP=xtensa-lx106-elf-objdump
set OBJCOPY=xtensa-lx106-elf-objcopy
)
@echo on
%OBJDUMP% -x -s eagle.app.v6.out > ..\..\..\..\..\bin\eagle.app.v6.dump
%OBJDUMP% -S eagle.app.v6.out > ..\..\..\..\..\bin\eagle.app.v6.S
xt-objcopy --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin %OBJCOPY% --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin
xt-objcopy --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin %OBJCOPY% --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin
xt-objcopy --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin %OBJCOPY% --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin
xt-objcopy --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin %OBJCOPY% --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin
gen_appbin.py eagle.app.v6.out v6 gen_appbin.py eagle.app.v6.out v6
......
...@@ -5,13 +5,13 @@ rm ../bin/eagle.app.v6.flash.bin ../bin/eagle.app.v6.irom0text.bin ../bin/eagle. ...@@ -5,13 +5,13 @@ rm ../bin/eagle.app.v6.flash.bin ../bin/eagle.app.v6.irom0text.bin ../bin/eagle.
cd .output/eagle/debug/image cd .output/eagle/debug/image
xt-objdump -x -s eagle.app.v6.out > ../../../../../bin/eagle.app.v6.dump xtensa-lx106-elf-objdump -x -s eagle.app.v6.out > ../../../../../bin/eagle.app.v6.dump
xt-objdump -S eagle.app.v6.out > ../../../../../bin/eagle.app.v6.S xtensa-lx106-elf-objdump -S eagle.app.v6.out > ../../../../../bin/eagle.app.v6.S
xt-objcopy --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin xtensa-lx106-elf-objcopy --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin
xt-objcopy --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin xtensa-lx106-elf-objcopy --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin
xt-objcopy --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin xtensa-lx106-elf-objcopy --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin
xt-objcopy --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin xtensa-lx106-elf-objcopy --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin
../../../../../tools/gen_appbin.py eagle.app.v6.out v6 ../../../../../tools/gen_appbin.py eagle.app.v6.out v6
......
...@@ -3,14 +3,28 @@ set BACKPATH=%PATH% ...@@ -3,14 +3,28 @@ set BACKPATH=%PATH%
set PATH=%BACKPATH%;%CD%\..\tools set PATH=%BACKPATH%;%CD%\..\tools
@echo on @echo on
make APP=$1
rm ..\bin\upgrade\%1.bin rm ..\bin\upgrade\%1.bin
cd .output\eagle\debug\image\ cd .output\eagle\debug\image\
xt-objcopy --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin @echo off
xt-objcopy --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin set OBJDUMP=xt-objdump
xt-objcopy --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin set OBJCOPY=xt-objcopy
xt-objcopy --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin if defined XTENSA_CORE (
set OBJDUMP=xt-objdump
set OBJCOPY=xt-objcopy
) else (
set OBJDUMP=xtensa-lx106-elf-objdump
set OBJCOPY=xtensa-lx106-elf-objcopy
)
@echo on
%OBJCOPY% --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin
%OBJCOPY% --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin
%OBJCOPY% --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin
%OBJCOPY% --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin
gen_appbin.py eagle.app.v6.out v6 gen_appbin.py eagle.app.v6.out v6
......
...@@ -6,13 +6,13 @@ rm ../bin/upgrade/user$1.bin ../bin/upgrade/user$1.dump ../bin/upgrade/user$1.S ...@@ -6,13 +6,13 @@ rm ../bin/upgrade/user$1.bin ../bin/upgrade/user$1.dump ../bin/upgrade/user$1.S
cd .output/eagle/debug/image/ cd .output/eagle/debug/image/
xt-objdump -x -s eagle.app.v6.out > ../../../../../bin/upgrade/user$1.dump xtensa-lx106-elf-objdump -x -s eagle.app.v6.out > ../../../../../bin/upgrade/user$1.dump
xt-objdump -S eagle.app.v6.out > ../../../../../bin/upgrade/user$1.S xtensa-lx106-elf-objdump -S eagle.app.v6.out > ../../../../../bin/upgrade/user$1.S
xt-objcopy --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin xtensa-lx106-elf-objcopy --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin
xt-objcopy --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin xtensa-lx106-elf-objcopy --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin
xt-objcopy --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin xtensa-lx106-elf-objcopy --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin
xt-objcopy --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin xtensa-lx106-elf-objcopy --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin
../../../../../tools/gen_appbin.py eagle.app.v6.out v6 ../../../../../tools/gen_appbin.py eagle.app.v6.out v6
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
#define NODE_VERSION_MAJOR 0U #define NODE_VERSION_MAJOR 0U
#define NODE_VERSION_MINOR 9U #define NODE_VERSION_MINOR 9U
#define NODE_VERSION_REVISION 4U #define NODE_VERSION_REVISION 5U
#define NODE_VERSION_INTERNAL 0U #define NODE_VERSION_INTERNAL 0U
#define NODE_VERSION "NodeMcu 0.9.4" #define NODE_VERSION "NodeMcu 0.9.5"
#define BUILD_DATE "build 20150101" #define BUILD_DATE "build 20150106"
// #define FLASH_512K // #define FLASH_512K
// #define FLASH_1M // #define FLASH_1M
...@@ -35,8 +35,10 @@ ...@@ -35,8 +35,10 @@
#define NODE_ERR #define NODE_ERR
#endif /* NODE_ERROR */ #endif /* NODE_ERROR */
#define NODE_STORE_TYPEDEF_ATTR __attribute__((aligned(4),packed)) #define ICACHE_STORE_TYPEDEF_ATTR __attribute__((aligned(4),packed))
#define NODE_STORE_ATTR __attribute__((aligned(4))) #define ICACHE_STORE_ATTR __attribute__((aligned(4)))
#define ICACHE_RAM_ATTR __attribute__((section(".iram0.text")))
#define ICACHE_RODATA_ATTR __attribute__((section(".rodata.text")))
#define CLIENT_SSL_ENABLE #define CLIENT_SSL_ENABLE
#define GPIO_INTERRUPT_ENABLE #define GPIO_INTERRUPT_ENABLE
......
#include "c_ctype.h" #include "c_ctype.h"
#include "c_types.h" #include "c_types.h"
// int ICACHE_FLASH_ATTR isalnum(int c){} // int isalnum(int c){}
// int ICACHE_FLASH_ATTR isalpha(int c){} // int isalpha(int c){}
// int ICACHE_FLASH_ATTR iscntrl(int c){} // int iscntrl(int c){}
// int ICACHE_FLASH_ATTR isdigit(int c){} // int isdigit(int c){}
// // int ICACHE_FLASH_ATTR isgraph(int c){} // // int isgraph(int c){}
// int ICACHE_FLASH_ATTR islower(int c){} // int islower(int c){}
// int ICACHE_FLASH_ATTR isprint(int c){} // int isprint(int c){}
// int ICACHE_FLASH_ATTR ispunct(int c){} // int ispunct(int c){}
// int ICACHE_FLASH_ATTR isspace(int c){} // int isspace(int c){}
// int ICACHE_FLASH_ATTR isupper(int c){} // int isupper(int c){}
// int ICACHE_FLASH_ATTR isxdigit(int c){} // int isxdigit(int c){}
// int ICACHE_FLASH_ATTR tolower(int c){} // int tolower(int c){}
// int ICACHE_FLASH_ATTR toupper(int c){} // int toupper(int c){}
...@@ -3,34 +3,34 @@ ...@@ -3,34 +3,34 @@
#if 0 #if 0
#ifndef __math_68881 #ifndef __math_68881
double ICACHE_FLASH_ATTR atan(double x){ double atan(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR cos(double x){ double cos(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR sin(double x){ double sin(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR tan(double x){ double tan(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR tanh(double x){ double tanh(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR frexp(double x, int *y){ double frexp(double x, int *y){
return x; return x;
} }
double ICACHE_FLASH_ATTR modf(double x, double *y){ double modf(double x, double *y){
return x; return x;
} }
double ICACHE_FLASH_ATTR ceil(double x){ double ceil(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR fabs(double x){ double fabs(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR floor(double x){ double floor(double x){
return x; return x;
} }
#endif /* ! defined (__math_68881) */ #endif /* ! defined (__math_68881) */
...@@ -39,40 +39,40 @@ double ICACHE_FLASH_ATTR floor(double x){ ...@@ -39,40 +39,40 @@ double ICACHE_FLASH_ATTR floor(double x){
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
#ifndef __math_68881 #ifndef __math_68881
double ICACHE_FLASH_ATTR acos(double x){ double acos(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR asin(double x){ double asin(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR atan2(double x, double y){ double atan2(double x, double y){
return x; return x;
} }
double ICACHE_FLASH_ATTR cosh(double x){ double cosh(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR sinh(double x){ double sinh(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR exp(double x){ double exp(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR ldexp(double x, int y){ double ldexp(double x, int y){
return x; return x;
} }
double ICACHE_FLASH_ATTR log(double x){ double log(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR log10(double x){ double log10(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR pow(double x, double y){ double pow(double x, double y){
return x; return x;
} }
double ICACHE_FLASH_ATTR sqrt(double x){ double sqrt(double x){
return x; return x;
} }
double ICACHE_FLASH_ATTR fmod(double x, double y){ double fmod(double x, double y){
return x; return x;
} }
#endif /* ! defined (__math_68881) */ #endif /* ! defined (__math_68881) */
......
#include "c_stdio.h" #include "c_stdio.h"
// #include "driver/uart.h" // #include "driver/uart.h"
unsigned char __print_buf[BUFSIZ];
int c_stdin = 999; int c_stdin = 999;
int c_stdout = 1000; int c_stdout = 1000;
int c_stderr = 1001; int c_stderr = 1001;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment