From ba44ea44deca4db378d40bf3b4535840d8ce4832 Mon Sep 17 00:00:00 2001 From: Baciu Vlad-Eusebiu Date: Tue, 12 Dec 2023 01:12:54 +0200 Subject: [PATCH] Update Teensy.mk --- Teensy.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Teensy.mk b/Teensy.mk index 6d58a54..fd3b148 100644 --- a/Teensy.mk +++ b/Teensy.mk @@ -38,8 +38,13 @@ ARDUINO_CORE_PATH = $(ARDUINO_DIR)/hardware/teensy/avr/cores/teensy3 BOARDS_TXT = $(ARDUINO_DIR)/hardware/$(ARDMK_VENDOR)/avr/boards.txt # get hex path from the build directory. if path is cygwin based (cygdrive/path/example/), just discard cygwin root when calling Windows-native applications -UNAME := $(shell uname) -HEX_PATH := $(if $(findstring CYGWIN,$(UNAME)),$(subst cygdrive/,,$(OBJDIR)),$(OBJDIR)) +ifeq ($(shell uname | grep -c "CYGWIN"), 1) + HEX_PATH = $(shell cygpath -w $(abspath $(OBJDIR))) + HEX_PATH := $(subst \,/, $(HEX_PATH)) +else + # Default for non-Cygwin environments + HEX_PATH = $(abspath $(OBJDIR)) +endif ifndef F_CPU ifndef BOARD_SUB