Clone of official tools
settings.py@0:66f3b5499f7f, 2016-05-19 (annotated)
- Committer:
- screamer
- Date:
- Thu May 19 19:44:41 2016 +0100
- Revision:
- 0:66f3b5499f7f
- Child:
- 3:02a8b145dcb7
Initial revision
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
screamer | 0:66f3b5499f7f | 1 | """ |
screamer | 0:66f3b5499f7f | 2 | mbed SDK |
screamer | 0:66f3b5499f7f | 3 | Copyright (c) 2011-2013 ARM Limited |
screamer | 0:66f3b5499f7f | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
screamer | 0:66f3b5499f7f | 5 | you may not use this file except in compliance with the License. |
screamer | 0:66f3b5499f7f | 6 | You may obtain a copy of the License at |
screamer | 0:66f3b5499f7f | 7 | http://www.apache.org/licenses/LICENSE-2.0 |
screamer | 0:66f3b5499f7f | 8 | Unless required by applicable law or agreed to in writing, software |
screamer | 0:66f3b5499f7f | 9 | distributed under the License is distributed on an "AS IS" BASIS, |
screamer | 0:66f3b5499f7f | 10 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
screamer | 0:66f3b5499f7f | 11 | See the License for the specific language governing permissions and |
screamer | 0:66f3b5499f7f | 12 | limitations under the License. |
screamer | 0:66f3b5499f7f | 13 | """ |
screamer | 0:66f3b5499f7f | 14 | |
screamer | 0:66f3b5499f7f | 15 | from os.path import join, abspath, dirname |
screamer | 0:66f3b5499f7f | 16 | import logging |
screamer | 0:66f3b5499f7f | 17 | |
screamer | 0:66f3b5499f7f | 18 | ROOT = abspath(join(dirname(__file__), "..")) |
screamer | 0:66f3b5499f7f | 19 | |
screamer | 0:66f3b5499f7f | 20 | # These default settings have two purposes: |
screamer | 0:66f3b5499f7f | 21 | # 1) Give a template for writing local "private_settings.py" |
screamer | 0:66f3b5499f7f | 22 | # 2) Give default initialization fields for the "toolchains.py" constructors |
screamer | 0:66f3b5499f7f | 23 | |
screamer | 0:66f3b5499f7f | 24 | ############################################################################## |
screamer | 0:66f3b5499f7f | 25 | # Build System Settings |
screamer | 0:66f3b5499f7f | 26 | ############################################################################## |
screamer | 0:66f3b5499f7f | 27 | BUILD_DIR = abspath(join(ROOT, "build")) |
screamer | 0:66f3b5499f7f | 28 | |
screamer | 0:66f3b5499f7f | 29 | # ARM |
screamer | 0:66f3b5499f7f | 30 | armcc = "standalone" # "keil", or "standalone", or "ds-5" |
screamer | 0:66f3b5499f7f | 31 | |
screamer | 0:66f3b5499f7f | 32 | if armcc == "keil": |
screamer | 0:66f3b5499f7f | 33 | ARM_PATH = "C:/Keil_4_54/ARM" |
screamer | 0:66f3b5499f7f | 34 | ARM_BIN = join(ARM_PATH, "BIN40") |
screamer | 0:66f3b5499f7f | 35 | ARM_INC = join(ARM_PATH, "RV31", "INC") |
screamer | 0:66f3b5499f7f | 36 | ARM_LIB = join(ARM_PATH, "RV31", "LIB") |
screamer | 0:66f3b5499f7f | 37 | |
screamer | 0:66f3b5499f7f | 38 | elif armcc == "standalone": |
screamer | 0:66f3b5499f7f | 39 | ARM_PATH = "C:/Program Files/ARM/armcc_4.1_791" |
screamer | 0:66f3b5499f7f | 40 | ARM_BIN = join(ARM_PATH, "bin") |
screamer | 0:66f3b5499f7f | 41 | ARM_INC = join(ARM_PATH, "include") |
screamer | 0:66f3b5499f7f | 42 | ARM_LIB = join(ARM_PATH, "lib") |
screamer | 0:66f3b5499f7f | 43 | |
screamer | 0:66f3b5499f7f | 44 | elif armcc == "ds-5": |
screamer | 0:66f3b5499f7f | 45 | ARM_PATH = "C:/Program Files (x86)/DS-5" |
screamer | 0:66f3b5499f7f | 46 | ARM_BIN = join(ARM_PATH, "bin") |
screamer | 0:66f3b5499f7f | 47 | ARM_INC = join(ARM_PATH, "include") |
screamer | 0:66f3b5499f7f | 48 | ARM_LIB = join(ARM_PATH, "lib") |
screamer | 0:66f3b5499f7f | 49 | |
screamer | 0:66f3b5499f7f | 50 | ARM_CPPLIB = join(ARM_LIB, "cpplib") |
screamer | 0:66f3b5499f7f | 51 | MY_ARM_CLIB = join(ARM_PATH, "lib", "microlib") |
screamer | 0:66f3b5499f7f | 52 | |
screamer | 0:66f3b5499f7f | 53 | # GCC ARM |
screamer | 0:66f3b5499f7f | 54 | GCC_ARM_PATH = "" |
screamer | 0:66f3b5499f7f | 55 | |
screamer | 0:66f3b5499f7f | 56 | # GCC CodeRed |
screamer | 0:66f3b5499f7f | 57 | GCC_CR_PATH = "C:/code_red/RedSuite_4.2.0_349/redsuite/Tools/bin" |
screamer | 0:66f3b5499f7f | 58 | |
screamer | 0:66f3b5499f7f | 59 | # IAR |
screamer | 0:66f3b5499f7f | 60 | IAR_PATH = "C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm" |
screamer | 0:66f3b5499f7f | 61 | |
screamer | 0:66f3b5499f7f | 62 | # Goanna static analyser. Please overload it in private_settings.py |
screamer | 0:66f3b5499f7f | 63 | GOANNA_PATH = "c:/Program Files (x86)/RedLizards/Goanna Central 3.2.3/bin" |
screamer | 0:66f3b5499f7f | 64 | |
screamer | 0:66f3b5499f7f | 65 | # cppcheck path (command) and output message format |
screamer | 0:66f3b5499f7f | 66 | CPPCHECK_CMD = ["cppcheck", "--enable=all"] |
screamer | 0:66f3b5499f7f | 67 | CPPCHECK_MSG_FORMAT = ["--template=[{severity}] {file}@{line}: {id}:{message}"] |
screamer | 0:66f3b5499f7f | 68 | |
screamer | 0:66f3b5499f7f | 69 | BUILD_OPTIONS = [] |
screamer | 0:66f3b5499f7f | 70 | |
screamer | 0:66f3b5499f7f | 71 | # mbed.org username |
screamer | 0:66f3b5499f7f | 72 | MBED_ORG_USER = "" |
screamer | 0:66f3b5499f7f | 73 | |
screamer | 0:66f3b5499f7f | 74 | ############################################################################## |
screamer | 0:66f3b5499f7f | 75 | # Test System Settings |
screamer | 0:66f3b5499f7f | 76 | ############################################################################## |
screamer | 0:66f3b5499f7f | 77 | SERVER_PORT = 59432 |
screamer | 0:66f3b5499f7f | 78 | SERVER_ADDRESS = "10.2.200.94" |
screamer | 0:66f3b5499f7f | 79 | LOCALHOST = "10.2.200.94" |
screamer | 0:66f3b5499f7f | 80 | |
screamer | 0:66f3b5499f7f | 81 | MUTs = { |
screamer | 0:66f3b5499f7f | 82 | "1" : {"mcu": "LPC1768", |
screamer | 0:66f3b5499f7f | 83 | "port":"COM41", "disk":'E:\\', |
screamer | 0:66f3b5499f7f | 84 | "peripherals": ["TMP102", "digital_loop", "port_loop", "analog_loop", "SD"] |
screamer | 0:66f3b5499f7f | 85 | }, |
screamer | 0:66f3b5499f7f | 86 | "2": {"mcu": "LPC11U24", |
screamer | 0:66f3b5499f7f | 87 | "port":"COM42", "disk":'F:\\', |
screamer | 0:66f3b5499f7f | 88 | "peripherals": ["TMP102", "digital_loop", "port_loop", "SD"] |
screamer | 0:66f3b5499f7f | 89 | }, |
screamer | 0:66f3b5499f7f | 90 | "3" : {"mcu": "KL25Z", |
screamer | 0:66f3b5499f7f | 91 | "port":"COM43", "disk":'G:\\', |
screamer | 0:66f3b5499f7f | 92 | "peripherals": ["TMP102", "digital_loop", "port_loop", "analog_loop", "SD"] |
screamer | 0:66f3b5499f7f | 93 | }, |
screamer | 0:66f3b5499f7f | 94 | } |
screamer | 0:66f3b5499f7f | 95 | |
screamer | 0:66f3b5499f7f | 96 | ############################################################################## |
screamer | 0:66f3b5499f7f | 97 | # Private Settings |
screamer | 0:66f3b5499f7f | 98 | ############################################################################## |
screamer | 0:66f3b5499f7f | 99 | try: |
screamer | 0:66f3b5499f7f | 100 | # Allow to overwrite the default settings without the need to edit the |
screamer | 0:66f3b5499f7f | 101 | # settings file stored in the repository |
screamer | 0:66f3b5499f7f | 102 | from mbed_settings import * |
screamer | 0:66f3b5499f7f | 103 | except ImportError: |
screamer | 0:66f3b5499f7f | 104 | print '[WARNING] Using default settings. Define your settings in the file "./mbed_settings.py"' |