diff --git a/docs/BUILDING.md b/docs/BUILDING.md index 68ccb74c33e..f84e3f6460a 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -104,7 +104,6 @@ Compiler | Mbed SDK Abbreviation | Example Version -----------------------|-----------------------|----------- Keil ARM Compiler | ARM, uARM | ARM C/C++ Compiler, 5.03 [Build 117] GCC ARM | GCC_ARM | gcc version 4.8.3 20131129 (release) -GCC CodeSourcery | GCC_CS | gcc version 4.8.1 (Sourcery CodeBench Lite 2013.11-24) GCC CodeRed | GCC_CR | gcc version 4.6.2 20121016 (release) IAR Embedded Workbench | IAR | IAR ANSI C/C++ Compiler V6.70.1.5641/W32 for ARM @@ -174,9 +173,6 @@ MY_ARM_CLIB = join(ARM_PATH, "lib", "microlib") # GCC ARM GCC_ARM_PATH = "C:/Work/toolchains/gcc_arm_4_8/4_8_2013q4/bin" -# GCC CodeSourcery -GCC_CS_PATH = "C:/Work/toolchains/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" - # GCC CodeRed GCC_CR_PATH = "C:/Work/toolchains/LPCXpresso_6.1.4_194/lpcxpresso/tools/bin" @@ -194,17 +190,15 @@ MUTs = { Note: You need to provide the absolute path to your compiler(s) installed on your host machine. Replace corresponding variable values with paths to compilers installed in your system: * ```ARM_PATH``` for armcc compiler. * ```GCC_ARM_PATH``` for GCC ARM compiler. -* ```GCC_CS_PATH``` for GCC CodeSourcery compiler. * ```GCC_CR_PATH``` for GCC CodeRed compiler. * ```IAR_PATH``` for IAR compiler. If for example you do not use ```IAR``` compiler you do not have to modify anything. Workspace tools will use ```IAR_PATH`` variable only if you explicit ask for it from command line. So do not worry and replace only paths for your installed compilers. -Note: Because this is a Python script and ```ARM_PATH```, ```GCC_ARM_PATH```, ```GCC_CS_PATH```, ```GCC_CR_PATH```, ```IAR_PATH``` are Python string variables please use double backlash or single slash as path's directories delimiter to avoid incorrect path format. For example: +Note: Because this is a Python script and ```ARM_PATH```, ```GCC_ARM_PATH```, ```GCC_CR_PATH```, ```IAR_PATH``` are Python string variables please use double backlash or single slash as path's directories delimiter to avoid incorrect path format. For example: ```python ARM_PATH = "C:/Work/toolchains/ARMCompiler_5.03_117_Windows" GCC_ARM_PATH = "C:/Work/toolchains/gcc_arm_4_8/4_8_2013q4/bin" -GCC_CS_PATH = "C:/Work/toolchains/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" GCC_CR_PATH = "C:/Work/toolchains/LPCXpresso_6.1.4_194/lpcxpresso/tools/bin" IAR_PATH = "C:/Work/toolchains/iar_6_5/arm" ``` @@ -263,7 +257,7 @@ Volume serial number is 006C006F 6243:3EA9 Note: Why ```LCP1768```? For this example we are using ```LPC1768``` because this platform supports all compilers so you are sure you only need to specify proper compiler. -If you are not using ARM Compiler replace ```ARM``` with your compiler nickname: ```GCC_ARM```, ```GCC_CS```, ```GCC_CR``` or ```IAR```. For example if you are using IAR type command: +If you are not using ARM Compiler replace ```ARM``` with your compiler nickname: ```GCC_ARM```, ```GCC_CR``` or ```IAR```. For example if you are using IAR type command: ``` $ python build.py -m LPC1768 -t IAR ``` @@ -335,17 +329,17 @@ Build successes: * If you’re unsure which platforms and toolchains are supported please use switch ```-S``` to print simple matrix of platform to compiler dependencies. ``` $ python build.py -S -+-------------------------+-----------+-----------+-----------+-----------+-----------+-----------+------------+---------------+ -| Platform | ARM | uARM | GCC_ARM | IAR | GCC_CR | GCC_CS | GCC_CW_EWL | GCC_CW_NEWLIB | -+-------------------------+-----------+-----------+-----------+-----------+-----------+-----------+------------+---------------+ -| APPNEARME_MICRONFCBOARD | Supported | Default | Supported | - | - | - | - | - | -| ARCH_BLE | Default | - | Supported | Supported | - | - | - | - | -| ARCH_GPRS | Supported | Default | Supported | Supported | Supported | - | - | - | ++-------------------------+-----------+-----------+-----------+-----------+-----------+ +| Platform | ARM | uARM | GCC_ARM | IAR | GCC_CR | ++-------------------------+-----------+-----------+-----------+-----------+-----------+ +| APPNEARME_MICRONFCBOARD | Supported | Default | Supported | - | - | +| ARCH_BLE | Default | - | Supported | Supported | - | +| ARCH_GPRS | Supported | Default | Supported | Supported | Supported | ... -| UBLOX_C029 | Supported | Default | Supported | Supported | - | - | - | - | -| WALLBOT_BLE | Default | - | Supported | Supported | - | - | - | - | -| XADOW_M0 | Supported | Default | Supported | Supported | Supported | - | - | - | -+-------------------------+-----------+-----------+-----------+-----------+-----------+-----------+------------+---------------+ +| UBLOX_C029 | Supported | Default | Supported | Supported | - | +| WALLBOT_BLE | Default | - | Supported | Supported | - | +| XADOW_M0 | Supported | Default | Supported | Supported | Supported | ++-------------------------+-----------+-----------+-----------+-----------+-----------+ *Default - default on-line compiler *Supported - supported off-line compiler @@ -356,19 +350,19 @@ Total permutations: 297 Above list can be overwhelming so please do not hesitate to use switch ```-f``` to filter ```Platform``` column. ``` $ python build.py -S -f ^K -+--------------+-----------+---------+-----------+-----------+--------+--------+------------+---------------+ -| Platform | ARM | uARM | GCC_ARM | IAR | GCC_CR | GCC_CS | GCC_CW_EWL | GCC_CW_NEWLIB | -+--------------+-----------+---------+-----------+-----------+--------+--------+------------+---------------+ -| K20D50M | Default | - | Supported | Supported | - | - | - | - | -| K22F | Default | - | Supported | Supported | - | - | - | - | -| K64F | Default | - | Supported | Supported | - | - | - | - | -| KL05Z | Supported | Default | Supported | Supported | - | - | - | - | -| KL25Z | Default | - | Supported | Supported | - | - | Supported | Supported | -| KL43Z | Default | - | Supported | - | - | - | - | - | -| KL46Z | Default | - | Supported | Supported | - | - | - | - | -| NRF51_DK | Default | - | Supported | Supported | - | - | - | - | -| NRF51_DK_OTA | Default | - | Supported | - | - | - | - | - | -+--------------+-----------+---------+-----------+-----------+--------+--------+------------+---------------+ ++--------------+-----------+---------+-----------+-----------+--------+ +| Platform | ARM | uARM | GCC_ARM | IAR | GCC_CR | ++--------------+-----------+---------+-----------+-----------+--------+ +| K20D50M | Default | - | Supported | Supported | - | +| K22F | Default | - | Supported | Supported | - | +| K64F | Default | - | Supported | Supported | - | +| KL05Z | Supported | Default | Supported | Supported | - | +| KL25Z | Default | - | Supported | Supported | - | +| KL43Z | Default | - | Supported | - | - | +| KL46Z | Default | - | Supported | Supported | - | +| NRF51_DK | Default | - | Supported | Supported | - | +| NRF51_DK_OTA | Default | - | Supported | - | - | ++--------------+-----------+---------+-----------+-----------+--------+ *Default - default on-line compiler *Supported - supported off-line compiler @@ -378,11 +372,11 @@ Total permutations: 28 or just give platform name: ``` $ python build.py -S -f LPC1768 -+----------+---------+-----------+-----------+-----------+-----------+-----------+------------+---------------+ -| Platform | ARM | uARM | GCC_ARM | IAR | GCC_CR | GCC_CS | GCC_CW_EWL | GCC_CW_NEWLIB | -+----------+---------+-----------+-----------+-----------+-----------+-----------+------------+---------------+ -| LPC1768 | Default | Supported | Supported | Supported | Supported | Supported | - | - | -+----------+---------+-----------+-----------+-----------+-----------+-----------+------------+---------------+ ++----------+---------+-----------+-----------+-----------+-----------+ +| Platform | ARM | uARM | GCC_ARM | IAR | GCC_CR | ++----------+---------+-----------+-----------+-----------+-----------+ +| LPC1768 | Default | Supported | Supported | Supported | Supported | ++----------+---------+-----------+-----------+-----------+-----------+ *Default - default on-line compiler *Supported - supported off-line compiler diff --git a/docs/TESTING.md b/docs/TESTING.md index dfbd5c0d2e5..76980b4e224 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -148,7 +148,7 @@ Below we can see how sample ```test_spec.json``` file content could look like. ( ```json { "targets": { - "LPC1768" : ["ARM", "uARM", "GCC_ARM", "GCC_CS", "GCC_CR", "IAR"], + "LPC1768" : ["ARM", "uARM", "GCC_ARM", "GCC_CR", "IAR"], "KL25Z" : ["ARM", "GCC_ARM"], "NUCLEO_F103RB" : ["ARM", "uARM"] } @@ -156,7 +156,7 @@ Below we can see how sample ```test_spec.json``` file content could look like. ( ``` Above example configuration will force tests for LPC1768, KL25Z, NUCLEO_F103RB platforms and: -* Compilers: ```ARM```, ```uARM```, ```GCC_ARM```, ```GCC_CS```, ```GCC_CR``` and ```IAR``` will be used to compile tests for NXP's ```LPC1768```. +* Compilers: ```ARM```, ```uARM```, ```GCC_ARM```, ```GCC_CR``` and ```IAR``` will be used to compile tests for NXP's ```LPC1768```. * Compilers: ```ARM``` and ```GCC_ARM``` will be used for Freescales' ```KL25Z``` platform. * Compilers: ```ARM``` and ```uARM``` will be used for STMicro's ```NUCLEO_F103RB``` platform. diff --git a/libraries/mbed/common/retarget.cpp b/libraries/mbed/common/retarget.cpp index 82411abd21b..14720f785e6 100644 --- a/libraries/mbed/common/retarget.cpp +++ b/libraries/mbed/common/retarget.cpp @@ -493,10 +493,7 @@ extern "C" caddr_t _sbrk(int incr) { #endif -#ifdef TOOLCHAIN_GCC_CW -// TODO: Ideally, we would like to define directly "_ExitProcess" -extern "C" void mbed_exit(int return_code) { -#elif defined TOOLCHAIN_GCC_ARM +#if defined TOOLCHAIN_GCC_ARM extern "C" void _exit(int return_code) { #else namespace std { @@ -520,7 +517,7 @@ extern "C" void exit(int return_code) { while (1); } -#if !defined(TOOLCHAIN_GCC_ARM) && !defined(TOOLCHAIN_GCC_CW) +#if !defined(TOOLCHAIN_GCC_ARM) } //namespace std #endif diff --git a/workspace_tools/build_api.py b/workspace_tools/build_api.py index 2b5f349cee5..13335c2aeca 100644 --- a/workspace_tools/build_api.py +++ b/workspace_tools/build_api.py @@ -184,7 +184,7 @@ def build_library(src_paths, build_path, target, toolchain_name, """ src_path: the path of the source directory build_path: the path of the build directory target: ['LPC1768', 'LPC11U24', 'LPC2368'] - toolchain: ['ARM', 'uARM', 'GCC_ARM', 'GCC_CS', 'GCC_CR'] + toolchain: ['ARM', 'uARM', 'GCC_ARM', 'GCC_CR'] library_paths: List of paths to additional libraries clean: Rebuild everything if True notify: Notify function for logs diff --git a/workspace_tools/build_release.py b/workspace_tools/build_release.py index d968404e214..0a3383e96df 100644 --- a/workspace_tools/build_release.py +++ b/workspace_tools/build_release.py @@ -31,9 +31,9 @@ OFFICIAL_MBED_LIBRARY_BUILD = ( ('LPC11U24', ('ARM', 'uARM', 'GCC_ARM', 'IAR')), - ('LPC1768', ('ARM', 'GCC_ARM', 'GCC_CR', 'GCC_CS', 'IAR')), - ('UBLOX_C027', ('ARM', 'GCC_ARM', 'GCC_CR', 'GCC_CS', 'IAR')), - ('ARCH_PRO', ('ARM', 'GCC_ARM', 'GCC_CR', 'GCC_CS', 'IAR')), + ('LPC1768', ('ARM', 'GCC_ARM', 'GCC_CR', 'IAR')), + ('UBLOX_C027', ('ARM', 'GCC_ARM', 'GCC_CR', 'IAR')), + ('ARCH_PRO', ('ARM', 'GCC_ARM', 'GCC_CR', 'IAR')), ('LPC2368', ('ARM', 'GCC_ARM')), ('LPC2460', ('GCC_ARM',)), ('LPC812', ('uARM','IAR')), diff --git a/workspace_tools/buildbot/master.cfg b/workspace_tools/buildbot/master.cfg index e07c3551cf2..0a8a6620ccc 100644 --- a/workspace_tools/buildbot/master.cfg +++ b/workspace_tools/buildbot/master.cfg @@ -29,7 +29,7 @@ c['slavePortnum'] = 9989 ####### OFFICIAL_MBED_LIBRARY_BUILD OFFICIAL_MBED_LIBRARY_BUILD = ( - ('LPC1768', ('ARM', 'GCC_ARM', 'GCC_CR', 'GCC_CS', 'IAR')), + ('LPC1768', ('ARM', 'GCC_ARM', 'GCC_CR', 'IAR')), ('KL05Z', ('ARM', 'uARM', 'GCC_ARM')), ('KL25Z', ('ARM', 'GCC_ARM')), ('LPC11U24', ('ARM', 'uARM')), @@ -45,7 +45,7 @@ OFFICIAL_MBED_LIBRARY_BUILD = ( ('NUCLEO_L152RE', ('ARM', 'uARM')), ('NUCLEO_F401RE', ('ARM', 'uARM')), ('NUCLEO_F030R8', ('ARM', 'uARM')), - ('UBLOX_C027', ('ARM', 'GCC_ARM', 'GCC_CR', 'GCC_CS', 'IAR')), + ('UBLOX_C027', ('ARM', 'GCC_ARM', 'GCC_CR', 'IAR')), # ('NRF51822', ('ARM',)), ) diff --git a/workspace_tools/export/codesourcery.py b/workspace_tools/export/codesourcery.py deleted file mode 100644 index c0146253920..00000000000 --- a/workspace_tools/export/codesourcery.py +++ /dev/null @@ -1,60 +0,0 @@ -""" -mbed SDK -Copyright (c) 2011-2013 ARM Limited - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" -from exporters import Exporter -from os.path import splitext, basename - - -class CodeSourcery(Exporter): - NAME = 'CodeSourcery' - TOOLCHAIN = 'GCC_CS' - - TARGETS = [ - 'LPC1768', - 'UBLOX_C027', - 'ARCH_PRO', - ] - - DOT_IN_RELATIVE_PATH = True - - def generate(self): - # "make" wants Unix paths - self.resources.win_to_unix() - - to_be_compiled = [] - for r_type in ['s_sources', 'c_sources', 'cpp_sources']: - r = getattr(self.resources, r_type) - if r: - for source in r: - base, ext = splitext(source) - to_be_compiled.append(base + '.o') - - libraries = [] - for lib in self.resources.libraries: - l, _ = splitext(basename(lib)) - libraries.append(l[3:]) - - ctx = { - 'name': self.program_name, - 'to_be_compiled': to_be_compiled, - 'object_files': self.resources.objects, - 'include_paths': self.resources.inc_dirs, - 'library_paths': self.resources.lib_dirs, - 'linker_script': self.resources.linker_script, - 'libraries': libraries, - 'symbols': self.get_symbols() - } - self.gen_file('codesourcery_%s.tmpl' % self.target.lower(), ctx, 'Makefile') diff --git a/workspace_tools/export/codesourcery_arch_pro.tmpl b/workspace_tools/export/codesourcery_arch_pro.tmpl deleted file mode 100644 index 161bd1b7ba8..00000000000 --- a/workspace_tools/export/codesourcery_arch_pro.tmpl +++ /dev/null @@ -1,56 +0,0 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-CodeSourcery - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -CC_FLAGS = -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -fno-rtti -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -fomit-frame-pointer -ONLY_C_FLAGS = -std=gnu99 -ONLY_CPP_FLAGS = -std=gnu++98 -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - - -AS = $(GCC_BIN)arm-none-eabi-as - -LD = $(GCC_BIN)arm-none-eabi-gcc -LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc - -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(OBJECTS) - -.s.o: - $(AS) $(CC_FLAGS) $(CC_SYMBOLS) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) $(ONLY_C_FLAGS) $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) $(ONLY_CPP_FLAGS) $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - -$(PROJECT).bin: $(PROJECT).elf - $(OBJCOPY) -O binary $< $@ - diff --git a/workspace_tools/export/codesourcery_lpc1768.tmpl b/workspace_tools/export/codesourcery_lpc1768.tmpl deleted file mode 100644 index 161bd1b7ba8..00000000000 --- a/workspace_tools/export/codesourcery_lpc1768.tmpl +++ /dev/null @@ -1,56 +0,0 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-CodeSourcery - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -CC_FLAGS = -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -fno-rtti -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -fomit-frame-pointer -ONLY_C_FLAGS = -std=gnu99 -ONLY_CPP_FLAGS = -std=gnu++98 -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - - -AS = $(GCC_BIN)arm-none-eabi-as - -LD = $(GCC_BIN)arm-none-eabi-gcc -LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc - -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(OBJECTS) - -.s.o: - $(AS) $(CC_FLAGS) $(CC_SYMBOLS) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) $(ONLY_C_FLAGS) $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) $(ONLY_CPP_FLAGS) $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - -$(PROJECT).bin: $(PROJECT).elf - $(OBJCOPY) -O binary $< $@ - diff --git a/workspace_tools/export/codesourcery_ublox_c027.tmpl b/workspace_tools/export/codesourcery_ublox_c027.tmpl deleted file mode 100644 index 161bd1b7ba8..00000000000 --- a/workspace_tools/export/codesourcery_ublox_c027.tmpl +++ /dev/null @@ -1,56 +0,0 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-CodeSourcery - -GCC_BIN = -PROJECT = {{name}} -OBJECTS = {% for f in to_be_compiled %}{{f}} {% endfor %} -SYS_OBJECTS = {% for f in object_files %}{{f}} {% endfor %} -INCLUDE_PATHS = {% for p in include_paths %}-I{{p}} {% endfor %} -LIBRARY_PATHS = {% for p in library_paths %}-L{{p}} {% endfor %} -LIBRARIES = {% for lib in libraries %}-l{{lib}} {% endfor %} -LINKER_SCRIPT = {{linker_script}} - -############################################################################### -CC = $(GCC_BIN)arm-none-eabi-gcc -CPP = $(GCC_BIN)arm-none-eabi-g++ -CC_FLAGS = -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -fno-rtti -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections -fomit-frame-pointer -ONLY_C_FLAGS = -std=gnu99 -ONLY_CPP_FLAGS = -std=gnu++98 -CC_SYMBOLS = {% for s in symbols %}-D{{s}} {% endfor %} - - -AS = $(GCC_BIN)arm-none-eabi-as - -LD = $(GCC_BIN)arm-none-eabi-gcc -LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections -LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc - -OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy - -ifeq ($(DEBUG), 1) - CC_FLAGS += -DDEBUG -O0 -else - CC_FLAGS += -DNDEBUG -Os -endif - -all: $(PROJECT).bin - -clean: - rm -f $(PROJECT).bin $(PROJECT).elf $(OBJECTS) - -.s.o: - $(AS) $(CC_FLAGS) $(CC_SYMBOLS) -o $@ $< - -.c.o: - $(CC) $(CC_FLAGS) $(CC_SYMBOLS) $(ONLY_C_FLAGS) $(INCLUDE_PATHS) -o $@ $< - -.cpp.o: - $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) $(ONLY_CPP_FLAGS) $(INCLUDE_PATHS) -o $@ $< - - -$(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) - $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) - -$(PROJECT).bin: $(PROJECT).elf - $(OBJCOPY) -O binary $< $@ - diff --git a/workspace_tools/settings.py b/workspace_tools/settings.py index 9237624cc0a..ef4ef034c04 100644 --- a/workspace_tools/settings.py +++ b/workspace_tools/settings.py @@ -53,19 +53,12 @@ # GCC ARM GCC_ARM_PATH = "" -# GCC CodeSourcery -GCC_CS_PATH = "C:/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" - # GCC CodeRed GCC_CR_PATH = "C:/code_red/RedSuite_4.2.0_349/redsuite/Tools/bin" # IAR IAR_PATH = "C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm" -# GCC Code Warrior -CW_GCC_PATH = "C:/Freescale/CW MCU v10.3/Cross_Tools/arm-none-eabi-gcc-4_6_2/bin" -CW_EWL_PATH = "C:/Freescale/CW MCU v10.3/MCU/ARM_GCC_Support/ewl/lib" - # Goanna static analyser. Please overload it in private_settings.py GOANNA_PATH = "c:/Program Files (x86)/RedLizards/Goanna Central 3.2.3/bin" diff --git a/workspace_tools/singletest.py b/workspace_tools/singletest.py index ba9695ac1b2..6b5054baca3 100644 --- a/workspace_tools/singletest.py +++ b/workspace_tools/singletest.py @@ -24,7 +24,7 @@ { "targets": { "KL46Z": ["ARM", "GCC_ARM"], - "LPC1768": ["ARM", "GCC_ARM", "GCC_CR", "GCC_CS", "IAR"], + "LPC1768": ["ARM", "GCC_ARM", "GCC_CR", "IAR"], "LPC11U24": ["uARM"], "NRF51822": ["ARM"] } diff --git a/workspace_tools/size.py b/workspace_tools/size.py index 233cb961530..48ed5366be7 100644 --- a/workspace_tools/size.py +++ b/workspace_tools/size.py @@ -63,7 +63,7 @@ def benchmarks(): csv_data.writerow(['Toolchain', "Target", "Benchmark", "code", "data", "bss", "flash"]) # Build - for toolchain in ['ARM', 'uARM', 'GCC_CR', 'GCC_CS', 'GCC_ARM']: + for toolchain in ['ARM', 'uARM', 'GCC_CR', 'GCC_ARM']: for mcu in ["LPC1768", "LPC11U24"]: # Build Libraries build_mbed_libs(mcu, toolchain) @@ -118,4 +118,4 @@ def compare(t1, t2, target): if __name__ == '__main__': - compare("GCC_CR", "GCC_CS", "LPC1768") + compare("GCC_CR", "LPC1768") diff --git a/workspace_tools/targets.py b/workspace_tools/targets.py index 1416de03204..a83c837839e 100755 --- a/workspace_tools/targets.py +++ b/workspace_tools/targets.py @@ -275,7 +275,7 @@ def __init__(self): LPCTarget.__init__(self) self.core = "Cortex-M3" self.extra_labels = ['NXP', 'LPC176X', 'MBED_LPC1768'] - self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CS", "GCC_CR", "IAR"] + self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CR", "IAR"] self.detect_code = ["1010"] self.progen_target = 'mbed-lpc1768' @@ -284,7 +284,7 @@ def __init__(self): LPCTarget.__init__(self) self.core = "Cortex-M3" self.extra_labels = ['NXP', 'LPC176X'] - self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CS", "GCC_CR", "IAR"] + self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CR", "IAR"] self.macros = ['TARGET_LPC1768'] self.supported_form_factors = ["ARDUINO"] self.progen_target ='arch-pro' @@ -294,7 +294,7 @@ def __init__(self): LPCTarget.__init__(self) self.core = "Cortex-M3" self.extra_labels = ['NXP', 'LPC176X'] - self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CS", "GCC_CR", "IAR"] + self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CR", "IAR"] self.macros = ['TARGET_LPC1768'] self.supported_form_factors = ["ARDUINO"] self.progen_target ='ublox-c027' @@ -304,7 +304,7 @@ def __init__(self): LPCTarget.__init__(self) self.core = "Cortex-M3" self.extra_labels = ['NXP', 'LPC176X', 'XBED_LPC1768'] - self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CS", "GCC_CR", "IAR"] + self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CR", "IAR"] self.macros = ['TARGET_LPC1768'] self.detect_code = ["1010"] @@ -466,7 +466,7 @@ def __init__(self): Target.__init__(self) self.core = "Cortex-M0+" self.extra_labels = ['Freescale', 'KLXX'] - self.supported_toolchains = ["ARM", "GCC_CW_EWL", "GCC_CW_NEWLIB", "GCC_ARM","IAR"] + self.supported_toolchains = ["ARM", "GCC_ARM", "IAR"] self.supported_form_factors = ["ARDUINO"] self.is_disk_virtual = True self.detect_code = ["0200"] diff --git a/workspace_tools/toolchains/__init__.py b/workspace_tools/toolchains/__init__.py index 6e9e8c53b84..d79e647aa57 100644 --- a/workspace_tools/toolchains/__init__.py +++ b/workspace_tools/toolchains/__init__.py @@ -153,11 +153,11 @@ def __str__(self): # had the knowledge of a list of these directories to be ignored. LEGACY_IGNORE_DIRS = set([ 'LPC11U24', 'LPC1768', 'LPC2368', 'LPC4088', 'LPC812', 'KL25Z', - 'ARM', 'GCC_ARM', 'GCC_CR', 'GCC_CS', 'IAR', 'uARM' + 'ARM', 'GCC_ARM', 'GCC_CR', 'IAR', 'uARM' ]) LEGACY_TOOLCHAIN_NAMES = { 'ARM_STD':'ARM', 'ARM_MICRO': 'uARM', - 'GCC_ARM': 'GCC_ARM', 'GCC_CR': 'GCC_CR', 'GCC_CS': 'GCC_CS', + 'GCC_ARM': 'GCC_ARM', 'GCC_CR': 'GCC_CR', 'IAR': 'IAR', } @@ -740,33 +740,26 @@ def var(self, key, value): self.notify({'type': 'var', 'key': key, 'val': value}) from workspace_tools.settings import ARM_BIN -from workspace_tools.settings import GCC_ARM_PATH, GCC_CR_PATH, GCC_CS_PATH, CW_EWL_PATH, CW_GCC_PATH +from workspace_tools.settings import GCC_ARM_PATH, GCC_CR_PATH from workspace_tools.settings import IAR_PATH TOOLCHAIN_BIN_PATH = { 'ARM': ARM_BIN, 'uARM': ARM_BIN, 'GCC_ARM': GCC_ARM_PATH, - 'GCC_CS': GCC_CS_PATH, 'GCC_CR': GCC_CR_PATH, - 'GCC_CW_EWL': CW_EWL_PATH, - 'GCC_CW_NEWLIB': CW_GCC_PATH, 'IAR': IAR_PATH } from workspace_tools.toolchains.arm import ARM_STD, ARM_MICRO -from workspace_tools.toolchains.gcc import GCC_ARM, GCC_CS, GCC_CR -from workspace_tools.toolchains.gcc import GCC_CW_EWL, GCC_CW_NEWLIB +from workspace_tools.toolchains.gcc import GCC_ARM, GCC_CR from workspace_tools.toolchains.iar import IAR TOOLCHAIN_CLASSES = { 'ARM': ARM_STD, 'uARM': ARM_MICRO, 'GCC_ARM': GCC_ARM, - 'GCC_CS': GCC_CS, 'GCC_CR': GCC_CR, - 'GCC_CW_EWL': GCC_CW_EWL, - 'GCC_CW_NEWLIB': GCC_CW_NEWLIB, 'IAR': IAR } diff --git a/workspace_tools/toolchains/gcc.py b/workspace_tools/toolchains/gcc.py index f746a197329..ec43c7fa5ee 100644 --- a/workspace_tools/toolchains/gcc.py +++ b/workspace_tools/toolchains/gcc.py @@ -18,7 +18,7 @@ from os.path import join, basename, splitext from workspace_tools.toolchains import mbedToolchain -from workspace_tools.settings import GCC_ARM_PATH, GCC_CR_PATH, GCC_CS_PATH, CW_EWL_PATH, CW_GCC_PATH +from workspace_tools.settings import GCC_ARM_PATH, GCC_CR_PATH from workspace_tools.settings import GOANNA_PATH from workspace_tools.hooks import hook_tool @@ -213,50 +213,3 @@ def __init__(self, target, options=None, notify=None, macros=None, silent=False, self.ld.extend(["-u _printf_float", "-u _scanf_float"]) self.ld += ["-nostdlib"] - -class GCC_CS(GCC): - def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False): - GCC.__init__(self, target, options, notify, macros, silent, GCC_CS_PATH, extra_verbose=extra_verbose) - - -class GCC_CW(GCC): - ARCH_LIB = { - "Cortex-M0+": "armv6-m", - } - - def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False): - GCC.__init__(self, target, options, notify, macros, silent, CW_GCC_PATH, extra_verbose=extra_verbose) - - -class GCC_CW_EWL(GCC_CW): - def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False): - GCC_CW.__init__(self, target, options, notify, macros, silent, extra_verbose=extra_verbose) - - # Compiler - common = [ - '-mfloat-abi=soft', - '-nostdinc', '-I%s' % join(CW_EWL_PATH, "EWL_C", "include"), - ] - self.cc += common + [ - '-include', join(CW_EWL_PATH, "EWL_C", "include", 'lib_c99.prefix') - ] - self.cppc += common + [ - '-nostdinc++', '-I%s' % join(CW_EWL_PATH, "EWL_C++", "include"), - '-include', join(CW_EWL_PATH, "EWL_C++", "include", 'lib_ewl_c++.prefix') - ] - - # Linker - self.sys_libs = [] - self.CIRCULAR_DEPENDENCIES = False - self.ld = [join(CW_GCC_PATH, "arm-none-eabi-g++"), - "-Xlinker --gc-sections", - "-L%s" % join(CW_EWL_PATH, "lib", GCC_CW.ARCH_LIB[target.core]), - "-n", "-specs=ewl_c++.specs", "-mfloat-abi=soft", - "-Xlinker --undefined=__pformatter_", "-Xlinker --defsym=__pformatter=__pformatter_", - "-Xlinker --undefined=__sformatter", "-Xlinker --defsym=__sformatter=__sformatter", - ] + self.cpu - - -class GCC_CW_NEWLIB(GCC_CW): - def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False): - GCC_CW.__init__(self, target, options, notify, macros, silent, extra_verbose=extra_verbose)