Changeset 214 for rtos_arduino


Ignore:
Timestamp:
Apr 2, 2016, 3:00:05 PM (8 years ago)
Author:
ertl-yutaka
Message:

MacOS対応.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtos_arduino/trunk/asp_1.9.2/target/arduino_m0_gcc/Makefile.target

    r185 r214  
    2020
    2121#
    22 # Arduinoの開発環境のパス(Windows表記)
     22#  ç’°å¢ƒã®åˆ¤å®š
    2323#
    24 ARDUINO_BASE_DIR_WIN = C:\Program Files (x86)\Arduino
     24ifneq (,$(findstring /cygdrive/,$(PATH)))
     25    UNAME_TARGET := Cygwin
     26    ARDUINO_BASE_DIR = C:\Program Files (x86)\Arduino
     27else
     28ifneq (,$(findstring Windows,$(PATH)))
     29    UNAME_TARGET := Windows
     30    ARDUINO_BASE_DIR = C:\Program Files (x86)\Arduino
     31else
     32    UNAME_TARGET := MacOS
     33    ARDUINO_BASE_DIR = /Applications/Arduino.app/Contents/Java
     34endif
     35endif
    2536
    2637#
     
    3243# ライブラリを使用する
    3344#
    34 ARDUINO_LIB_DIR = $(ARDUINO_BASE_DIR_WIN)
     45ARDUINO_LIB_DIR = $(ARDUINO_BASE_DIR)
    3546endif
    3647
     
    128139include $(SRCDIR)/arch/$(PRC)_$(TOOL)/common/Makefile.core
    129140
    130 
    131 #
    132 #  環境の判定
    133 #
    134 ifneq (,$(findstring /cygdrive/,$(PATH)))
    135     UNAME_TARGET := Cygwin
    136 else
    137 ifneq (,$(findstring Windows,$(PATH)))
    138     UNAME_TARGET := Windows
    139 else
    140     UNAME_TARGET := Unix
    141 endif
    142 endif
    143 
    144 
    145141#
    146142#  フラッシュへの書き込み
    147143#
    148 OPENOCD_PATH = $(ARDUINO_BASE_DIR_WIN)\hardware\tools\OpenOCD-0.9.0-arduino\bin\openocd.exe
    149 OPENOCD_SCRIPT_PATH = $(ARDUINO_BASE_DIR_WIN)\hardware\tools\OpenOCD-0.9.0-arduino\share\openocd\scripts
    150 OPENOCD_SCRIPT  = $(ARDUINO_BASE_DIR_WIN)\hardware\arduino\samd\variants\arduino_zero\openocd_scripts\arduino_zero.cfg
     144ifeq ($(UNAME_TARGET), Cygwin)
     145     OPENOCD_PATH = $(ARDUINO_BASE_DIR)\hardware\tools\OpenOCD-0.9.0-arduino\bin\openocd.exe
     146     OPENOCD_SCRIPT_PATH = $(ARDUINO_BASE_DIR)\hardware\tools\OpenOCD-0.9.0-arduino\share\openocd\scripts
     147     OPENOCD_SCRIPT  = $(ARDUINO_BASE_DIR)\hardware\arduino\samd\variants\arduino_zero\openocd_scripts\arduino_zero.cfg
     148endif
     149ifeq ($(UNAME_TARGET), MacOS)
     150     OPENOCD_PATH = $(ARDUINO_BASE_DIR)/hardware/tools/OpenOCD-0.9.0-arduino/bin/openocd
     151     OPENOCD_SCRIPT_PATH = $(ARDUINO_BASE_DIR)/hardware/tools/OpenOCD-0.9.0-arduino/share/openocd/scripts
     152     OPENOCD_SCRIPT  = $(ARDUINO_BASE_DIR)/hardware/arduino/samd/variants/arduino_zero/openocd_scripts/arduino_zero.cfg
     153endif
    151154
    152155ifeq ($(UNAME_TARGET), Cygwin)
    153156        GDB = arm-gdb_m0.exe
    154157else
    155         GDB = $(ARDUINO_BASE_DIR_WIN)\hardware\tools\gcc-arm-none-eabi-4.8.3-2014q1\bin\arm-none-eabi-gdb
     158ifeq ($(UNAME_TARGET), MacOS)
     159        GDB = $(ARDUINO_BASE_DIR)/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/arm-none-eabi-gdb
     160endif
    156161endif
    157162
     
    167172        cygstart "$(OPENOCD_PATH)" '-s "$(OPENOCD_SCRIPT_PATH)"' '-f "$(OPENOCD_SCRIPT)"'
    168173else
     174ifeq ($(UNAME_TARGET), Windows)
    169175        start /MIN "" "$(OPENOCD_PATH)" -s "$(OPENOCD_SCRIPT_PATH)" -f "$(OPENOCD_SCRIPT)"
     176else
     177ifeq ($(UNAME_TARGET), MacOS)
     178        $(OPENOCD_PATH) -s "$(OPENOCD_SCRIPT_PATH)" -f "$(OPENOCD_SCRIPT)"
     179endif
     180endif
    170181endif
    171182
Note: See TracChangeset for help on using the changeset viewer.