From d67f7a1fd46cde581c37928ef47ad2413263f7e7 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 11 Oct 2023 20:36:08 +0200 Subject: tighten makefile --- Makefile | 50 ++++++++++++++------------------------------------ 1 file changed, 14 insertions(+), 36 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 16bf0d2..8dfd366 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,11 @@ +PROJECT = main.ino BUILD_DIR = $(CURDIR)/.build -OPTS_HARDWARE = -hardware /usr/share/arduino/hardware -hardware /home/jonas/.arduino15/packages -OPTS_TOOLS = -tools /usr/share/arduino/hardware/tools/avr -tools /home/jonas/.arduino15/packages -OPTS_LIBS = -libraries /home/jonas/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 +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 @@ -11,32 +13,9 @@ 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 $(CURDIR)/.cache \ - -prefs=build.warn_data_percentage=75 \ - -prefs=runtime.tools.riscv32-esp-elf-gcc.path=/home/jonas/.arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0 \ - -prefs=runtime.tools.riscv32-esp-elf-gcc-esp-2021r2-patch5-8.4.0.path=/home/jonas/.arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0 \ - -prefs=runtime.tools.esptool_py.path=/home/jonas/.arduino15/packages/esp32/tools/esptool_py/4.5.1 \ - -prefs=runtime.tools.esptool_py-4.5.1.path=/home/jonas/.arduino15/packages/esp32/tools/esptool_py/4.5.1 \ - -prefs=runtime.tools.mkspiffs.path=/home/jonas/.arduino15/packages/esp32/tools/mkspiffs/0.2.3 \ - -prefs=runtime.tools.mkspiffs-0.2.3.path=/home/jonas/.arduino15/packages/esp32/tools/mkspiffs/0.2.3 \ - -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0 \ - -prefs=runtime.tools.xtensa-esp32-elf-gcc-esp-2021r2-patch5-8.4.0.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0 \ - -prefs=runtime.tools.xtensa-esp32s3-elf-gcc.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-2021r2-patch5-8.4.0 \ - -prefs=runtime.tools.xtensa-esp32s3-elf-gcc-esp-2021r2-patch5-8.4.0.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-2021r2-patch5-8.4.0 \ - -prefs=runtime.tools.xtensa-esp-elf-gdb.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp-elf-gdb/11.2_20220823 \ - -prefs=runtime.tools.xtensa-esp-elf-gdb-11.2_20220823.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp-elf-gdb/11.2_20220823 \ - -prefs=runtime.tools.riscv32-esp-elf-gdb.path=/home/jonas/.arduino15/packages/esp32/tools/riscv32-esp-elf-gdb/11.2_20220823 \ - -prefs=runtime.tools.riscv32-esp-elf-gdb-11.2_20220823.path=/home/jonas/.arduino15/packages/esp32/tools/riscv32-esp-elf-gdb/11.2_20220823 \ - -prefs=runtime.tools.dfu-util.path=/home/jonas/.arduino15/packages/arduino/tools/dfu-util/0.11.0-arduino5 \ - -prefs=runtime.tools.dfu-util-0.11.0-arduino5.path=/home/jonas/.arduino15/packages/arduino/tools/dfu-util/0.11.0-arduino5 \ - -prefs=runtime.tools.xtensa-esp32s2-elf-gcc.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp32s2-elf-gcc/esp-2021r2-patch5-8.4.0 \ - -prefs=runtime.tools.xtensa-esp32s2-elf-gcc-esp-2021r2-patch5-8.4.0.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp32s2-elf-gcc/esp-2021r2-patch5-8.4.0 \ - -prefs=runtime.tools.mklittlefs.path=/home/jonas/.arduino15/packages/esp32/tools/mklittlefs/3.0.0-gnu12-dc7f933 \ - -prefs=runtime.tools.mklittlefs-3.0.0-gnu12-dc7f933.path=/home/jonas/.arduino15/packages/esp32/tools/mklittlefs/3.0.0-gnu12-dc7f933 \ - -prefs=runtime.tools.openocd-esp32.path=/home/jonas/.arduino15/packages/esp32/tools/openocd-esp32/v0.12.0-esp32-20230419 \ - -prefs=runtime.tools.openocd-esp32-v0.12.0-esp32-20230419.path=/home/jonas/.arduino15/packages/esp32/tools/openocd-esp32/v0.12.0-esp32-20230419 \ + -ide-version=10819 -build-path $(BUILD_DIR) -warnings=none -build-cache ~/.cache \ -verbose \ - $(CURDIR)/main.ino + $(PROJECT) clean: rm -rf .build @@ -44,15 +23,14 @@ clean: distclean: clean rm -rf .cache -#arduino-builder -compile -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/jonas/.arduino15/packages -tools /usr/share/arduino/hardware/tools/avr -tools /home/jonas/.arduino15/packages -libraries /home/jonas/Arduino/libraries -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 -vid-pid=10C4_EA60 -ide-version=10819 -build-path /tmp/arduino_build_48694 -warnings=none -build-cache /tmp/arduino_cache_282410 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.riscv32-esp-elf-gcc.path=/home/jonas/.arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0 -prefs=runtime.tools.riscv32-esp-elf-gcc-esp-2021r2-patch5-8.4.0.path=/home/jonas/.arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/esp-2021r2-patch5-8.4.0 -prefs=runtime.tools.esptool_py.path=/home/jonas/.arduino15/packages/esp32/tools/esptool_py/4.5.1 -prefs=runtime.tools.esptool_py-4.5.1.path=/home/jonas/.arduino15/packages/esp32/tools/esptool_py/4.5.1 -prefs=runtime.tools.mkspiffs.path=/home/jonas/.arduino15/packages/esp32/tools/mkspiffs/0.2.3 -prefs=runtime.tools.mkspiffs-0.2.3.path=/home/jonas/.arduino15/packages/esp32/tools/mkspiffs/0.2.3 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc-esp-2021r2-patch5-8.4.0.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0 -prefs=runtime.tools.xtensa-esp32s3-elf-gcc.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-2021r2-patch5-8.4.0 -prefs=runtime.tools.xtensa-esp32s3-elf-gcc-esp-2021r2-patch5-8.4.0.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp32s3-elf-gcc/esp-2021r2-patch5-8.4.0 -prefs=runtime.tools.xtensa-esp-elf-gdb.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp-elf-gdb/11.2_20220823 -prefs=runtime.tools.xtensa-esp-elf-gdb-11.2_20220823.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp-elf-gdb/11.2_20220823 -prefs=runtime.tools.riscv32-esp-elf-gdb.path=/home/jonas/.arduino15/packages/esp32/tools/riscv32-esp-elf-gdb/11.2_20220823 -prefs=runtime.tools.riscv32-esp-elf-gdb-11.2_20220823.path=/home/jonas/.arduino15/packages/esp32/tools/riscv32-esp-elf-gdb/11.2_20220823 -prefs=runtime.tools.dfu-util.path=/home/jonas/.arduino15/packages/arduino/tools/dfu-util/0.11.0-arduino5 -prefs=runtime.tools.dfu-util-0.11.0-arduino5.path=/home/jonas/.arduino15/packages/arduino/tools/dfu-util/0.11.0-arduino5 -prefs=runtime.tools.xtensa-esp32s2-elf-gcc.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp32s2-elf-gcc/esp-2021r2-patch5-8.4.0 -prefs=runtime.tools.xtensa-esp32s2-elf-gcc-esp-2021r2-patch5-8.4.0.path=/home/jonas/.arduino15/packages/esp32/tools/xtensa-esp32s2-elf-gcc/esp-2021r2-patch5-8.4.0 -prefs=runtime.tools.mklittlefs.path=/home/jonas/.arduino15/packages/esp32/tools/mklittlefs/3.0.0-gnu12-dc7f933 -prefs=runtime.tools.mklittlefs-3.0.0-gnu12-dc7f933.path=/home/jonas/.arduino15/packages/esp32/tools/mklittlefs/3.0.0-gnu12-dc7f933 -prefs=runtime.tools.openocd-esp32.path=/home/jonas/.arduino15/packages/esp32/tools/openocd-esp32/v0.12.0-esp32-20230419 -prefs=runtime.tools.openocd-esp32-v0.12.0-esp32-20230419.path=/home/jonas/.arduino15/packages/esp32/tools/openocd-esp32/v0.12.0-esp32-20230419 -verbose /home/jonas/Arduino/sketch_oct06b/sketch_oct06b.ino - +.NOTPARALLEL: upload: - python3 /home/jonas/.arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool.py \ + 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_DIR)/main.ino.bootloader.bin \ - 0x8000 $(BUILD_DIR)/main.ino.partitions.bin \ - 0xe000 /home/jonas/.arduino15/packages/esp32/hardware/esp32/2.0.14/tools/partitions/boot_app0.bin \ - 0x10000 $(BUILD_DIR)/main.ino.bin + 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 -- cgit v1.2.3