Brian Daniels / mbed-tools

Fork of mbed-tools by Morpheus

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers settings.py Source File

settings.py

00001 """
00002 mbed SDK
00003 Copyright (c) 2011-2013 ARM Limited
00004 Licensed under the Apache License, Version 2.0 (the "License");
00005 you may not use this file except in compliance with the License.
00006 You may obtain a copy of the License at
00007     http://www.apache.org/licenses/LICENSE-2.0
00008 Unless required by applicable law or agreed to in writing, software
00009 distributed under the License is distributed on an "AS IS" BASIS,
00010 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00011 See the License for the specific language governing permissions and
00012 limitations under the License.
00013 """
00014 
00015 from os.path import join, abspath, dirname
00016 import logging
00017 
00018 ROOT = abspath(join(dirname(__file__), ".."))
00019 
00020 # These default settings have two purposes:
00021 #    1) Give a template for writing local "private_settings.py"
00022 #    2) Give default initialization fields for the "toolchains.py" constructors
00023 
00024 ##############################################################################
00025 # Build System Settings
00026 ##############################################################################
00027 BUILD_DIR = abspath(join(ROOT, "build"))
00028 
00029 # ARM
00030 armcc = "standalone" # "keil", or "standalone", or "ds-5"
00031 
00032 if armcc == "keil":
00033     ARM_PATH = "C:/Keil_4_54/ARM"
00034     ARM_BIN = join(ARM_PATH, "BIN40")
00035     ARM_INC = join(ARM_PATH, "RV31", "INC")
00036     ARM_LIB = join(ARM_PATH, "RV31", "LIB")
00037 
00038 elif armcc == "standalone":
00039     ARM_PATH = "C:/Program Files/ARM/armcc_4.1_791"
00040     ARM_BIN = join(ARM_PATH, "bin")
00041     ARM_INC = join(ARM_PATH, "include")
00042     ARM_LIB = join(ARM_PATH, "lib")
00043 
00044 elif armcc == "ds-5":
00045     ARM_PATH = "C:/Program Files (x86)/DS-5"
00046     ARM_BIN = join(ARM_PATH, "bin")
00047     ARM_INC = join(ARM_PATH, "include")
00048     ARM_LIB = join(ARM_PATH, "lib")
00049 
00050 ARM_CPPLIB = join(ARM_LIB, "cpplib")
00051 MY_ARM_CLIB = join(ARM_PATH, "lib", "microlib")
00052 
00053 # GCC ARM
00054 GCC_ARM_PATH = ""
00055 
00056 # GCC CodeRed
00057 GCC_CR_PATH = "C:/code_red/RedSuite_4.2.0_349/redsuite/Tools/bin"
00058 
00059 # IAR
00060 IAR_PATH = "C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0/arm"
00061 
00062 # Goanna static analyser. Please overload it in private_settings.py
00063 GOANNA_PATH = "c:/Program Files (x86)/RedLizards/Goanna Central 3.2.3/bin"
00064 
00065 # cppcheck path (command) and output message format
00066 CPPCHECK_CMD = ["cppcheck", "--enable=all"]
00067 CPPCHECK_MSG_FORMAT = ["--template=[{severity}] {file}@{line}: {id}:{message}"]
00068 
00069 BUILD_OPTIONS = []
00070 
00071 # mbed.org username
00072 MBED_ORG_USER = ""
00073 
00074 ##############################################################################
00075 # Test System Settings
00076 ##############################################################################
00077 SERVER_PORT = 59432
00078 SERVER_ADDRESS = "10.2.200.94"
00079 LOCALHOST = "10.2.200.94"
00080 
00081 MUTs = {
00082     "1" : {"mcu": "LPC1768",
00083         "port":"COM41", "disk":'E:\\',
00084         "peripherals": ["TMP102", "digital_loop", "port_loop", "analog_loop", "SD"]
00085     },
00086     "2": {"mcu": "LPC11U24",
00087         "port":"COM42", "disk":'F:\\',
00088         "peripherals":  ["TMP102", "digital_loop", "port_loop", "SD"]
00089     },
00090     "3" : {"mcu": "KL25Z",
00091         "port":"COM43", "disk":'G:\\',
00092         "peripherals":  ["TMP102", "digital_loop", "port_loop", "analog_loop", "SD"]
00093     },
00094 }
00095 
00096 ##############################################################################
00097 # Private Settings
00098 ##############################################################################
00099 try:
00100     # Allow to overwrite the default settings without the need to edit the
00101     # settings file stored in the repository
00102     from mbed_settings import *
00103 except ImportError:
00104     print '[WARNING] Using default settings. Define your settings in the file "./mbed_settings.py"'