Chat here about code rewrites, mods, etc... with respect to the github project https://github.com/esp8266/Arduino

Moderator: igrr

User avatar
By xxcn
#19066 First off, huge THANK YOU to Ivan and everyone who contributes to the Arduino IDE. It's definitely the highest quality, most comprehensive and complete collection of libraries for the chip. However, the "IDE" itself is sub-par.

Has anyone worked out how to build against the provided Arduino core and libraries, but using an external Makefile?
User avatar
By igrr
#19069 Unfortunately I don't have a Makefile ready. You may take a look at platform.txt — this file has all the build steps defined. Some parameters used for the build (like linker script) are defined in boards.txt. Let me know if you run into any specific issues creating such a Makefile.
User avatar
By brettanomyces
#19489 Rather than creating a make file you could try using the Arduino IDE command line tool. I've not yet used it for the esp8266 (still waiting for them to arrive in the mail) but I do use it for building and uploading my Arduino projects.

Code: Select all/Applications/Arduino.app/Contents/MacOS/Arduino --verify --verbose /path/to/ino/file \
  --pref build.path=/path/to/build/dir \
  --pref sketchbook.path=/path/to/project/dir \


There are a few issues with it however, I've found it needs full paths and the sketchbook.path needs to be set in the Arduino IDE preferences as well.
User avatar
By xxcn
#19566 brettanomyces, that's what I'm using now:

Code: Select allSERIAL_PORT ?= /dev/tty.nodemcu
SERIAL_BAUD ?= 115200

ARDUINO_BIN ?= ~/src/esp/Arduino/build/linux/work/arduino

TARGET = SketchNameHere

arduino:
   $(ARDUINO_BIN) -v --upload --board esp8266com:esp8266:nodemcu \
      --port $(SERIAL_PORT) --preserve-temp-files \
      --pref build.path=build \
      --pref target_package=esp8266com \
      --pref target_platform=esp8266 \
      --pref board=nodemcu \
      $(TARGET).ino


However, I could not figure out all the preferences (or the correct values thereof) to put on the command line so that settings chosen in the GUI don't affect the makefile build.