Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

Commit

Permalink
- Update build scripts to support standard distribution from Launchpa…
Browse files Browse the repository at this point in the history
…d (ARM maintained)

- Fixed GCC targets and setenv_* to handle () in paths when tools are installed to default "Program FIles(x86)"
  • Loading branch information
smaillet-ms committed Jun 6, 2015
1 parent 1e9becf commit abf9d07
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
17 changes: 10 additions & 7 deletions setenv_base.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ GOTO :EOF
SET COMPILER_TOOL=%1
SET COMPILER_TOOL_VERSION_NUM=%2
SET COMPILER_TOOL_VERSION=%1%2
SET ARG3=%~3
SET "ARG3=%~3"

SET TFSCONFIG=MFConfig.xml

Expand Down Expand Up @@ -106,7 +106,10 @@ rem @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@echo setting vars for GCC compiler %COMPILER_TOOL_VERSION%

rem use a default for GCC
IF "%ARG3%"=="" SET ARG3=%SystemDrive%\gnu\gcc
IF "%ARG3%"=="" (
SET "ARG3=%SystemDrive%\gnu\gcc"
IF NOT EXIST "%ARG3%" set "ARG3=%ProgramFiles(x86)%\GNU Tools ARM Embedded\4.9 2015q1"
)
IF NOT EXIST "%ARG3%" GOTO :BAD_GCC_ARG

set ARMROOT=
Expand All @@ -119,13 +122,13 @@ set DOTNETMF_COMPILER=%COMPILER_TOOL_VERSION%

IF /I "%COMPILER_TOOL%"=="GCC" (
IF EXIST "%ARG3%\lib\gcc\arm-none-eabi\%GNU_VERSION%" (
set ARMINC=%ARG3%\lib\gcc\arm-none-eabi\%GNU_VERSION%\include
set ARMLIB=%ARG3%\lib\gcc\arm-none-eabi\%GNU_VERSION%
set GNU_TOOLS=%ARG3%
set GNU_TOOLS_BIN=%ARG3%\bin
set "ARMINC=%ARG3%\lib\gcc\arm-none-eabi\%GNU_VERSION%\include"
set "ARMLIB=%ARG3%\lib\gcc\arm-none-eabi\%GNU_VERSION%"
set "GNU_TOOLS=%ARG3%"
set "GNU_TOOLS_BIN=%ARG3%\bin"
set GNU_TARGET=arm-none-eabi
) ELSE (
@ECHO Could not find %ARG3%\lib\gcc\arm-none-eabi\%GNU_VERSION%
@ECHO Could not find "%ARG3%\lib\gcc\arm-none-eabi\%GNU_VERSION%"
GOTO :BAD_GCC_ARG
))

Expand Down
3 changes: 2 additions & 1 deletion setenv_gcc.cmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
@echo off

set "ARG2=%~2"
IF NOT "" == "%1" SET GCC_VER=%1
IF "" == "%GCC_VER%" GOTO :ARG_ERROR
IF NOT "" == "%2" SET GCC_TOOL_PATH=%2
IF NOT "" == "%ARG2%" SET "GCC_TOOL_PATH=%2"

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

Expand Down
3 changes: 1 addition & 2 deletions tools/Targets/Microsoft.Spot.system.gcc.targets
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@
<CC_CPP_COMMON_FLAGS Condition="'$(OS_PLATFORM)'=='true'">$(CC_CPP_COMMON_FLAGS) -DPLATFORM_ARM_OS_PORT</CC_CPP_COMMON_FLAGS>

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

<CC_CPP_COMMON_FLAGS>$(CC_CPP_COMMON_FLAGS) @(TinyCLR_Defines->'-D%(filename)',' ')</CC_CPP_COMMON_FLAGS>
Expand All @@ -190,7 +189,7 @@
<CC_CPP_INCS>$(CC_CPP_INCS) -I$(SPO_SDK)\CLR\Libraries\SPOT_Hardware</CC_CPP_INCS>
<CC_CPP_INCS>$(CC_CPP_INCS) -I$(SPO_SDK)\CLR\Libraries\SPOT_Graphics</CC_CPP_INCS>
<CC_CPP_INCS>$(CC_CPP_INCS) -I$(SPO_SDK)\CLR\Libraries\SPOT_Net</CC_CPP_INCS>
<CC_CPP_INCS>$(CC_CPP_INCS) -I$(ARMINC)</CC_CPP_INCS>
<CC_CPP_INCS>$(CC_CPP_INCS) -I"$(ARMINC)"</CC_CPP_INCS>
<CC_CPP_INCS>$(CC_CPP_INCS) @(IncludePaths->'-I$(CLRROOT)\%(relativedir)%(filename)',' ')</CC_CPP_INCS>
<CC_CPP_INCS>$(CC_CPP_INCS) @(DirectIncludePaths->'-I%(FullPath)',' ')</CC_CPP_INCS>

Expand Down

0 comments on commit abf9d07

Please # to comment.