diff --git a/cores/esp8266/Arduino.h b/cores/esp8266/Arduino.h index dbc003b1d..767ea4f28 100644 --- a/cores/esp8266/Arduino.h +++ b/cores/esp8266/Arduino.h @@ -112,8 +112,6 @@ void timer1_write(uint32_t ticks); //maximum ticks 8388607 #undef abs #endif -#define min(a,b) ((a)<(b)?(a):(b)) -#define max(a,b) ((a)>(b)?(a):(b)) #define abs(x) ((x)>0?(x):-(x)) #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt))) #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) @@ -215,6 +213,9 @@ void loop(void); #include "Esp.h" #include "debug.h" +#define min(a,b) ((a)<(b)?(a):(b)) +#define max(a,b) ((a)>(b)?(a):(b)) + uint16_t makeWord(uint16_t w); uint16_t makeWord(byte h, byte l); diff --git a/platform.txt b/platform.txt index a408813f4..c2cfa053e 100644 --- a/platform.txt +++ b/platform.txt @@ -6,12 +6,13 @@ # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification name=ESP8266 Modules -version=1.6.1 +version=1.6.4 -compiler.tools.path={runtime.platform.path}/tools/ -compiler.path={compiler.tools.path}xtensa-lx106-elf/bin/ -compiler.sdk.path={compiler.tools.path}sdk/ +runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}/tools/xtensa-lx106-elf +runtime.tools.esptool.path={runtime.platform.path}/tools +compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/ +compiler.sdk.path={runtime.platform.path}/tools/sdk/ compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" compiler.c.cmd=xtensa-lx106-elf-gcc @@ -33,7 +34,6 @@ compiler.ar.cmd=xtensa-lx106-elf-ar compiler.ar.flags=cru compiler.elf2hex.cmd=esptool - compiler.elf2hex.flags= compiler.size.cmd=xtensa-lx106-elf-size @@ -74,7 +74,7 @@ recipe.objcopy.eep.pattern= ## Create hex #recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" -recipe.objcopy.hex.pattern="{compiler.tools.path}{compiler.esptool.cmd}" -eo "{build.path}/{build.project_name}.elf" -bo "{build.path}/{build.project_name}_00000.bin" -bm {build.flash_mode} -bf {build.flash_freq} -bz {build.flash_size} -bs .text -bs .data -bs .rodata -bc -ec -eo "{build.path}/{build.project_name}.elf" -es .irom0.text "{build.path}/{build.project_name}_10000.bin" -ec +recipe.objcopy.hex.pattern="{runtime.tools.esptool.path}/{compiler.esptool.cmd}" -eo "{build.path}/{build.project_name}.elf" -bo "{build.path}/{build.project_name}_00000.bin" -bm {build.flash_mode} -bf {build.flash_freq} -bz {build.flash_size} -bs .text -bs .data -bs .rodata -bc -ec -eo "{build.path}/{build.project_name}.elf" -es .irom0.text "{build.path}/{build.project_name}_10000.bin" -ec ## Compute size recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"