11
22MCU_FLAG_NAME = mstm8 -D
33
4- # ALTERNATE_CORE = sduino
5- # ARDUINO_VAR_PATH = ../../sduino
6- # ARDUINO_CORE_PATH = ../../sduino
7-
84
95all :
106
@@ -63,17 +59,19 @@ endif
6359ifeq ($(OS ) ,Windows_NT)
6460 ifndef SDCC_PATH
6561 # for Windows always assume the tools to be in this dir tree
66- SDCC_PATH := $(ARDUINO_DIR ) /hardware/sduino/tools/sdcc/bin
62+ SDCC_PATH := $(ARDUINO_DIR ) /../tools/sdcc/bin
63+ AVR_TOOLS_DIR = $(ARDUINO_DIR)/../tools/sdcc
6764 endif
68- SHELL := $(ARDUINO_DIR ) /hardware/sduino /tools/win/busybox.exe
65+ SHELL := $(ARDUINO_DIR ) /.. /tools/win/busybox.exe
6966 .SHELLFLAGS =ash -c
70- SIZE := $(ARDUINO_DIR ) /hardware/sduino /tools/wrapper/sdsize.sh
71- # PATH := $(realpath $(ARDUINO_DIR)/hardware/sduino /tools/win):$(PATH)
67+ SIZE := $(ARDUINO_DIR ) /.. /tools/wrapper/sdsize.sh
68+ # PATH := $(realpath $(ARDUINO_DIR)/.. /tools/win):$(PATH)
7269else
7370 # Linux (and Mac): expect SDCC to be in /opt/sdcc
7471 ifndef SDCC_PATH
7572 # for Windows always assume the tools to be in this dir tree
7673 SDCC_PATH := /opt/sdcc/bin
74+ AVR_TOOLS_DIR = /opt/sdcc
7775 endif
7876endif
7977
@@ -85,15 +83,21 @@ OVERRIDE_EXECUTABLES=yes
8583 SIZE ?= /usr/bin/size
8684
8785
86+ # avoid using the regular paths starting at $(ARDUINO_DIR)/hardware/$(VENDOR)
87+ # as our makefile is now part of the core archive
88+ ARDUINO_VERSION = 186
89+ ALTERNATE_CORE = sduino
90+ ALTERNATE_CORE_PATH = $(ARDUINO_DIR )
91+
8892ARDUINO_SKETCHBOOK = /tmp # temporarly, to prevent usage of the real libs
8993ARDMK_VENDOR = sduino
9094ARCHITECTURE = stm8
9195CPPFLAGS += -Ddouble=float -DUSE_STDINT \
92- -I. -I$(ARDUINO_DIR ) /hardware/sduino/stm8/ STM8S_StdPeriph_Driver/inc \
96+ -I. -I$(ARDUINO_DIR ) /STM8S_StdPeriph_Driver/inc \
9397 -I/opt/sdcc/share/sdcc/include/
9498# CFLAGS = -I ../STM8S_StdPeriph_Driver/inc
9599# LDFLAGS = --out-fmt-elf
96- LDFLAGS += -L $(ARDUINO_DIR ) /hardware/sduino/stm8/ STM8S_StdPeriph_Driver/lib -L/opt/sdcc/share/sdcc/lib/stm8
100+ LDFLAGS += -L $(ARDUINO_DIR ) /STM8S_StdPeriph_Driver/lib -L/opt/sdcc/share/sdcc/lib/stm8
97101
98102
99103
0 commit comments