thunderace / Esp8266-Arduino-Makefile

Makefile to build arduino code for ESP8266/ESP32x under linux (tested on debian X64)
34 stars 20 forks source link

Cannot build for "generic" variant with current GIT toolchain #23

Closed jbglaw closed 5 years ago

jbglaw commented 5 years ago

Running esp8266-install-from-git.sh, I get a toolchain that won't compile for a "generic" esp8266 target:

`/home/jbglaw/src/jbglaw/esp8266/foo/Esp8266-Arduino-Makefile/esp8266-git/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc -Dets -DICACHE_FLASH -U__STRICT_ANSI__ -I/home/jbglaw/src/jbglaw/esp8266/foo/Esp8266-Arduino-Makefile/esp8266-git/tools/sdk/include -I/home/jbglaw/src/jbglaw/esp8266/foo/Esp8266-Arduino-Makefile/esp8266-git/tools/sdk/lwip/include -I/home/jbglaw/src/jbglaw/esp8266/foo/Esp8266-Arduino-Makefile/esp8266-git/tools/sdk/libc/xtensa-lx106-elf/include -I./build.generic-git/core -c -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -std=gnu99 -ffunction-sections -fdata-sections -DF_CPU=none -DLWIP_OPEN_SRC -DTCP_MSS=536 -DARDUINO=10805 -DARDUINO_ESP8266_GENERIC -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD=\"ESP8266_GENERIC\" -DESP8266 -I/home/jbglaw/src/jbglaw/esp8266/foo/Esp8266-Arduino-Makefile/esp8266-git/cores/esp8266 -I/home/jbglaw/src/jbglaw/esp8266/foo/Esp8266-Arduino-Makefile/esp8266-git/variants/generic -o build.generic-git/core/core_esp8266_wiring_pulse.c.o /home/jbglaw/src/jbglaw/esp8266/foo/Esp8266-Arduino-Makefile/esp8266-git/cores/esp8266/core_esp8266_wiring_pulse.c /home/jbglaw/src/jbglaw/esp8266/foo/Esp8266-Arduino-Makefile/esp8266-git/cores/esp8266/core_esp8266_wiring_pulse.c: In function 'pulseIn':

:0:7: error: 'none' undeclared (first use in this function) /home/jbglaw/src/jbglaw/esp8266/foo/Esp8266-Arduino-Makefile/esp8266-git/cores/esp8266/Arduino.h:169:39: note: in expansion of macro 'F_CPU' #define clockCyclesPerMicrosecond() ( F_CPU / 1000000L ) ^ /home/jbglaw/src/jbglaw/esp8266/foo/Esp8266-Arduino-Makefile/esp8266-git/cores/esp8266/Arduino.h:170:46: note: in expansion of macro 'clockCyclesPerMicrosecond' #define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() ) ^ /home/jbglaw/src/jbglaw/esp8266/foo/Esp8266-Arduino-Makefile/esp8266-git/cores/esp8266/core_esp8266_wiring_pulse.c:39:37: note: in expansion of macro 'clockCyclesToMicroseconds' const uint32_t max_timeout_us = clockCyclesToMicroseconds(UINT_MAX); ^ :0:7: note: each undeclared identifier is reported only once for each function it appears in /home/jbglaw/src/jbglaw/esp8266/foo/Esp8266-Arduino-Makefile/esp8266-git/cores/esp8266/Arduino.h:169:39: note: in expansion of macro 'F_CPU' #define clockCyclesPerMicrosecond() ( F_CPU / 1000000L ) ^ /home/jbglaw/src/jbglaw/esp8266/foo/Esp8266-Arduino-Makefile/esp8266-git/cores/esp8266/Arduino.h:170:46: note: in expansion of macro 'clockCyclesPerMicrosecond' #define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() ) ^ /home/jbglaw/src/jbglaw/esp8266/foo/Esp8266-Arduino-Makefile/esp8266-git/cores/esp8266/core_esp8266_wiring_pulse.c:39:37: note: in expansion of macro 'clockCyclesToMicroseconds' const uint32_t max_timeout_us = clockCyclesToMicroseconds(UINT_MAX); ^ make: *** [Esp8266-Arduino-Makefile/espXArduino.mk:432: build.generic-git/core/core_esp8266_wiring_pulse.c.o] Error 1 rm build.generic-git/foo.ino.cpp` F_CPU is not properly set: `jbglaw@charon:~/src/jbglaw/esp8266/foo [master] $ make print-F_CPU F_CPU = none` This works with the 2.4.2 (and previously with 2.4.1) toolchains.
thunderace commented 5 years ago

Yes, there is some changes in the boards.txt file and another one in the prelink command. Fixed in the last commit. Try it.

thunderace commented 5 years ago

With my tests it's OK now so : Closed