mbed-os/tools/settings.py

111 lines
3.4 KiB
Python
Raw Normal View History

2013-08-06 13:38:00 +00:00
"""
mbed SDK
Copyright (c) 2016 ARM Limited
2013-08-06 13:38:00 +00:00
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
2013-08-06 13:38:00 +00:00
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 os import getenv
from os.path import join, abspath, dirname, exists
import logging
ROOT = abspath(join(dirname(__file__), ".."))
2013-08-15 15:09:12 +00:00
##############################################################################
# Toolchains and Build System Settings
2013-08-15 15:09:12 +00:00
##############################################################################
BUILD_DIR = abspath(join(ROOT, ".build"))
# ARM Compiler 5
ARM_PATH = "C:/Keil_v5/ARM/ARMCC"
# GCC ARM
GCC_ARM_PATH = ""
# 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.3/arm"
# Goanna static analyser. Please overload it in mbed_settings.py
GOANNA_PATH = "c:/Program Files (x86)/RedLizards/Goanna Central 3.2.3/bin"
2013-10-16 13:35:35 +00:00
# cppcheck path (command) and output message format
CPPCHECK_CMD = ["cppcheck", "--enable=all"]
CPPCHECK_MSG_FORMAT = ["--template=[{severity}] {file}@{line}: {id}:{message}"]
BUILD_OPTIONS = []
# mbed.org username
MBED_ORG_USER = ""
##############################################################################
# User Settings (file)
##############################################################################
try:
# Allow to overwrite the default settings without the need to edit the
# settings file stored in the repository
from mbed_settings import *
except ImportError:
pass
##############################################################################
# User Settings (env vars)
##############################################################################
_ENV_PATHS = ['ARM_PATH', 'GCC_ARM_PATH', 'GCC_CR_PATH', 'IAR_PATH']
for _n in _ENV_PATHS:
if getenv(_n):
if exists(getenv(_n)):
globals()[_n] = getenv(_n)
else:
print "WARNING: %s set as environment variable but doesn't exist" % _n
##############################################################################
# ARM Compiler Paths
##############################################################################
ARM_BIN = join(ARM_PATH, "bin")
ARM_INC = join(ARM_PATH, "include")
ARM_LIB = join(ARM_PATH, "lib")
ARM_CPPLIB = join(ARM_LIB, "cpplib")
MY_ARM_CLIB = join(ARM_LIB, "lib", "microlib")
2013-08-15 15:09:12 +00:00
##############################################################################
# Test System Settings
##############################################################################
SERVER_PORT = 59432
SERVER_ADDRESS = "10.2.200.94"
LOCALHOST = "10.2.200.94"
MUTs = {
"1" : {"mcu": "LPC1768",
"port":"COM41", "disk":'E:\\',
"peripherals": ["TMP102", "digital_loop", "port_loop", "analog_loop", "SD"]
},
"2": {"mcu": "LPC11U24",
"port":"COM42", "disk":'F:\\',
"peripherals": ["TMP102", "digital_loop", "port_loop", "SD"]
},
"3" : {"mcu": "KL25Z",
"port":"COM43", "disk":'G:\\',
"peripherals": ["TMP102", "digital_loop", "port_loop", "analog_loop", "SD"]
},
}