Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLE: Cordio build time configuration through mbed_lib.json #9813

Merged
merged 8 commits into from Feb 25, 2019

Conversation

paul-szczepanek-arm
Copy link
Member

Description

This doesn't change anything but provides an easy to find entry point to configure the Cordio stack.

Pull request type

[ ] Fix
[x] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@pan-
@donatieng

Release Notes

This doesn't remove the old Cordio stack config file and merely sits on top so will not introduce any unexpected changes. In case users modified the cfg files themselves (in features\FEATURE_BLE\targets\TARGET_CORDIO\stack\cordio_stack\ble-host\sources\stack\cfg) they will have to resolve the conflict.

@paul-szczepanek-arm paul-szczepanek-arm changed the title Cordio cfg BLE: Cordio build time configuration through mbed_lib.json Feb 22, 2019
@ciarmcom ciarmcom requested review from donatieng, pan- and a team February 22, 2019 12:00
@ciarmcom
Copy link
Member

@paul-szczepanek-arm, thank you for your changes.
@donatieng @pan- @ARMmbed/mbed-os-pan @ARMmbed/mbed-os-maintainers please review.

Copy link
Member

@pan- pan- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For maintenance wouldn't it make more sense to export config with names equal to the one used in cfg_stack.h. I would avoid modification of cfg_stack.h

@pan-
Copy link
Member

pan- commented Feb 25, 2019

@0xc0170 we need the 5.12 tag.

"cordio-cfg-max-connections": {
"help": "Maximum number of connections",
"value": 3,
"macro_name": "CORDIO_CFG_MAX_CONNECTIONS"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My assumption is using macro_name to overwrite the default one - length ? Or why?

@paul-szczepanek-arm
Copy link
Member Author

OK, I think this implements both of your comments.

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 25, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Feb 25, 2019

Test run: FAILED

Summary: 3 of 8 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-IAR
  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@pan-
Copy link
Member

pan- commented Feb 25, 2019

13:24:26 13:24:26 [CY8CKIT_062_4343W:IAR] [examples] Running shell script
13:24:26 13:24:26 [CY8CKIT_062_4343W:IAR] + python -u ../mbed-os/tools/test/examples/examples.py compile IAR --mcu CY8CKIT_062_4343W
[Pipeline] [CY8CKIT_062_WIFI_BT:IAR] }
[Pipeline] [CY8CKIT_062_WIFI_BT:IAR] // dir
[Pipeline] [CY8CKIT_062_WIFI_BT:IAR] echo
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] Failed in examples compile hudson.AbortException: script returned exit code 1

That is not a helpful message.
@paul-szczepanek-arm could you check the command that failed ?

Edit: the log is issued latter actually:

13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] [examples] Running shell script
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] + tail -n 100 mbed-os_examples_compile_CY8CKIT_062_WIFI_BT_IAR.log
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] 
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] Compiling example repos....
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] 
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] Compiling mbed-os-example-blinky for CY8CKIT_062_WIFI_BT, IAR
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] [mbed] WARNING: Could not find mbed program in current path "/builds/ws/mbed-os-ci_build-IAR/examples/mbed-os-example-blinky".
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]        You can fix this by calling "mbed new ." in the root of your program.
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] ---
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] [mbed] WARNING: Missing Python modules were not auto-installed.
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]        The Mbed OS tools in this program require the following Python modules: colorama, urllib3, prettytable, junit_xml, pyyaml, jsonschema, future, six, mbed_cloud_sdk, requests, idna, pyserial, jinja2, intelhex, intervaltree, mbed_ls, mbed_host_tests, mbed_greentea, beautifulsoup4, fuzzywuzzy, pyelftools, manifest_tool, icetea, pycryptodome
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]        You can install all missing modules by running "pip install -r requirements.txt" in "/builds/ws/mbed-os-ci_build-IAR/examples/mbed-os-example-blinky/mbed-os"
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]        On Posix systems (Linux, etc) you might have to switch to superuser account or use "sudo"
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] ---
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] Building project mbed-os-example-blinky (CY8CKIT_062_WIFI_BT, IAR)
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] Scan: mbed-os-example-blinky
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] Error parsing './mbed-os/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json': Expecting property name enclosed in double quotes: line 52 column 9 (char 1912)
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] Traceback (most recent call last):
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]   File "/builds/ws/mbed-os-ci_build-IAR/examples/mbed-os-example-blinky/mbed-os/tools/make.py", line 74, in wrapped_build_project
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]     src_dir, build_dir, mcu, *args, **kwargs
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]   File "/builds/ws/mbed-os-ci_build-IAR/examples/mbed-os-example-blinky/mbed-os/tools/build_api.py", line 545, in build_project
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]     src_paths, toolchain, inc_dirs=inc_dirs)
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]   File "/builds/ws/mbed-os-ci_build-IAR/examples/mbed-os-example-blinky/mbed-os/tools/resources/__init__.py", line 569, in scan_with_toolchain
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]     toolchain.config.load_resources(self)
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]   File "/builds/ws/mbed-os-ci_build-IAR/examples/mbed-os-example-blinky/mbed-os/tools/config/__init__.py", line 1292, in load_resources
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]     f.path for f in resources.get_file_refs(FileType.JSON)
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]   File "/builds/ws/mbed-os-ci_build-IAR/examples/mbed-os-example-blinky/mbed-os/tools/config/__init__.py", line 553, in add_config_files
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]     raise ConfigException(str(exc))
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] ConfigException: Expecting property name enclosed in double quotes: line 52 column 9 (char 1912)
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] [mbed] ERROR: "/builds/ws/mbed-os-ci_build-IAR/pyenv/bin/python" returned error.
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]        Code: 1
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]        Path: "/builds/ws/mbed-os-ci_build-IAR/examples/mbed-os-example-blinky"
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]        Command: "/builds/ws/mbed-os-ci_build-IAR/pyenv/bin/python -u /builds/ws/mbed-os-ci_build-IAR/examples/mbed-os-example-blinky/mbed-os/tools/make.py -t IAR -m CY8CKIT_062_WIFI_BT --source . --build ./BUILD/CY8CKIT_062_WIFI_BT/IAR -v"
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR]        Tip: You could retry the last command with "-v" flag for verbose output
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] ---
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] [mbed] Working path "/builds/ws/mbed-os-ci_build-IAR/examples/mbed-os-example-blinky" (directory)
13:24:27 13:24:27 [CY8CKIT_062_WIFI_BT:IAR] [mbed] Exec "/builds/ws/mbed-os-ci_build-IAR/pyenv/bin/python -u /builds/ws/mbed-os-ci_build-IAR/examples/mbed-os-example-blinky/mbed-os/tools/make.py -t IAR -m CY8CKIT_062_WIFI_BT --source . --build ./BUILD/CY8CKIT_062_WIFI_BT/IAR -v" in "/builds/ws/mbed-os-ci_build-IAR/examples/mbed-os-example-blinky"

},
"desired-att-mtu": {
"help": "Desired ATT_MTU, this needs to be between 23 and 517 (inclusive).",
"value": 23,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"value": 23,
"value": 23

},
"max-prepared-writes": {
"help": "Number of queued prepare writes supported by server.",
"value": 4,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"value": 4,
"value": 4

@adbridge
Copy link
Contributor

ci restarted

@paul-szczepanek-arm
Copy link
Member Author

paul-szczepanek-arm commented Feb 25, 2019

I'd wait! you guys are just too fast for me

@adbridge
Copy link
Contributor

OK i have killed the job! @paul-szczepanek-arm please let us know when it is ready

@paul-szczepanek-arm
Copy link
Member Author

Apologies, it's good to go.

@cmonr
Copy link
Contributor

cmonr commented Feb 25, 2019

Will wait on Travis CI to complete before restarting.

@cmonr
Copy link
Contributor

cmonr commented Feb 25, 2019

CI started

@cmonr cmonr added the risk: G label Feb 25, 2019
@mbed-ci
Copy link

mbed-ci commented Feb 25, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 3
Build artifacts

@cmonr cmonr merged commit d0881ad into ARMmbed:master Feb 25, 2019
@danger4386
Copy link

Is it possible to configure this value in a custom_targets.json file?

@danger4386
Copy link

You can configure this parameter similar to others using the mbed_app.json:

{
"target_overrides": {
"*": {
"cordio.desired-att-mtu": 66,
"cordio.rx-acl-buffer-size": 70
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants