Comments (9)
Please describe your setup more in detail
from makeesparduino.
I have it failing as well (although not exactly with the same message) with the latest git version of the ESP8266 core.
Some time ago we have added a few new flags, which are not present in makefile.
Here's the list of changes to platform.txt:
https://github.com/esp8266/Arduino/commits/292912402891da1305c629b698cc106fe9f8e5d7/platform.txt
from makeesparduino.
Here's the summary of changes required. This probably needs to be wrapped with some grep magic similar to what was done for libstdc++, to be backwards compatible.
From aeff3bbec5e8bbeb811ca22aaed5ec060ce3cb06 Mon Sep 17 00:00:00 2001
From: Ivan Grokhotkov <[email protected]>
Date: Thu, 28 Jul 2016 20:10:14 +0800
Subject: [PATCH] Update cflags and ldflags for 2.3.0+
---
makeEspArduino.mk | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/makeEspArduino.mk b/makeEspArduino.mk
index cb48a75..aa9a03b 100644
--- a/makeEspArduino.mk
+++ b/makeEspArduino.mk
@@ -86,14 +86,14 @@ ESP_TOOL = $(TOOLS_ROOT)/esptool/esptool
OTA_TOOL = $(TOOLS_ROOT)/espota.py
HTTP_TOOL = curl
-INCLUDE_DIRS += $(SDK_ROOT)/include $(SDK_ROOT)/lwip/include $(CORE_DIR) $(ESP_ROOT)/variants/generic $(OBJ_DIR)
+INCLUDE_DIRS += $(SDK_ROOT)/include $(SDK_ROOT)/lwip/include $(SDK_ROOT)/libc/xtensa-lx106-elf/include $(CORE_DIR) $(ESP_ROOT)/variants/generic $(OBJ_DIR)
C_DEFINES = -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -DF_CPU=80000000L -DARDUINO=10605 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266
C_INCLUDES = $(foreach dir,$(INCLUDE_DIRS) $(USER_DIRS),-I$(dir))
C_FLAGS ?= -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
CPP_FLAGS ?= -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections
S_FLAGS ?= -c -g -x assembler-with-cpp -MMD
-LD_FLAGS ?= -g -w -Os -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static -L$(SDK_ROOT)/lib -L$(SDK_ROOT)/ld -T$(FLASH_LAYOUT) -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,register_chipv6_phy
-LD_STD_LIBS ?= -lm -lgcc -lhal -lphy -lnet80211 -llwip -lwpa -lmain -lpp -lsmartconfig -lwps -lcrypto -laxtls
+LD_FLAGS ?= -g -w -Os -nostdlib -Wl,--no-check-sections -u call_user_start -u _printf_float -u _scanf_float -Wl,-static -L$(SDK_ROOT)/libc/xtensa-lx106-elf/lib -L$(SDK_ROOT)/lib -L$(SDK_ROOT)/ld -T$(FLASH_LAYOUT) -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,register_chipv6_phy
+LD_STD_LIBS ?= -lhal -lphy -lnet80211 -llwip -lwpa -lmain -lpp -lsmartconfig -lwps -lcrypto -lespnow -laxtls -lc -lm -lgcc
# stdc++ used in later versions of esp8266 Arduino
LD_STD_CPP = lstdc++
ifneq ($(shell grep $(LD_STD_CPP) $(ESP_ROOT)/platform.txt),)
--
2.8.1
Two linker flags, -u _printf_float -u _scanf_float
can be made configurable via some ENABLE_PRINTF_FLOAT
/ENABLE_SCANF_FLOAT
options. Removing these options can save some memory for applications which don't use floating point formats.
from makeesparduino.
Time to create a parser of platform.txt, stay tuned...
from makeesparduino.
As another option, maybe we can solve this from the other end?
I can create a makefile with the right options and place it into the ESP8266 Arduino package. Then you can include the makefile and get all the options from there. This may be useful for other environments (platform.io?) as well.
from makeesparduino.
Well if you can live with updating both that file and platform.txt it would be very convenient.
The only thing you have to provide in this file is something like the current variables for the include, compile and link options
from makeesparduino.
I have a parsing solution in the works now. Has the advantage of functioning also with older versions.
from makeesparduino.
Now commited
from makeesparduino.
Wow, most impressive usage of perl inside a Makefile 👍
Good point about older versions as well.
from makeesparduino.
Related Issues (20)
- ESP8266WiFi.h: No such file or directory HOT 5
- Can't build project that contains two files with identical name HOT 19
- Couldn't write a littlefs data filesystem HOT 5
- Specifying multiple library directories and source files in LIBS seems not to work HOT 14
- Error when special characters in path HOT 1
- LittleFS compile errors on esp8266 HOT 4
- Getting Xtensa Error HOT 1
- ESP32 python: can't open file '/esptool.py': [Errno 2] No such file or directory HOT 6
- how to build for esp32s3 etc.? HOT 4
- Variant ESP32 devices HOT 1
- Arch WSL g++ HOT 2
- Calling 'make clean' twice will trigger config parser. HOT 7
- build_opt.h: No such file or directory HOT 5
- Duplicate SKETCH when including on working directory HOT 5
- compiling a sketch with Bodmers TFT_eSPI library HOT 2
- Problems with include path HOT 7
- Compilation error on core's version 3.1.0 HOT 5
- Compilation of a simple program for esp32 fails because it tries to include library SoftwareSerial only available for architecture avr HOT 1
- .git folder appears to be included during make HOT 9
- Arduino IDE 2.x does not have preferences.txt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from makeesparduino.