blob: ccfe14a8d71111d90d878fa780c2caac59390a58 (
plain)
- PROJECT = src.ino
- SOURCE_DIR = src
- BUILD_DIR = $(CURDIR)/.build
- OPTS_HARDWARE = -hardware /usr/share/arduino/hardware -hardware ~/.arduino15/packages
- OPTS_TOOLS = -tools /usr/share/arduino/hardware/tools/avr -tools ~/.arduino15/packages
- OPTS_LIBS = -libraries ~/Arduino/libraries
- #FQBN = -fqbn=esp32:esp32:esp32:JTAGAdapter=default,PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,LoopCore=1,EventsCore=1,DebugLevel=none,EraseFlash=none
- FQBN = -fqbn=esp32:esp32:esp32
- all: build upload
- build:
- mkdir --parents .build .cache
- arduino-builder -compile -logger=machine \
- $(OPTS_HARDWARE) $(OPTS_TOOLS) $(OPTS_LIBS) $(FQBN) \
- -ide-version=10819 -build-path $(BUILD_DIR) -warnings=none -build-cache ~/.cache \
- -verbose \
- $(SOURCE_DIR)/$(PROJECT)
- clean:
- rm -rf .build
- distclean: clean
- rm -rf .cache
- .NOTPARALLEL:
- upload:
- python3 ~/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool.py \
- --chip esp32 --port /dev/ttyUSB0 --baud 921600 \
- --before default_reset --after hard_reset write_flash \
- -z --flash_mode dio --flash_freq 80m --flash_size 4MB \
- 0x1000 .build/$(PROJECT).bootloader.bin \
- 0x8000 .build/$(PROJECT).partitions.bin \
- 0xe000 ~/.arduino15/packages/esp32/hardware/esp32/2.0.14/tools/partitions/boot_app0.bin \
- 0x10000 .build/$(PROJECT).bin
|