Skip to content

Commit 5aae157

Browse files
hydratridge
authored andcommitted
Add support for building on Windows using MSYS2/UCRT64.
1 parent de006d5 commit 5aae157

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,17 @@ all : check_tools bootloaders
6767

6868
# Check if tools are installed
6969
check_tools:
70+
ifeq ($(MSYSTEM),UCRT64)
71+
@$(SHELL) -c 'command -v $(CC) >/dev/null 2>&1 || { echo "Error: please install tools first with target arm_sdk_install."; exit 1; }'
72+
else
7073
ifeq ($(OS),Windows_NT)
7174
@if not exist "$(CC).exe" ( \
7275
echo Error: please install tools first with target arm_sdk_install. & exit /B 1 \
7376
)
7477
else
7578
@$(SHELL) -c 'command -v $(CC) >/dev/null 2>&1 || { echo "Error: please install tools first with target arm_sdk_install."; exit 1; }'
7679
endif
80+
endif
7781

7882
clean :
7983
@echo Removing $(OBJ) directory

make/tools.mk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
#
55
###############################################################
66

7+
ifeq ($(MSYSTEM),UCRT64)
8+
OSDIR:=windows
9+
ARM_SDK_PREFIX:=tools/windows/xpack-arm-none-eabi-gcc-10.3.1-2.3/bin/arm-none-eabi-
10+
CP:=cp
11+
DSEP:=/
12+
NUL:=/dev/null
13+
MKDIR:=mkdir
14+
RM:=rm
15+
CUT:=cut
16+
FGREP:=fgrep
17+
else
718

819
ifeq ($(OS),Windows_NT)
920
OSDIR:=windows
@@ -45,6 +56,7 @@ CUT:=cut
4556
FGREP:=fgrep
4657
endif
4758
endif
59+
endif
4860

4961
# workaround for lack of a lowercase function in GNU make
5062
# look away before this sends you blind ....

0 commit comments

Comments
 (0)