Skip to content

Commit abf9d07

Browse files
committed
- Update build scripts to support standard distribution from Launchpad (ARM maintained)
- Fixed GCC targets and setenv_* to handle () in paths when tools are installed to default "Program FIles(x86)"
1 parent 1e9becf commit abf9d07

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

setenv_base.cmd

+10-7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ GOTO :EOF
2525
SET COMPILER_TOOL=%1
2626
SET COMPILER_TOOL_VERSION_NUM=%2
2727
SET COMPILER_TOOL_VERSION=%1%2
28-
SET ARG3=%~3
28+
SET "ARG3=%~3"
2929

3030
SET TFSCONFIG=MFConfig.xml
3131

@@ -106,7 +106,10 @@ rem @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
106106
@echo setting vars for GCC compiler %COMPILER_TOOL_VERSION%
107107

108108
rem use a default for GCC
109-
IF "%ARG3%"=="" SET ARG3=%SystemDrive%\gnu\gcc
109+
IF "%ARG3%"=="" (
110+
SET "ARG3=%SystemDrive%\gnu\gcc"
111+
IF NOT EXIST "%ARG3%" set "ARG3=%ProgramFiles(x86)%\GNU Tools ARM Embedded\4.9 2015q1"
112+
)
110113
IF NOT EXIST "%ARG3%" GOTO :BAD_GCC_ARG
111114

112115
set ARMROOT=
@@ -119,13 +122,13 @@ set DOTNETMF_COMPILER=%COMPILER_TOOL_VERSION%
119122

120123
IF /I "%COMPILER_TOOL%"=="GCC" (
121124
IF EXIST "%ARG3%\lib\gcc\arm-none-eabi\%GNU_VERSION%" (
122-
set ARMINC=%ARG3%\lib\gcc\arm-none-eabi\%GNU_VERSION%\include
123-
set ARMLIB=%ARG3%\lib\gcc\arm-none-eabi\%GNU_VERSION%
124-
set GNU_TOOLS=%ARG3%
125-
set GNU_TOOLS_BIN=%ARG3%\bin
125+
set "ARMINC=%ARG3%\lib\gcc\arm-none-eabi\%GNU_VERSION%\include"
126+
set "ARMLIB=%ARG3%\lib\gcc\arm-none-eabi\%GNU_VERSION%"
127+
set "GNU_TOOLS=%ARG3%"
128+
set "GNU_TOOLS_BIN=%ARG3%\bin"
126129
set GNU_TARGET=arm-none-eabi
127130
) ELSE (
128-
@ECHO Could not find %ARG3%\lib\gcc\arm-none-eabi\%GNU_VERSION%
131+
@ECHO Could not find "%ARG3%\lib\gcc\arm-none-eabi\%GNU_VERSION%"
129132
GOTO :BAD_GCC_ARG
130133
))
131134

setenv_gcc.cmd

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
@echo off
22

3+
set "ARG2=%~2"
34
IF NOT "" == "%1" SET GCC_VER=%1
45
IF "" == "%GCC_VER%" GOTO :ARG_ERROR
5-
IF NOT "" == "%2" SET GCC_TOOL_PATH=%2
6+
IF NOT "" == "%ARG2%" SET "GCC_TOOL_PATH=%2"
67

78
%~dp0\setenv_base.cmd GCC %GCC_VER% %GCC_TOOL_PATH% %3 %4 %5
89

tools/Targets/Microsoft.Spot.system.gcc.targets

+1-2
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@
172172
<CC_CPP_COMMON_FLAGS Condition="'$(OS_PLATFORM)'=='true'">$(CC_CPP_COMMON_FLAGS) -DPLATFORM_ARM_OS_PORT</CC_CPP_COMMON_FLAGS>
173173

174174
<CC_CPP_COMMON_FLAGS Condition="'$(COMPILER_TOOL)'=='GCC'" >$(CC_CPP_COMMON_FLAGS) -DGCC </CC_CPP_COMMON_FLAGS>
175-
<CC_CPP_COMMON_FLAGS Condition="'$(COMPILER_TOOL)'=='GCCOP'" >$(CC_CPP_COMMON_FLAGS) -DGCCOP -D__ELIPS_COMPONENT_GENERATE_=true </CC_CPP_COMMON_FLAGS>
176175
<CC_CPP_COMMON_FLAGS Condition="'$(COMPILER_TOOL_VERSION_NUM)'&lt;'4.4'" >$(CC_CPP_COMMON_FLAGS) -DGCC_OLD_ARG_LIST </CC_CPP_COMMON_FLAGS>
177176

178177
<CC_CPP_COMMON_FLAGS>$(CC_CPP_COMMON_FLAGS) @(TinyCLR_Defines->'-D%(filename)',' ')</CC_CPP_COMMON_FLAGS>
@@ -190,7 +189,7 @@
190189
<CC_CPP_INCS>$(CC_CPP_INCS) -I$(SPO_SDK)\CLR\Libraries\SPOT_Hardware</CC_CPP_INCS>
191190
<CC_CPP_INCS>$(CC_CPP_INCS) -I$(SPO_SDK)\CLR\Libraries\SPOT_Graphics</CC_CPP_INCS>
192191
<CC_CPP_INCS>$(CC_CPP_INCS) -I$(SPO_SDK)\CLR\Libraries\SPOT_Net</CC_CPP_INCS>
193-
<CC_CPP_INCS>$(CC_CPP_INCS) -I$(ARMINC)</CC_CPP_INCS>
192+
<CC_CPP_INCS>$(CC_CPP_INCS) -I"$(ARMINC)"</CC_CPP_INCS>
194193
<CC_CPP_INCS>$(CC_CPP_INCS) @(IncludePaths->'-I$(CLRROOT)\%(relativedir)%(filename)',' ')</CC_CPP_INCS>
195194
<CC_CPP_INCS>$(CC_CPP_INCS) @(DirectIncludePaths->'-I%(FullPath)',' ')</CC_CPP_INCS>
196195

0 commit comments

Comments
 (0)