Comments (2)
This seems to work for me:
From 251ce75bdb87d0c66b929d1310a3d6b9a1ec6480 Mon Sep 17 00:00:00 2001
From: Ivan Grokhotkov <[email protected]>
Date: Thu, 28 Jul 2016 20:10:34 +0800
Subject: [PATCH] Fix library include path detection
---
makeEspArduino.mk | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/makeEspArduino.mk b/makeEspArduino.mk
index aa9a03b..5f6891f 100644
--- a/makeEspArduino.mk
+++ b/makeEspArduino.mk
@@ -88,7 +88,7 @@ HTTP_TOOL = curl
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_INCLUDES = $(foreach dir,$(INCLUDE_DIRS) $(USER_INC_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
@@ -107,10 +107,12 @@ CORE_OBJ = $(patsubst %,$(OBJ_DIR)/%$(OBJ_EXT),$(notdir $(CORE_SRC)))
CORE_LIB = $(OBJ_DIR)/core.ar
# User defined compilation units
+USER_INC = $(SKETCH) $(shell find $(LIBS) -name "*.h")
USER_SRC = $(SKETCH) $(shell find $(LIBS) -name "*.S" -o -name "*.c" -o -name "*.cpp")
# Object file suffix seems to be significant for the linker...
USER_OBJ = $(subst .ino,.cpp,$(patsubst %,$(OBJ_DIR)/%$(OBJ_EXT),$(notdir $(USER_SRC))))
USER_DIRS = $(sort $(dir $(USER_SRC)))
+USER_INC_DIRS = $(sort $(dir $(USER_INC)))
VPATH += $(shell find $(CORE_DIR) -type d) $(USER_DIRS)
--
2.8.1
from makeesparduino.
My intended solution for this kind of problem was that you add possible special include directories by defining them in INCLUDE_DIRS. That is the reason for the "+="
Your solution is of course more convenient however. Please do a pull request.
from makeesparduino.
Related Issues (20)
- 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
- Add support for Arduino Core 3.0.0 HOT 5
- ESP32 builds stopped working after changes in the platform.txt file from the arduino-esp32 project (support relative paths in UNIX search PATH) HOT 2
- missing core dump partition
- no mk file HOT 1
- Not compatible with latest ESP32 SDK 2.0.14? 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.