Skip to content

Commit a33a027

Browse files
committed
The command line compile process uses busybox on windows systems.
Just busybox and a make binary is enough now, no need for a full set of msys2 tools anymore.
1 parent 386607d commit a33a027

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

sduino/Arduino.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,10 @@ ifneq (,$(findstring AVR,$(shell $(SIZE) --help)))
11361136
# and the elf to get nice output.
11371137
avr_size = $(SIZE) $(SIZEFLAGS) --format=avr $(1)
11381138
$(call show_config_info,Size utility: AVR-aware for enhanced output,[AUTODETECTED])
1139+
else ifneq (,$(findstring map,$(shell $(SIZE) --help)))
1140+
# We have a script for SDCC. pass it the map file instead of the hex file
1141+
avr_size = $(SIZE) $(2:ihx=map)
1142+
$(call show_config_info,Size utility: SDCC compatible script,[AUTODETECTED])
11391143
else
11401144
# We have a plain-old binutils version - just give it the hex.
11411145
avr_size = $(SIZE) $(2)

sduino/sduino.mk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ ifeq ($(OS),Windows_NT)
6565
# for Windows always assume the tools to be in this dir tree
6666
SDCC_PATH := $(ARDUINO_DIR)/hardware/sduino/tools/sdcc/bin
6767
endif
68-
# SHELL := $(ARDUINO_DIR)/hardware/sduino/tools/win/dash
69-
SHELL := dash
68+
SHELL := $(ARDUINO_DIR)/hardware/sduino/tools/win/busybox.exe
69+
.SHELLFLAGS=ash -c
70+
SIZE := $(ARDUINO_DIR)/hardware/sduino/tools/wrapper/sdsize.sh
7071
# PATH := $(realpath $(ARDUINO_DIR)/hardware/sduino/tools/win):$(PATH)
7172
else
7273
# Linux (and Mac): expect SDCC to be in /opt/sdcc
@@ -81,7 +82,7 @@ OVERRIDE_EXECUTABLES=yes
8182
CC = $(SDCC_PATH)/sdcc
8283
AS = $(SDCC_PATH)/sdasstm8
8384
AR = $(SDCC_PATH)/sdar
84-
SIZE = /usr/bin/size
85+
SIZE ?= /usr/bin/size
8586

8687

8788
ARDUINO_SKETCHBOOK = /tmp # temporarly, to prevent usage of the real libs

0 commit comments

Comments
 (0)