From 0d3e9f0968677daeee7a0256cd25be58b66832ae Mon Sep 17 00:00:00 2001 From: Sam Grove Date: Thu, 17 Nov 2016 23:49:49 -0600 Subject: [PATCH 1/9] [exporters] make sure to clean .build and BUILD --- tools/export/makefile/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/export/makefile/__init__.py b/tools/export/makefile/__init__.py index d449a38097..fe0b267e97 100644 --- a/tools/export/makefile/__init__.py +++ b/tools/export/makefile/__init__.py @@ -141,8 +141,11 @@ class Makefile(Exporter): if cleanup: remove("Makefile") remove(log_name) + # legacy .build directory cleaned if exists if exists('.build'): shutil.rmtree('.build') + if exists('BUILD'): + shutil.rmtree('BUILD') if ret_code != 0: # Seems like something went wrong. From 72cdf9d16fc6afd51c683d758ff96847a84953e4 Mon Sep 17 00:00:00 2001 From: Sam Grove Date: Thu, 17 Nov 2016 23:53:41 -0600 Subject: [PATCH 2/9] [exporters] iar build artifacts in BUILD directory, not .build --- tools/export/cdt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/export/cdt/__init__.py b/tools/export/cdt/__init__.py index 7b43761602..05147d07fc 100644 --- a/tools/export/cdt/__init__.py +++ b/tools/export/cdt/__init__.py @@ -14,7 +14,7 @@ class Eclipse(Makefile): super(Eclipse, self).generate() ctx = { '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(), 'asm_symbols': self.toolchain.get_symbols(True), 'target': self.target, From 116d8dffdd72169a6ed62a49d1ec936c94277163 Mon Sep 17 00:00:00 2001 From: Sam Grove Date: Thu, 17 Nov 2016 23:55:10 -0600 Subject: [PATCH 3/9] [exporters] make sure to clean .build and BUILD when testing iar --- tools/export/iar/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/export/iar/__init__.py b/tools/export/iar/__init__.py index 475f86615e..e07d7d9926 100644 --- a/tools/export/iar/__init__.py +++ b/tools/export/iar/__init__.py @@ -165,8 +165,11 @@ class IAR(Exporter): os.remove(project_name + ".ewp") os.remove(project_name + ".ewd") os.remove(project_name + ".eww") + # legacy output file location if exists('.build'): shutil.rmtree('.build') + if exists('BUILD'): + shutil.rmtree('BUILD') if ret_code !=0: # Seems like something went wrong. From 6bee31eaad52924bb1d7c6266a21a60a1f112529 Mon Sep 17 00:00:00 2001 From: Sam Grove Date: Thu, 17 Nov 2016 23:56:11 -0600 Subject: [PATCH 4/9] [exporters] make sure to clean .build and BUILD when testing uvision --- tools/export/uvision/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/export/uvision/__init__.py b/tools/export/uvision/__init__.py index c0aa5c5b6e..aad783d2d9 100644 --- a/tools/export/uvision/__init__.py +++ b/tools/export/uvision/__init__.py @@ -226,8 +226,11 @@ class Uvision(Exporter): os.remove(log_name) os.remove(project_name+".uvprojx") os.remove(project_name+".uvoptx") + # legacy .build directory cleaned if exists 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 if ret_code != 0 and ret_code != 1: From 2fe28f0da10dbbdf5973d1e069c79df4fdc715f4 Mon Sep 17 00:00:00 2001 From: Sam Grove Date: Thu, 17 Nov 2016 23:57:26 -0600 Subject: [PATCH 5/9] [tools] update comments in memmap about build folder name --- tools/memap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/memap.py b/tools/memap.py index ba598c2c86..9718b9b584 100644 --- a/tools/memap.py +++ b/tools/memap.py @@ -138,8 +138,8 @@ class MemapParser(object): """ Parse data from a section of gcc map file examples: - 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 + 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 Positional arguments: line - the line to parse a section from From 7297fdf3f6ecb1d2bf66ae1b2a545ad61b9f56be Mon Sep 17 00:00:00 2001 From: Sam Grove Date: Fri, 18 Nov 2016 00:01:21 -0600 Subject: [PATCH 6/9] [exporters] update iar teamplates so build artifacts end up in BUILD directory, not .build --- tools/export/iar/ewp.tmpl | 6 +++--- tools/export/iar/iar_nucleo_f746zg.ewp.tmpl | 6 +++--- tools/export/iar/iar_rz_a1h.ewp.tmpl | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/export/iar/ewp.tmpl b/tools/export/iar/ewp.tmpl index b69f6f694b..3ba5e4be8a 100644 --- a/tools/export/iar/ewp.tmpl +++ b/tools/export/iar/ewp.tmpl @@ -20,15 +20,15 @@