mirror of https://github.com/ARMmbed/mbed-os.git
Move private_settings.py to root mbed_settings.py. Various updates to reflect the path changes
parent
5e6722dbab
commit
87a978c4e8
|
|
@ -7,7 +7,7 @@ dist
|
|||
MANIFEST
|
||||
|
||||
# Private settings
|
||||
private_settings.py
|
||||
mbed_settings.py
|
||||
|
||||
# Default Build Directory
|
||||
.build/
|
||||
|
|
|
|||
|
|
@ -153,9 +153,9 @@ Workspace tools are set of Python scripts used off-line by Mbed SDK team to:
|
|||
Before we can run our first test we need to configure our test environment a little!
|
||||
Now we need to tell workspace tools where our compilers are.
|
||||
|
||||
* Please to go ```mbed/tools/``` directory and create empty file called ```private_settings.py```.
|
||||
* Please to go ```mbed``` directory and create empty file called ```mbed_settings.py```.
|
||||
```
|
||||
$ touch private_settings.py
|
||||
$ touch mbed_settings.py
|
||||
```
|
||||
* Populate this file the Python code below:
|
||||
```python
|
||||
|
|
@ -203,10 +203,10 @@ GCC_CR_PATH = "C:/Work/toolchains/LPCXpresso_6.1.4_194/lpcxpresso/tools/bin"
|
|||
IAR_PATH = "C:/Work/toolchains/iar_6_5/arm"
|
||||
```
|
||||
|
||||
Note: Settings in ```private_settings.py``` will overwrite variables with default values in ```mbed/tools/settings.py``` file.
|
||||
Note: Settings in ```mbed_settings.py``` will overwrite variables with default values in ```mbed/default_settings.py``` file.
|
||||
|
||||
## Build Mbed SDK library from sources
|
||||
Let's build mbed SDK library off-line from sources using your compiler. We've already cloned mbed SDK sources, we've also installed compilers and added their paths to ```private_settings.py```.
|
||||
Let's build mbed SDK library off-line from sources using your compiler. We've already cloned mbed SDK sources, we've also installed compilers and added their paths to ```mbed_settings.py```.
|
||||
We now should be ready to use workspace tools script ```build.py``` to compile and build mbed SDK from sources.
|
||||
|
||||
We are still using console. You should be already in ```mbed/tools/``` directory if not go to ```mbed/tools/``` and type below command:
|
||||
|
|
|
|||
|
|
@ -492,7 +492,7 @@ $ git clone https://github.com/mbedmicro/mbed.git
|
|||
$ hg clone https://mbed.org/users/rgrover1/code/cpputest/
|
||||
```
|
||||
|
||||
After above three steps you should have proper directory structure. All you need to do now is to configure your ```private_settings.py``` in ```mbed/tools/``` directory. Please refer to mbed SDK build script documentation for details.
|
||||
After above three steps you should have proper directory structure. All you need to do now is to configure your ```mbed_settings.py``` in ```mbed``` directory. Please refer to mbed SDK build script documentation for details.
|
||||
|
||||
## CppUTest with mbed port
|
||||
To make sure you actualy have CppUTest library with mbed SDK port you can go to CppUTest ```armcc``` platform directory:
|
||||
|
|
|
|||
16
setup.py
16
setup.py
|
|
@ -16,17 +16,17 @@ DESCRIPTION = """A set of Python scripts that can be used to compile programs wr
|
|||
OWNER_NAMES = 'emilmont, bogdanm'
|
||||
OWNER_EMAILS = 'Emilio.Monti@arm.com, Bogdan.Marinescu@arm.com'
|
||||
|
||||
# If private_settings.py exists in tools, read it in a temporary file
|
||||
# If mbed_settings.py exists in tools, read it in a temporary file
|
||||
# so it can be restored later
|
||||
private_settings = join('tools', 'private_settings.py')
|
||||
mbed_settings = join('mbed_settings.py')
|
||||
backup = None
|
||||
if isfile(private_settings):
|
||||
if isfile(mbed_settings):
|
||||
backup = TemporaryFile()
|
||||
with open(private_settings, "rb") as f:
|
||||
with open(mbed_settings, "rb") as f:
|
||||
copyfileobj(f, backup)
|
||||
|
||||
# Create the correct private_settings.py for the distribution
|
||||
with open(private_settings, "wt") as f:
|
||||
# Create the correct mbed_settings.py for the distribution
|
||||
with open(mbed_settings, "wt") as f:
|
||||
f.write("from mbed_settings import *\n")
|
||||
|
||||
setup(name='mbed-tools',
|
||||
|
|
@ -42,8 +42,8 @@ setup(name='mbed-tools',
|
|||
license=LICENSE,
|
||||
install_requires=["PrettyTable>=0.7.2", "PySerial>=2.7", "IntelHex>=1.3", "colorama>=0.3.3", "Jinja2>=2.7.3", "project-generator>=0.8.11,<0.9.0", "junit-xml", "requests", "pyYAML"])
|
||||
|
||||
# Restore previous private_settings if needed
|
||||
# Restore previous mbed_settings if needed
|
||||
if backup:
|
||||
backup.seek(0)
|
||||
with open(private_settings, "wb") as f:
|
||||
with open(mbed_settings, "wb") as f:
|
||||
copyfileobj(backup, f)
|
||||
|
|
|
|||
|
|
@ -286,20 +286,20 @@ from buildbot.config import BuilderConfig
|
|||
|
||||
c['builders'] = []
|
||||
|
||||
copy_private_settings = ShellCommand(name = "copy private_settings.py",
|
||||
command = "cp ../private_settings.py tools/private_settings.py",
|
||||
copy_mbed_settings = ShellCommand(name = "copy mbed_settings.py",
|
||||
command = "cp ../mbed_settings.py mbed_settings.py",
|
||||
haltOnFailure = True,
|
||||
description = "Copy private_settings.py")
|
||||
description = "Copy mbed_settings.py")
|
||||
|
||||
mbed_build_release = BuildFactory()
|
||||
mbed_build_release.addStep(git_clone)
|
||||
mbed_build_release.addStep(copy_private_settings)
|
||||
mbed_build_release.addStep(copy_mbed_settings)
|
||||
|
||||
for target_name, toolchains in OFFICIAL_MBED_LIBRARY_BUILD:
|
||||
builder_name = "All_TC_%s" % target_name
|
||||
mbed_build = BuildFactory()
|
||||
mbed_build.addStep(git_clone)
|
||||
mbed_build.addStep(copy_private_settings)
|
||||
mbed_build.addStep(copy_mbed_settings)
|
||||
# Adding all chains for target
|
||||
for toolchain in toolchains:
|
||||
build_py = BuildCommand(name = "Build %s using %s" % (target_name, toolchain),
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import socket
|
|||
import string, random
|
||||
from time import time
|
||||
|
||||
from private_settings import SERVER_ADDRESS
|
||||
from mbed_settings import SERVER_ADDRESS
|
||||
|
||||
ECHO_PORT = 7
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
from SocketServer import BaseRequestHandler, TCPServer
|
||||
from time import time
|
||||
|
||||
from private_settings import LOCALHOST
|
||||
from mbed_settings import LOCALHOST
|
||||
|
||||
MAX_INDEX = 126
|
||||
MEGA = float(1024 * 1024)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ from os.path import join, abspath, dirname
|
|||
ROOT = abspath(join(dirname(__file__), "..", ".."))
|
||||
sys.path.insert(0, ROOT)
|
||||
|
||||
from tools.private_settings import LOCALHOST
|
||||
from mbed_settings import LOCALHOST
|
||||
from SocketServer import BaseRequestHandler, TCPServer
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ from socket import socket, AF_INET, SOCK_DGRAM
|
|||
import string, random
|
||||
from time import time
|
||||
|
||||
from private_settings import CLIENT_ADDRESS
|
||||
from mbed_settings import CLIENT_ADDRESS
|
||||
|
||||
ECHO_PORT = 7
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
"""
|
||||
from SocketServer import BaseRequestHandler, UDPServer
|
||||
from private_settings import SERVER_ADDRESS
|
||||
from mbed_settings import SERVER_ADDRESS
|
||||
|
||||
class UDP_EchoHandler(BaseRequestHandler):
|
||||
def handle(self):
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ from tools.targets import TARGET_MAP
|
|||
from tools.options import get_default_options_parser
|
||||
from tools.build_api import build_project
|
||||
try:
|
||||
import tools.private_settings as ps
|
||||
import mbed_settings as ps
|
||||
except:
|
||||
ps = object()
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ from tools.targets import TARGET_NAMES
|
|||
from tools.libraries import LIBRARIES
|
||||
|
||||
try:
|
||||
import tools.private_settings as ps
|
||||
import mbed_settings as ps
|
||||
except:
|
||||
ps = object()
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ if __name__ == '__main__':
|
|||
args_error(parser, "[ERROR] specify either '-n' or '-p', not both")
|
||||
if n:
|
||||
if not n in TEST_MAP.keys():
|
||||
# Check if there is an alias for this in private_settings.py
|
||||
# Check if there is an alias for this in mbed_settings.py
|
||||
if getattr(ps, "test_alias", None) is not None:
|
||||
alias = ps.test_alias.get(n, "")
|
||||
if not alias in TEST_MAP.keys():
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import logging
|
|||
ROOT = abspath(join(dirname(__file__), ".."))
|
||||
|
||||
# These default settings have two purposes:
|
||||
# 1) Give a template for writing local "private_settings.py"
|
||||
# 1) Give a template for writing local "mbed_settings.py"
|
||||
# 2) Give default initialization fields for the "toolchains.py" constructors
|
||||
|
||||
##############################################################################
|
||||
|
|
@ -59,7 +59,7 @@ 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 private_settings.py
|
||||
# Goanna static analyser. Please overload it in mbed_settings.py
|
||||
GOANNA_PATH = "c:/Program Files (x86)/RedLizards/Goanna Central 3.2.3/bin"
|
||||
|
||||
# cppcheck path (command) and output message format
|
||||
|
|
|
|||
|
|
@ -1732,7 +1732,7 @@ def get_default_test_options_parser():
|
|||
parser.add_option('-M', '--MUTS',
|
||||
dest='muts_spec_filename',
|
||||
metavar="FILE",
|
||||
help='Points to file with MUTs specification (overwrites settings.py and private_settings.py)')
|
||||
help='Points to file with MUTs specification (overwrites settings.py and mbed_settings.py)')
|
||||
|
||||
parser.add_option("-j", "--jobs",
|
||||
dest='jobs',
|
||||
|
|
|
|||
|
|
@ -1142,10 +1142,10 @@ GROUPS = {
|
|||
GROUPS["rtos"] = [test["id"] for test in TESTS if test["id"].startswith("RTOS_")]
|
||||
GROUPS["net"] = [test["id"] for test in TESTS if test["id"].startswith("NET_")]
|
||||
GROUPS["automated"] = [test["id"] for test in TESTS if test.get("automated", False)]
|
||||
# Look for 'TEST_GROUPS' in private_settings.py and update the GROUPS dictionary
|
||||
# Look for 'TEST_GROUPS' in mbed_settings.py and update the GROUPS dictionary
|
||||
# with the information in test_groups if found
|
||||
try:
|
||||
from tools.private_settings import TEST_GROUPS
|
||||
from mbed_settings import TEST_GROUPS
|
||||
except:
|
||||
TEST_GROUPS = {}
|
||||
GROUPS.update(TEST_GROUPS)
|
||||
|
|
|
|||
Loading…
Reference in New Issue