Advertisement
Guest User

ESP8266 Makefile

a guest
Nov 7th, 2016
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 1.12 KB | None | 0 0
  1. # base directory for the compiler
  2. XTENSA_TOOLS_ROOT ?= /Volumes/case-sensitive/esp-open-sdk/xtensa-lx106-elf/bin
  3.  
  4. # base directory of the ESP8266 SDK package, absolute
  5. SDK_BASE    ?= /Volumes/case-sensitive/esp-open-sdk/ESP8266_NONOS_SDK_V1.5.4_16_05_20
  6.  
  7. CC      := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
  8. CXX     := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-g++
  9. AR      := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-ar
  10. LD      := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-gcc
  11.  
  12. # esptool.py path and port
  13. ESPTOOL     ?= /Volumes/case-sensitive/esp-open-sdk/xtensa-lx106-elf/bin/esptool.py
  14. ESPPORT     ?= /dev/cu.usbserial-AH03LOFU
  15.  
  16. # name for the target project
  17. TARGET      = client
  18.  
  19. CFLAGS = -I. -mlongcalls
  20. LDLIBS = -nostdlib -Wl,--start-group -lmain -lnet80211 -lwpa -llwip -lpp -lphy -Wl,--end-group -lgcc
  21. LDFLAGS = -Teagle.app.v6.ld
  22.  
  23.  
  24. $(TARGET)-0x00000.bin: $(TARGET)
  25.     $(ESPTOOL) elf2image $^
  26.  
  27. $(TARGET): station.o $(TARGET).o
  28.  
  29. $(TARGET).o: *.c
  30.  
  31. flash:
  32.     $(ESPTOOL) --port $(ESPPORT) write_flash 0x00000 $(TARGET)-0x00000.bin 0x40000 $(TARGET)-0x40000.bin
  33.  
  34. clean:
  35.     rm -f $(TARGET) $(TARGET).o $(TARGET)-0x00000.bin $(TARGET)-0x40000.bin station.o
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement