-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·44 lines (34 loc) · 1.09 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
PROGRAM=EtsySoldOrdersCounter
PROGRAM_SRC_DIR=./src
SERIAL_PORT=/dev/ttyUSB0
SERIAL_BAUD=115200
ESPPORT=$(SERIAL_PORT)
ESPBAUD=$(SERIAL_BAUD)
ESPTOOL_ARGS+=-fs 4MB
# EXTRA_CFLAGS+=-I./lib/esp-gdbstub/include
# EXTRA_LDFLAGS+=-L./lib/esp-gdbstub/lib
EXTRA_COMPONENTS = extras/dhcpserver $(abspath ../esp-homekit-demo/components/esp8266-open-rtos/wifi_config) extras/mbedtls extras/http-parser extras/jsmn extras/max7219
include ./lib/esp-open-rtos/common.mk
# LIBS+=esp-gdbstub
# PROGRAM_CFLAGS+=-O0
# Utility targets
.PHONY: dev bootstrap monitor
# Step in to containerized development environment (includes necessary dependencies)
DOCKER_IMG := bschwind/esp-open-rtos
dev:
docker run \
--rm \
-it \
--privileged \
--env SKIP_DOCKER=true \
--device=$(SERIAL_PORT) \
--volume /dev/bus/usb:/dev/bus/usb \
--volume $(PWD):/home/esp/esp-open-rtos/examples/project \
$(DOCKER_IMG) \
/bin/bash
bootstrap:
git submodule update --init --recursive
monitor:
picocom -b $(SERIAL_BAUD) $(SERIAL_PORT)
debug:
xtensa-lx106-elf-gdb -x gdbinit -ex 'target remote $(SERIAL_PORT)' build/$(PROGRAM).out