mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #3287 from sg-/make-build
Unify output directory for mbed-cli and exporterspull/3150/merge
commit
e07fcda4d0
|
@ -14,7 +14,7 @@ class Eclipse(Makefile):
|
||||||
super(Eclipse, self).generate()
|
super(Eclipse, self).generate()
|
||||||
ctx = {
|
ctx = {
|
||||||
'name': self.project_name,
|
'name': self.project_name,
|
||||||
'elf_location': join('.build',self.project_name)+'.elf',
|
'elf_location': join('BUILD',self.project_name)+'.elf',
|
||||||
'c_symbols': self.toolchain.get_symbols(),
|
'c_symbols': self.toolchain.get_symbols(),
|
||||||
'asm_symbols': self.toolchain.get_symbols(True),
|
'asm_symbols': self.toolchain.get_symbols(True),
|
||||||
'target': self.target,
|
'target': self.target,
|
||||||
|
|
|
@ -165,8 +165,11 @@ class IAR(Exporter):
|
||||||
os.remove(project_name + ".ewp")
|
os.remove(project_name + ".ewp")
|
||||||
os.remove(project_name + ".ewd")
|
os.remove(project_name + ".ewd")
|
||||||
os.remove(project_name + ".eww")
|
os.remove(project_name + ".eww")
|
||||||
|
# legacy output file location
|
||||||
if exists('.build'):
|
if exists('.build'):
|
||||||
shutil.rmtree('.build')
|
shutil.rmtree('.build')
|
||||||
|
if exists('BUILD'):
|
||||||
|
shutil.rmtree('BUILD')
|
||||||
|
|
||||||
if ret_code !=0:
|
if ret_code !=0:
|
||||||
# Seems like something went wrong.
|
# Seems like something went wrong.
|
||||||
|
|
|
@ -20,15 +20,15 @@
|
||||||
</option>
|
</option>
|
||||||
<option>
|
<option>
|
||||||
<name>ExePath</name>
|
<name>ExePath</name>
|
||||||
<state>$PROJ_DIR$\.build\Exe</state>
|
<state>$PROJ_DIR$\BUILD\Exe</state>
|
||||||
</option>
|
</option>
|
||||||
<option>
|
<option>
|
||||||
<name>ObjPath</name>
|
<name>ObjPath</name>
|
||||||
<state>$PROJ_DIR$\.build\Obj</state>
|
<state>$PROJ_DIR$\BUILD\Obj</state>
|
||||||
</option>
|
</option>
|
||||||
<option>
|
<option>
|
||||||
<name>ListPath</name>
|
<name>ListPath</name>
|
||||||
<state>$PROJ_DIR$\.build\List</state>
|
<state>$PROJ_DIR$\BUILD\List</state>
|
||||||
</option>
|
</option>
|
||||||
<option>
|
<option>
|
||||||
<name>Variant</name>
|
<name>Variant</name>
|
||||||
|
|
|
@ -16,15 +16,15 @@
|
||||||
<wantNonLocal>1</wantNonLocal>
|
<wantNonLocal>1</wantNonLocal>
|
||||||
<debug>1</debug>
|
<debug>1</debug>
|
||||||
<option>
|
<option>
|
||||||
<state>$PROJ_DIR$\.build\iar_arm\Exe</state>
|
<state>$PROJ_DIR$\BUILD\Exe</state>
|
||||||
<name>ExePath</name>
|
<name>ExePath</name>
|
||||||
</option>
|
</option>
|
||||||
<option>
|
<option>
|
||||||
<state>$PROJ_DIR$\.build\iar_arm\Obj</state>
|
<state>$PROJ_DIR$\BUILD\Obj</state>
|
||||||
<name>ObjPath</name>
|
<name>ObjPath</name>
|
||||||
</option>
|
</option>
|
||||||
<option>
|
<option>
|
||||||
<state>$PROJ_DIR$\.build\iar_arm\List</state>
|
<state>$PROJ_DIR$\BUILD\List</state>
|
||||||
<name>ListPath</name>
|
<name>ListPath</name>
|
||||||
</option>
|
</option>
|
||||||
<option>
|
<option>
|
||||||
|
|
|
@ -16,15 +16,15 @@
|
||||||
<wantNonLocal>1</wantNonLocal>
|
<wantNonLocal>1</wantNonLocal>
|
||||||
<debug>1</debug>
|
<debug>1</debug>
|
||||||
<option>
|
<option>
|
||||||
<state>$PROJ_DIR$\.build\iar_arm\Exe</state>
|
<state>$PROJ_DIR$\BUILD\Exe</state>
|
||||||
<name>ExePath</name>
|
<name>ExePath</name>
|
||||||
</option>
|
</option>
|
||||||
<option>
|
<option>
|
||||||
<state>$PROJ_DIR$\.build\iar_arm\Obj</state>
|
<state>$PROJ_DIR$\BUILD\Obj</state>
|
||||||
<name>ObjPath</name>
|
<name>ObjPath</name>
|
||||||
</option>
|
</option>
|
||||||
<option>
|
<option>
|
||||||
<state>$PROJ_DIR$\.build\iar_arm\List</state>
|
<state>$PROJ_DIR$\BUILD\List</state>
|
||||||
<name>ListPath</name>
|
<name>ListPath</name>
|
||||||
</option>
|
</option>
|
||||||
<option>
|
<option>
|
||||||
|
|
|
@ -13,7 +13,7 @@ else
|
||||||
RM = '$(SHELL)' -c "rm -rf \"$(1)\""
|
RM = '$(SHELL)' -c "rm -rf \"$(1)\""
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJDIR := .build
|
OBJDIR := BUILD
|
||||||
# Move to the build directory
|
# Move to the build directory
|
||||||
ifeq (,$(filter $(OBJDIR),$(notdir $(CURDIR))))
|
ifeq (,$(filter $(OBJDIR),$(notdir $(CURDIR))))
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
|
|
@ -141,8 +141,11 @@ class Makefile(Exporter):
|
||||||
if cleanup:
|
if cleanup:
|
||||||
remove("Makefile")
|
remove("Makefile")
|
||||||
remove(log_name)
|
remove(log_name)
|
||||||
|
# legacy .build directory cleaned if exists
|
||||||
if exists('.build'):
|
if exists('.build'):
|
||||||
shutil.rmtree('.build')
|
shutil.rmtree('.build')
|
||||||
|
if exists('BUILD'):
|
||||||
|
shutil.rmtree('BUILD')
|
||||||
|
|
||||||
if ret_code != 0:
|
if ret_code != 0:
|
||||||
# Seems like something went wrong.
|
# Seems like something went wrong.
|
||||||
|
|
|
@ -226,8 +226,11 @@ class Uvision(Exporter):
|
||||||
os.remove(log_name)
|
os.remove(log_name)
|
||||||
os.remove(project_name+".uvprojx")
|
os.remove(project_name+".uvprojx")
|
||||||
os.remove(project_name+".uvoptx")
|
os.remove(project_name+".uvoptx")
|
||||||
|
# legacy .build directory cleaned if exists
|
||||||
if exists('.build'):
|
if exists('.build'):
|
||||||
shutil.rmtree(".build")
|
shutil.rmtree('.build')
|
||||||
|
if exists('BUILD'):
|
||||||
|
shutil.rmtree('BUILD')
|
||||||
|
|
||||||
# Returns 0 upon success, 1 upon a warning, and neither upon an error
|
# Returns 0 upon success, 1 upon a warning, and neither upon an error
|
||||||
if ret_code != 0 and ret_code != 1:
|
if ret_code != 0 and ret_code != 1:
|
||||||
|
|
|
@ -46,14 +46,14 @@
|
||||||
<NotGenerated>0</NotGenerated>
|
<NotGenerated>0</NotGenerated>
|
||||||
<InvalidFlash>1</InvalidFlash>
|
<InvalidFlash>1</InvalidFlash>
|
||||||
</TargetStatus>
|
</TargetStatus>
|
||||||
<OutputDirectory>.\.build\uvision5\</OutputDirectory>
|
<OutputDirectory>.\BUILD\</OutputDirectory>
|
||||||
<OutputName>{{name}}</OutputName>
|
<OutputName>{{name}}</OutputName>
|
||||||
<CreateExecutable>1</CreateExecutable>
|
<CreateExecutable>1</CreateExecutable>
|
||||||
<CreateLib>0</CreateLib>
|
<CreateLib>0</CreateLib>
|
||||||
<CreateHexFile>0</CreateHexFile>
|
<CreateHexFile>0</CreateHexFile>
|
||||||
<DebugInformation>1</DebugInformation>
|
<DebugInformation>1</DebugInformation>
|
||||||
<BrowseInformation>1</BrowseInformation>
|
<BrowseInformation>1</BrowseInformation>
|
||||||
<ListingPath>.\.build\uvision5\</ListingPath>
|
<ListingPath>.\BUILD\</ListingPath>
|
||||||
<HexFormatSelection>1</HexFormatSelection>
|
<HexFormatSelection>1</HexFormatSelection>
|
||||||
<Merge32K>0</Merge32K>
|
<Merge32K>0</Merge32K>
|
||||||
<CreateBatchFile>0</CreateBatchFile>
|
<CreateBatchFile>0</CreateBatchFile>
|
||||||
|
|
|
@ -138,8 +138,8 @@ class MemapParser(object):
|
||||||
""" Parse data from a section of gcc map file
|
""" Parse data from a section of gcc map file
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
0x00004308 0x7c ./.build/K64F/GCC_ARM/mbed-os/hal/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/spi_api.o
|
0x00004308 0x7c ./BUILD/K64F/GCC_ARM/mbed-os/hal/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/spi_api.o
|
||||||
.text 0x00000608 0x198 ./.build/K64F/GCC_ARM/mbed-os/core/mbed-rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC/HAL_CM4.o
|
.text 0x00000608 0x198 ./BUILD/K64F/GCC_ARM/mbed-os/core/mbed-rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC/HAL_CM4.o
|
||||||
|
|
||||||
Positional arguments:
|
Positional arguments:
|
||||||
line - the line to parse a section from
|
line - the line to parse a section from
|
||||||
|
|
|
@ -25,7 +25,7 @@ ROOT = abspath(join(dirname(__file__), ".."))
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Toolchains and Build System Settings
|
# Toolchains and Build System Settings
|
||||||
##############################################################################
|
##############################################################################
|
||||||
BUILD_DIR = abspath(join(ROOT, ".build"))
|
BUILD_DIR = abspath(join(ROOT, "BUILD"))
|
||||||
|
|
||||||
# ARM Compiler 5
|
# ARM Compiler 5
|
||||||
ARM_PATH = "C:/Keil_v5/ARM/ARMCC"
|
ARM_PATH = "C:/Keil_v5/ARM/ARMCC"
|
||||||
|
|
Loading…
Reference in New Issue