pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cross/xtensa-lx106-elf-gcc with esp8266/Arduino



Hi,
I test esp8266-2.7.4 because the version of xtensa-lx106-elf-gcc is 4.8.2
in pkgsrc.
Here is the compilation error:
------
picohive: {/home/rxg/test/esp8266-2.7.4} /usr/pkg/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -Itools/sdk/include -Itools/sdk/lwip2/include -Itools/sdk/libc/xtensa-lx106-elf/include -c -w -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=gnu++11 -MMD -ffunction-sections -fdata-sections -fno-exceptions -DNONOSDK22x_190703=1 -DF_CPU=80000000L -DLWIP_OPEN_SRC -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DARDUINO=10607 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD=\"ESP8266_WEMOS_D1MINI\" -DFLASHMODE_DIO -DESP8266 -Icores/esp8266 -Ivariants/d1_mini cores/esp8266/core_esp8266_wiring_pulse.cpp
In file included from cores/esp8266/wiring_private.h:31:0,
                 from cores/esp8266/core_esp8266_wiring_pulse.cpp:22:
cores/esp8266/core_esp8266_wiring_pulse.cpp: In function 'long unsigned int pulseIn(uint8_t, uint8_t, long unsigned int)':
cores/esp8266/core_esp8266_wiring_pulse.cpp:40:63: error: 'UINT_MAX' was not declared in this scope
     const uint32_t max_timeout_us = clockCyclesToMicroseconds(UINT_MAX);
                                                               ^
cores/esp8266/Arduino.h:149:41: note: in definition of macro 'clockCyclesToMicroseconds'
 #define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() )
------
There is a definition #include <limits.h> in the
cores/esp8266/core_esp8266_wiring_pulse.cpp, and
picohive: {/home/rxg/test/esp8266-2.7.4} grep -R UINT_MAX ./                    Binary file ./tools/esptool/test/elf2image/esp32-bootloader.elf matches
./tools/sdk/libc/xtensa-lx106-elf/include/limits.h:#   undef UINT_MAX
./tools/sdk/libc/xtensa-lx106-elf/include/limits.h:#   define UINT_MAX (INT_MAX * 2U + 1)

What could be this problem?

-rxg



Home | Main Index | Thread Index | Old Index