mirror of https://github.com/ARMmbed/mbed-os.git
Remove all references and use of code sourcery GCC in docs, build and export scripts
parent
66c0620619
commit
018cdb928a
|
@ -104,7 +104,6 @@ Compiler | Mbed SDK Abbreviation | Example Version
|
||||||
-----------------------|-----------------------|-----------
|
-----------------------|-----------------------|-----------
|
||||||
Keil ARM Compiler | ARM, uARM | ARM C/C++ Compiler, 5.03 [Build 117]
|
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 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)
|
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
|
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
|
||||||
GCC_ARM_PATH = "C:/Work/toolchains/gcc_arm_4_8/4_8_2013q4/bin"
|
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 CodeRed
|
||||||
GCC_CR_PATH = "C:/Work/toolchains/LPCXpresso_6.1.4_194/lpcxpresso/tools/bin"
|
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:
|
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.
|
* ```ARM_PATH``` for armcc compiler.
|
||||||
* ```GCC_ARM_PATH``` for GCC ARM compiler.
|
* ```GCC_ARM_PATH``` for GCC ARM compiler.
|
||||||
* ```GCC_CS_PATH``` for GCC CodeSourcery compiler.
|
|
||||||
* ```GCC_CR_PATH``` for GCC CodeRed compiler.
|
* ```GCC_CR_PATH``` for GCC CodeRed compiler.
|
||||||
* ```IAR_PATH``` for IAR 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.
|
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
|
```python
|
||||||
ARM_PATH = "C:/Work/toolchains/ARMCompiler_5.03_117_Windows"
|
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_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"
|
GCC_CR_PATH = "C:/Work/toolchains/LPCXpresso_6.1.4_194/lpcxpresso/tools/bin"
|
||||||
IAR_PATH = "C:/Work/toolchains/iar_6_5/arm"
|
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.
|
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
|
$ 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.
|
* 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
|
$ python build.py -S
|
||||||
+-------------------------+-----------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
|
+-------------------------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
|
||||||
| Platform | ARM | uARM | GCC_ARM | IAR | GCC_CR | GCC_CS | GCC_CW_EWL | GCC_CW_NEWLIB |
|
| Platform | ARM | uARM | GCC_ARM | IAR | GCC_CR | GCC_CW_EWL | GCC_CW_NEWLIB |
|
||||||
+-------------------------+-----------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
|
+-------------------------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
|
||||||
| APPNEARME_MICRONFCBOARD | Supported | Default | Supported | - | - | - | - | - |
|
| APPNEARME_MICRONFCBOARD | Supported | Default | Supported | - | - | - | - |
|
||||||
| ARCH_BLE | Default | - | Supported | Supported | - | - | - | - |
|
| ARCH_BLE | Default | - | Supported | Supported | - | - | - |
|
||||||
| ARCH_GPRS | Supported | Default | Supported | Supported | Supported | - | - | - |
|
| ARCH_GPRS | Supported | Default | Supported | Supported | Supported | - | - |
|
||||||
...
|
...
|
||||||
| UBLOX_C029 | Supported | Default | Supported | Supported | - | - | - | - |
|
| UBLOX_C029 | Supported | Default | Supported | Supported | - | - | - |
|
||||||
| WALLBOT_BLE | Default | - | Supported | Supported | - | - | - | - |
|
| WALLBOT_BLE | Default | - | Supported | Supported | - | - | - |
|
||||||
| XADOW_M0 | Supported | Default | Supported | Supported | Supported | - | - | - |
|
| XADOW_M0 | Supported | Default | Supported | Supported | Supported | - | - |
|
||||||
+-------------------------+-----------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
|
+-------------------------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
|
||||||
*Default - default on-line compiler
|
*Default - default on-line compiler
|
||||||
*Supported - supported off-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.
|
Above list can be overwhelming so please do not hesitate to use switch ```-f``` to filter ```Platform``` column.
|
||||||
```
|
```
|
||||||
$ python build.py -S -f ^K
|
$ python build.py -S -f ^K
|
||||||
+--------------+-----------+---------+-----------+-----------+--------+--------+------------+---------------+
|
+--------------+-----------+---------+-----------+-----------+--------+------------+---------------+
|
||||||
| Platform | ARM | uARM | GCC_ARM | IAR | GCC_CR | GCC_CS | GCC_CW_EWL | GCC_CW_NEWLIB |
|
| Platform | ARM | uARM | GCC_ARM | IAR | GCC_CR | GCC_CW_EWL | GCC_CW_NEWLIB |
|
||||||
+--------------+-----------+---------+-----------+-----------+--------+--------+------------+---------------+
|
+--------------+-----------+---------+-----------+-----------+--------+------------+---------------+
|
||||||
| K20D50M | Default | - | Supported | Supported | - | - | - | - |
|
| K20D50M | Default | - | Supported | Supported | - | - | - |
|
||||||
| K22F | Default | - | Supported | Supported | - | - | - | - |
|
| K22F | Default | - | Supported | Supported | - | - | - |
|
||||||
| K64F | Default | - | Supported | Supported | - | - | - | - |
|
| K64F | Default | - | Supported | Supported | - | - | - |
|
||||||
| KL05Z | Supported | Default | Supported | Supported | - | - | - | - |
|
| KL05Z | Supported | Default | Supported | Supported | - | - | - |
|
||||||
| KL25Z | Default | - | Supported | Supported | - | - | Supported | Supported |
|
| KL25Z | Default | - | Supported | Supported | - | Supported | Supported |
|
||||||
| KL43Z | Default | - | Supported | - | - | - | - | - |
|
| KL43Z | Default | - | Supported | - | - | - | - |
|
||||||
| KL46Z | Default | - | Supported | Supported | - | - | - | - |
|
| KL46Z | Default | - | Supported | Supported | - | - | - |
|
||||||
| NRF51_DK | Default | - | Supported | Supported | - | - | - | - |
|
| NRF51_DK | Default | - | Supported | Supported | - | - | - |
|
||||||
| NRF51_DK_OTA | Default | - | Supported | - | - | - | - | - |
|
| NRF51_DK_OTA | Default | - | Supported | - | - | - | - |
|
||||||
+--------------+-----------+---------+-----------+-----------+--------+--------+------------+---------------+
|
+--------------+-----------+---------+-----------+-----------+--------+------------+---------------+
|
||||||
*Default - default on-line compiler
|
*Default - default on-line compiler
|
||||||
*Supported - supported off-line compiler
|
*Supported - supported off-line compiler
|
||||||
|
|
||||||
|
@ -378,11 +372,11 @@ Total permutations: 28
|
||||||
or just give platform name:
|
or just give platform name:
|
||||||
```
|
```
|
||||||
$ python build.py -S -f LPC1768
|
$ python build.py -S -f LPC1768
|
||||||
+----------+---------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
|
+----------+---------+-----------+-----------+-----------+-----------+------------+---------------+
|
||||||
| Platform | ARM | uARM | GCC_ARM | IAR | GCC_CR | GCC_CS | GCC_CW_EWL | GCC_CW_NEWLIB |
|
| Platform | ARM | uARM | GCC_ARM | IAR | GCC_CR | GCC_CW_EWL | GCC_CW_NEWLIB |
|
||||||
+----------+---------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
|
+----------+---------+-----------+-----------+-----------+-----------+------------+---------------+
|
||||||
| LPC1768 | Default | Supported | Supported | Supported | Supported | Supported | - | - |
|
| LPC1768 | Default | Supported | Supported | Supported | Supported | - | - |
|
||||||
+----------+---------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
|
+----------+---------+-----------+-----------+-----------+-----------+------------+---------------+
|
||||||
*Default - default on-line compiler
|
*Default - default on-line compiler
|
||||||
*Supported - supported off-line compiler
|
*Supported - supported off-line compiler
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ Below we can see how sample ```test_spec.json``` file content could look like. (
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"targets": {
|
"targets": {
|
||||||
"LPC1768" : ["ARM", "uARM", "GCC_ARM", "GCC_CS", "GCC_CR", "IAR"],
|
"LPC1768" : ["ARM", "uARM", "GCC_ARM", "GCC_CR", "IAR"],
|
||||||
"KL25Z" : ["ARM", "GCC_ARM"],
|
"KL25Z" : ["ARM", "GCC_ARM"],
|
||||||
"NUCLEO_F103RB" : ["ARM", "uARM"]
|
"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:
|
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 ```GCC_ARM``` will be used for Freescales' ```KL25Z``` platform.
|
||||||
* Compilers: ```ARM``` and ```uARM``` will be used for STMicro's ```NUCLEO_F103RB``` platform.
|
* Compilers: ```ARM``` and ```uARM``` will be used for STMicro's ```NUCLEO_F103RB``` platform.
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
|
||||||
""" src_path: the path of the source directory
|
""" src_path: the path of the source directory
|
||||||
build_path: the path of the build directory
|
build_path: the path of the build directory
|
||||||
target: ['LPC1768', 'LPC11U24', 'LPC2368']
|
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
|
library_paths: List of paths to additional libraries
|
||||||
clean: Rebuild everything if True
|
clean: Rebuild everything if True
|
||||||
notify: Notify function for logs
|
notify: Notify function for logs
|
||||||
|
|
|
@ -31,9 +31,9 @@ from workspace_tools.test_exporters import ReportExporter, ResultExporterType
|
||||||
|
|
||||||
OFFICIAL_MBED_LIBRARY_BUILD = (
|
OFFICIAL_MBED_LIBRARY_BUILD = (
|
||||||
('LPC11U24', ('ARM', 'uARM', 'GCC_ARM', 'IAR')),
|
('LPC11U24', ('ARM', 'uARM', 'GCC_ARM', 'IAR')),
|
||||||
('LPC1768', ('ARM', 'GCC_ARM', 'GCC_CR', 'GCC_CS', 'IAR')),
|
('LPC1768', ('ARM', 'GCC_ARM', 'GCC_CR', 'IAR')),
|
||||||
('UBLOX_C027', ('ARM', 'GCC_ARM', 'GCC_CR', 'GCC_CS', 'IAR')),
|
('UBLOX_C027', ('ARM', 'GCC_ARM', 'GCC_CR', 'IAR')),
|
||||||
('ARCH_PRO', ('ARM', 'GCC_ARM', 'GCC_CR', 'GCC_CS', 'IAR')),
|
('ARCH_PRO', ('ARM', 'GCC_ARM', 'GCC_CR', 'IAR')),
|
||||||
('LPC2368', ('ARM', 'GCC_ARM')),
|
('LPC2368', ('ARM', 'GCC_ARM')),
|
||||||
('LPC2460', ('GCC_ARM',)),
|
('LPC2460', ('GCC_ARM',)),
|
||||||
('LPC812', ('uARM','IAR')),
|
('LPC812', ('uARM','IAR')),
|
||||||
|
|
|
@ -29,7 +29,7 @@ c['slavePortnum'] = 9989
|
||||||
####### OFFICIAL_MBED_LIBRARY_BUILD
|
####### OFFICIAL_MBED_LIBRARY_BUILD
|
||||||
|
|
||||||
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')),
|
('KL05Z', ('ARM', 'uARM', 'GCC_ARM')),
|
||||||
('KL25Z', ('ARM', 'GCC_ARM')),
|
('KL25Z', ('ARM', 'GCC_ARM')),
|
||||||
('LPC11U24', ('ARM', 'uARM')),
|
('LPC11U24', ('ARM', 'uARM')),
|
||||||
|
@ -45,7 +45,7 @@ OFFICIAL_MBED_LIBRARY_BUILD = (
|
||||||
('NUCLEO_L152RE', ('ARM', 'uARM')),
|
('NUCLEO_L152RE', ('ARM', 'uARM')),
|
||||||
('NUCLEO_F401RE', ('ARM', 'uARM')),
|
('NUCLEO_F401RE', ('ARM', 'uARM')),
|
||||||
('NUCLEO_F030R8', ('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',)),
|
# ('NRF51822', ('ARM',)),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -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')
|
|
|
@ -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 $< $@
|
|
||||||
|
|
|
@ -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 $< $@
|
|
||||||
|
|
|
@ -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 $< $@
|
|
||||||
|
|
|
@ -53,9 +53,6 @@ MY_ARM_CLIB = join(ARM_PATH, "lib", "microlib")
|
||||||
# GCC ARM
|
# GCC ARM
|
||||||
GCC_ARM_PATH = ""
|
GCC_ARM_PATH = ""
|
||||||
|
|
||||||
# GCC CodeSourcery
|
|
||||||
GCC_CS_PATH = "C:/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
|
||||||
|
|
||||||
# GCC CodeRed
|
# GCC CodeRed
|
||||||
GCC_CR_PATH = "C:/code_red/RedSuite_4.2.0_349/redsuite/Tools/bin"
|
GCC_CR_PATH = "C:/code_red/RedSuite_4.2.0_349/redsuite/Tools/bin"
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ File format example: test_spec.json:
|
||||||
{
|
{
|
||||||
"targets": {
|
"targets": {
|
||||||
"KL46Z": ["ARM", "GCC_ARM"],
|
"KL46Z": ["ARM", "GCC_ARM"],
|
||||||
"LPC1768": ["ARM", "GCC_ARM", "GCC_CR", "GCC_CS", "IAR"],
|
"LPC1768": ["ARM", "GCC_ARM", "GCC_CR", "IAR"],
|
||||||
"LPC11U24": ["uARM"],
|
"LPC11U24": ["uARM"],
|
||||||
"NRF51822": ["ARM"]
|
"NRF51822": ["ARM"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ def benchmarks():
|
||||||
csv_data.writerow(['Toolchain', "Target", "Benchmark", "code", "data", "bss", "flash"])
|
csv_data.writerow(['Toolchain', "Target", "Benchmark", "code", "data", "bss", "flash"])
|
||||||
|
|
||||||
# Build
|
# 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"]:
|
for mcu in ["LPC1768", "LPC11U24"]:
|
||||||
# Build Libraries
|
# Build Libraries
|
||||||
build_mbed_libs(mcu, toolchain)
|
build_mbed_libs(mcu, toolchain)
|
||||||
|
@ -118,4 +118,4 @@ def compare(t1, t2, target):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
compare("GCC_CR", "GCC_CS", "LPC1768")
|
compare("GCC_CR", "LPC1768")
|
||||||
|
|
|
@ -275,7 +275,7 @@ class LPC1768(LPCTarget):
|
||||||
LPCTarget.__init__(self)
|
LPCTarget.__init__(self)
|
||||||
self.core = "Cortex-M3"
|
self.core = "Cortex-M3"
|
||||||
self.extra_labels = ['NXP', 'LPC176X', 'MBED_LPC1768']
|
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.detect_code = ["1010"]
|
||||||
self.progen_target = 'mbed-lpc1768'
|
self.progen_target = 'mbed-lpc1768'
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ class ARCH_PRO(LPCTarget):
|
||||||
LPCTarget.__init__(self)
|
LPCTarget.__init__(self)
|
||||||
self.core = "Cortex-M3"
|
self.core = "Cortex-M3"
|
||||||
self.extra_labels = ['NXP', 'LPC176X']
|
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.macros = ['TARGET_LPC1768']
|
||||||
self.supported_form_factors = ["ARDUINO"]
|
self.supported_form_factors = ["ARDUINO"]
|
||||||
self.progen_target ='arch-pro'
|
self.progen_target ='arch-pro'
|
||||||
|
@ -294,7 +294,7 @@ class UBLOX_C027(LPCTarget):
|
||||||
LPCTarget.__init__(self)
|
LPCTarget.__init__(self)
|
||||||
self.core = "Cortex-M3"
|
self.core = "Cortex-M3"
|
||||||
self.extra_labels = ['NXP', 'LPC176X']
|
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.macros = ['TARGET_LPC1768']
|
||||||
self.supported_form_factors = ["ARDUINO"]
|
self.supported_form_factors = ["ARDUINO"]
|
||||||
self.progen_target ='ublox-c027'
|
self.progen_target ='ublox-c027'
|
||||||
|
@ -304,7 +304,7 @@ class XBED_LPC1768(LPCTarget):
|
||||||
LPCTarget.__init__(self)
|
LPCTarget.__init__(self)
|
||||||
self.core = "Cortex-M3"
|
self.core = "Cortex-M3"
|
||||||
self.extra_labels = ['NXP', 'LPC176X', 'XBED_LPC1768']
|
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.macros = ['TARGET_LPC1768']
|
||||||
self.detect_code = ["1010"]
|
self.detect_code = ["1010"]
|
||||||
|
|
||||||
|
|
|
@ -153,11 +153,11 @@ class Resources:
|
||||||
# had the knowledge of a list of these directories to be ignored.
|
# had the knowledge of a list of these directories to be ignored.
|
||||||
LEGACY_IGNORE_DIRS = set([
|
LEGACY_IGNORE_DIRS = set([
|
||||||
'LPC11U24', 'LPC1768', 'LPC2368', 'LPC4088', 'LPC812', 'KL25Z',
|
'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 = {
|
LEGACY_TOOLCHAIN_NAMES = {
|
||||||
'ARM_STD':'ARM', 'ARM_MICRO': 'uARM',
|
'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',
|
'IAR': 'IAR',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -740,14 +740,13 @@ class mbedToolchain:
|
||||||
self.notify({'type': 'var', 'key': key, 'val': value})
|
self.notify({'type': 'var', 'key': key, 'val': value})
|
||||||
|
|
||||||
from workspace_tools.settings import ARM_BIN
|
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, CW_EWL_PATH, CW_GCC_PATH
|
||||||
from workspace_tools.settings import IAR_PATH
|
from workspace_tools.settings import IAR_PATH
|
||||||
|
|
||||||
TOOLCHAIN_BIN_PATH = {
|
TOOLCHAIN_BIN_PATH = {
|
||||||
'ARM': ARM_BIN,
|
'ARM': ARM_BIN,
|
||||||
'uARM': ARM_BIN,
|
'uARM': ARM_BIN,
|
||||||
'GCC_ARM': GCC_ARM_PATH,
|
'GCC_ARM': GCC_ARM_PATH,
|
||||||
'GCC_CS': GCC_CS_PATH,
|
|
||||||
'GCC_CR': GCC_CR_PATH,
|
'GCC_CR': GCC_CR_PATH,
|
||||||
'GCC_CW_EWL': CW_EWL_PATH,
|
'GCC_CW_EWL': CW_EWL_PATH,
|
||||||
'GCC_CW_NEWLIB': CW_GCC_PATH,
|
'GCC_CW_NEWLIB': CW_GCC_PATH,
|
||||||
|
@ -755,7 +754,7 @@ TOOLCHAIN_BIN_PATH = {
|
||||||
}
|
}
|
||||||
|
|
||||||
from workspace_tools.toolchains.arm import ARM_STD, ARM_MICRO
|
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_ARM, GCC_CR
|
||||||
from workspace_tools.toolchains.gcc import GCC_CW_EWL, GCC_CW_NEWLIB
|
from workspace_tools.toolchains.gcc import GCC_CW_EWL, GCC_CW_NEWLIB
|
||||||
from workspace_tools.toolchains.iar import IAR
|
from workspace_tools.toolchains.iar import IAR
|
||||||
|
|
||||||
|
@ -763,7 +762,6 @@ TOOLCHAIN_CLASSES = {
|
||||||
'ARM': ARM_STD,
|
'ARM': ARM_STD,
|
||||||
'uARM': ARM_MICRO,
|
'uARM': ARM_MICRO,
|
||||||
'GCC_ARM': GCC_ARM,
|
'GCC_ARM': GCC_ARM,
|
||||||
'GCC_CS': GCC_CS,
|
|
||||||
'GCC_CR': GCC_CR,
|
'GCC_CR': GCC_CR,
|
||||||
'GCC_CW_EWL': GCC_CW_EWL,
|
'GCC_CW_EWL': GCC_CW_EWL,
|
||||||
'GCC_CW_NEWLIB': GCC_CW_NEWLIB,
|
'GCC_CW_NEWLIB': GCC_CW_NEWLIB,
|
||||||
|
|
|
@ -18,7 +18,7 @@ import re
|
||||||
from os.path import join, basename, splitext
|
from os.path import join, basename, splitext
|
||||||
|
|
||||||
from workspace_tools.toolchains import mbedToolchain
|
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, CW_EWL_PATH, CW_GCC_PATH
|
||||||
from workspace_tools.settings import GOANNA_PATH
|
from workspace_tools.settings import GOANNA_PATH
|
||||||
from workspace_tools.hooks import hook_tool
|
from workspace_tools.hooks import hook_tool
|
||||||
|
|
||||||
|
@ -214,11 +214,6 @@ class GCC_CR(GCC):
|
||||||
self.ld += ["-nostdlib"]
|
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):
|
class GCC_CW(GCC):
|
||||||
ARCH_LIB = {
|
ARCH_LIB = {
|
||||||
"Cortex-M0+": "armv6-m",
|
"Cortex-M0+": "armv6-m",
|
||||||
|
|
Loading…
Reference in New Issue