Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions esp8266_firmware/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
CC = xtensa-lx106-elf-gcc
CFLAGS = -I. -mlongcalls -std=c99 -ffunction-sections -fdata-sections -Os -DICACHE_FLASH
LDLIBS = -nostdlib -Wl,--start-group -lmain -lnet80211 -lwpa -llwip -lpp -lphy -Wl,--end-group -lgcc
LDFLAGS = -Teagle.app.v6.ld -Wl,--gc-sections -flto -Wl,-Map,fw.map
ESPSDK = /Volumes/ESPtoolchain/esp-open-sdk/sdk
PORT = /dev/cu.usbserial-FTG4YM5W
CFLAGS = -I. -I$(ESPSDK)/include -mlongcalls -std=c99 -ffunction-sections -fdata-sections -Os -DICACHE_FLASH
LDLIBS = -nostdlib -L$(ESPSDK)/lib -Wl,--start-group -lmain -lnet80211 -lwpa -llwip -lpp -lphy -Wl,--end-group -lgcc
LDFLAGS = -T$(ESPSDK)/ld/eagle.app.v6.ld -Wl,--gc-sections -flto -Wl,-Map,fw.map

firmware-0x00000.bin: firmware
esptool.py elf2image $^
Expand All @@ -13,7 +15,7 @@ firmware: main.o uart.o httpd.o spi.o
$(CC) $(CFLAGS) -c -o $@ $<

flash: firmware-0x00000.bin
esptool.py write_flash 0 firmware-0x00000.bin 0x40000 firmware-0x40000.bin
esptool.py --port $(PORT) write_flash 0 firmware-0x00000.bin 0x40000 firmware-0x40000.bin

clean:
rm -f firmware main.o uart.o firmware-0x00000.bin firmware-0x400000.bin
Expand Down