Skip to content

Partner Workshop preparation #189

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

Merged
merged 36 commits into from
Jun 13, 2016
Merged

Partner Workshop preparation #189

merged 36 commits into from
Jun 13, 2016

Conversation

screamerbg
Copy link
Contributor

@screamerbg screamerbg commented Jun 11, 2016

This PR adds:

  • mbed CLI global and local configuration via mbed config [--global] <var> [value]. This allows setting global config like mbed config [--global] protocol ssh which can be overridden by program/local settings, e.g. `mbed config protocol https'. Currently supported configuration options: target, toolchain, protocol, depth, cache
  • Repository index caching. To turn on repository caching you need to set cache location via mbed config --global cache <writable_path>. Issue Should cache modules across apps #154
  • Detection of connected mbed targets via mbed detect (provided by mbed-ls). Issue mbed ls should call mbedls #133
  • List of available targets via mbed compile -S|--supported. Issue mbed compile and mbed export should offer option to list available targets #132
  • Massive improvements to command-specific help, e.g. mbed new --help

Changes:

  • Unified tests/testing related functionality now under mbed test
  • Migrated compile-time configuration system from mbed config to mbed compile --config
  • Global and program mbed CLI configuration now handled through Cfg class.
  • Documentation refresh and alignment with latest command syntax changes/additions

CC @jaustin @thegecko @janjongboom @sg- @bogdanm

Examples:

D:\mbed-os-program> mbed detect
[mbed] Detected LPC1768, port COM6, mounted E:
[mbed] Supported toolchains for LPC1768
+---------+-----------+-----------+-----------+-----------+-----------+
| Target  |    ARM    |  GCC_ARM  |    uARM   |   GCC_CR  |    IAR    |
+---------+-----------+-----------+-----------+-----------+-----------+
| LPC1768 | Supported | Supported | Supported | Supported | Supported |
+---------+-----------+-----------+-----------+-----------+-----------+
Supported targets: 1
Supported toolchains: 5
D:\mbed-os-program> mbed compile --supported

+-----------------------+-----------+-----------+-----------+-----------+-----------+
| Target                |    ARM    |  GCC_ARM  |    uARM   |   GCC_CR  |    IAR    |
+-----------------------+-----------+-----------+-----------+-----------+-----------+
| ARCH_BLE              | Supported | Supported |     -     |     -     |     -     |
| ARCH_BLE_BOOT         | Supported | Supported |     -     |     -     |     -     |
| ARCH_BLE_OTA          | Supported | Supported |     -     |     -     |     -     |
| ARCH_GPRS             | Supported | Supported | Supported | Supported | Supported |
| ARCH_LINK             | Supported | Supported |     -     |     -     |     -     |
| ARCH_LINK_BOOT        | Supported | Supported |     -     |     -     |     -     |
| ARCH_LINK_OTA         | Supported | Supported |     -     |     -     |     -     |
| ARCH_MAX              | Supported | Supported | Supported |     -     |     -     |
| ARCH_PRO              | Supported | Supported | Supported | Supported | Supported |
| ARM_IOTSS_BEID        | Supported |     -     |     -     |     -     |     -     |
| ARM_MPS2_M0           | Supported |     -     |     -     |     -     |     -     |
| ARM_MPS2_M0P          | Supported |     -     |     -     |     -     |     -     |
| ARM_MPS2_M1           | Supported |     -     |     -     |     -     |     -     |
| ARM_MPS2_M3           | Supported |     -     |     -     |     -     |     -     |
| ARM_MPS2_M4           | Supported |     -     |     -     |     -     |     -     |
| ARM_MPS2_M7           | Supported |     -     |     -     |     -     |     -     |
| B96B_F446VE           | Supported | Supported | Supported |     -     | Supported |
| DELTA_DFCM_NNN40      | Supported | Supported |     -     |     -     |     -     |
| DELTA_DFCM_NNN40_BOOT | Supported | Supported |     -     |     -     |     -     |
| DELTA_DFCM_NNN40_OTA  | Supported | Supported |     -     |     -     |     -     |
| DISCO_F051R8          |     -     | Supported |     -     |     -     |     -     |
| DISCO_F100RB          |     -     | Supported |     -     |     -     |     -     |
| DISCO_F303VC          |     -     | Supported |     -     |     -     |     -     |
| DISCO_F334C8          | Supported | Supported | Supported |     -     | Supported |
| DISCO_F401VC          |     -     | Supported |     -     |     -     |     -     |
| DISCO_F407VG          | Supported | Supported | Supported |     -     |     -     |
| DISCO_F429ZI          | Supported | Supported | Supported |     -     | Supported |
| DISCO_F469NI          | Supported | Supported | Supported |     -     | Supported |
| DISCO_F746NG          | Supported | Supported | Supported |     -     | Supported |
| DISCO_L053C8          | Supported | Supported | Supported |     -     | Supported |
| DISCO_L476VG          | Supported | Supported | Supported |     -     | Supported |
| EFM32GG_STK3700       | Supported | Supported | Supported |     -     |     -     |
| EFM32HG_STK3400       |     -     | Supported | Supported |     -     |     -     |
| EFM32LG_STK3600       | Supported | Supported | Supported |     -     |     -     |
| EFM32PG_STK3401       | Supported | Supported | Supported |     -     | Supported |
| EFM32WG_STK3800       | Supported | Supported | Supported |     -     |     -     |
| EFM32ZG_STK3200       |     -     | Supported | Supported |     -     |     -     |
| ELEKTOR_COCORICO      |     -     | Supported | Supported |     -     | Supported |
| ELMO_F411RE           | Supported | Supported | Supported |     -     |     -     |
| HEXIWEAR              | Supported | Supported |     -     |     -     | Supported |
| HRM1017               | Supported | Supported |     -     |     -     |     -     |
| HRM1017_BOOT          | Supported | Supported |     -     |     -     |     -     |
| HRM1017_OTA           | Supported | Supported |     -     |     -     |     -     |
| K20D50M               | Supported | Supported |     -     |     -     | Supported |
| K22F                  | Supported | Supported |     -     |     -     | Supported |
| K64F                  | Supported | Supported |     -     |     -     | Supported |
| K64F_UVISOR           | Supported | Supported |     -     |     -     | Supported |
| KL05Z                 | Supported | Supported | Supported |     -     | Supported |
| KL25Z                 | Supported | Supported |     -     |     -     | Supported |
| KL26Z                 | Supported | Supported |     -     |     -     | Supported |
| KL27Z                 | Supported | Supported |     -     |     -     | Supported |
| KL43Z                 | Supported | Supported |     -     |     -     |     -     |
| KL46Z                 | Supported | Supported |     -     |     -     | Supported |
| LPC1114               | Supported | Supported | Supported | Supported | Supported |
| LPC11C24              | Supported | Supported | Supported |     -     | Supported |
| LPC11U24              | Supported | Supported | Supported |     -     | Supported |
| LPC11U24_301          | Supported | Supported | Supported |     -     | Supported |
| LPC11U34_421          | Supported | Supported | Supported |     -     |     -     |
| LPC11U35_401          | Supported | Supported | Supported | Supported | Supported |
| LPC11U35_501          | Supported | Supported | Supported | Supported | Supported |
| LPC11U35_501_IBDAP    | Supported | Supported | Supported | Supported | Supported |
| LPC11U35_Y5_MBUG      | Supported | Supported | Supported | Supported | Supported |
| LPC11U37H_401         | Supported | Supported | Supported | Supported |     -     |
| LPC11U37_501          | Supported | Supported | Supported | Supported | Supported |
| LPC11U68              | Supported | Supported | Supported | Supported | Supported |
| LPC1347               | Supported | Supported |     -     |     -     | Supported |
| LPC1549               |     -     | Supported | Supported | Supported | Supported |
| LPC1768               | Supported | Supported | Supported | Supported | Supported |
| LPC2368               | Supported | Supported |     -     | Supported |     -     |
| LPC2460               |     -     | Supported |     -     |     -     |     -     |
| LPC4088               | Supported | Supported |     -     | Supported | Supported |
| LPC4088_DM            | Supported | Supported |     -     | Supported | Supported |
| LPC4330_M0            | Supported |     -     |     -     | Supported | Supported |
| LPC4330_M4            | Supported | Supported |     -     | Supported | Supported |
| LPC4337               | Supported |     -     |     -     |     -     |     -     |
| LPC810                |     -     | Supported | Supported |     -     | Supported |
| LPC812                |     -     | Supported | Supported |     -     | Supported |
| LPC824                |     -     | Supported | Supported | Supported | Supported |
| LPCCAPPUCCINO         | Supported | Supported | Supported | Supported | Supported |
| MAX32600MBED          | Supported | Supported |     -     |     -     | Supported |
| MAXWSNENV             | Supported | Supported |     -     |     -     | Supported |
| MICRONFCBOARD         | Supported | Supported | Supported |     -     |     -     |
| MOTE_L152RC           | Supported | Supported | Supported |     -     | Supported |
| MTS_DRAGONFLY_F411RE  | Supported | Supported | Supported |     -     | Supported |
| MTS_GAMBIT            | Supported | Supported |     -     |     -     |     -     |
| MTS_MDOT_F405RG       | Supported | Supported | Supported |     -     | Supported |
| MTS_MDOT_F411RE       | Supported | Supported | Supported |     -     | Supported |
| NRF51822              | Supported | Supported |     -     |     -     |     -     |
| NRF51822_BOOT         | Supported | Supported |     -     |     -     |     -     |
| NRF51822_OTA          | Supported | Supported |     -     |     -     |     -     |
| NRF51822_Y5_MBUG      | Supported | Supported |     -     |     -     |     -     |
| NRF51_DK              | Supported | Supported |     -     |     -     |     -     |
| NRF51_DK_BOOT         | Supported | Supported |     -     |     -     |     -     |
| NRF51_DK_OTA          | Supported | Supported |     -     |     -     |     -     |
| NRF51_DONGLE          | Supported | Supported |     -     |     -     |     -     |
| NRF51_DONGLE_BOOT     | Supported | Supported |     -     |     -     |     -     |
| NRF51_DONGLE_OTA      | Supported | Supported |     -     |     -     |     -     |
| NRF51_MICROBIT        | Supported | Supported |     -     |     -     |     -     |
| NRF51_MICROBIT_B      | Supported | Supported |     -     |     -     |     -     |
| NRF51_MICROBIT_BOOT   | Supported | Supported |     -     |     -     |     -     |
| NRF51_MICROBIT_B_BOOT | Supported | Supported |     -     |     -     |     -     |
| NRF51_MICROBIT_B_OTA  | Supported | Supported |     -     |     -     |     -     |
| NRF51_MICROBIT_OTA    | Supported | Supported |     -     |     -     |     -     |
| NUCLEO_F030R8         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F031K6         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F042K6         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F070RB         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F072RB         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F091RC         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F103RB         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F302R8         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F303K8         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F303RE         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F334R8         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F401RE         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F410RB         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F411RE         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F446RE         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_F746ZG         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_L031K6         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_L053R8         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_L073RZ         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_L152RE         | Supported | Supported | Supported |     -     | Supported |
| NUCLEO_L476RG         | Supported | Supported | Supported |     -     | Supported |
| NZ32_SC151            | Supported | Supported | Supported |     -     |     -     |
| OC_MBUINO             | Supported | Supported | Supported |     -     | Supported |
| RBLAB_BLENANO         | Supported | Supported |     -     |     -     |     -     |
| RBLAB_BLENANO_BOOT    | Supported | Supported |     -     |     -     |     -     |
| RBLAB_BLENANO_OTA     | Supported | Supported |     -     |     -     |     -     |
| RBLAB_NRF51822        | Supported | Supported |     -     |     -     |     -     |
| RBLAB_NRF51822_BOOT   | Supported | Supported |     -     |     -     |     -     |
| RBLAB_NRF51822_OTA    | Supported | Supported |     -     |     -     |     -     |
| RZ_A1H                | Supported | Supported |     -     |     -     | Supported |
| SAMD21G18A            | Supported | Supported | Supported |     -     |     -     |
| SAMD21J18A            | Supported | Supported | Supported |     -     |     -     |
| SAMG55J19             | Supported | Supported | Supported |     -     |     -     |
| SAML21J18A            | Supported | Supported | Supported |     -     |     -     |
| SAMR21G18A            | Supported | Supported | Supported |     -     |     -     |
| SEEED_TINY_BLE        | Supported | Supported |     -     |     -     |     -     |
| SEEED_TINY_BLE_BOOT   | Supported | Supported |     -     |     -     |     -     |
| SEEED_TINY_BLE_OTA    | Supported | Supported |     -     |     -     |     -     |
| SSCI824               |     -     | Supported | Supported |     -     |     -     |
| STM32F3XX             | Supported | Supported | Supported |     -     |     -     |
| STM32F407             | Supported | Supported |     -     |     -     | Supported |
| TEENSY3_1             | Supported | Supported |     -     |     -     |     -     |
| TY51822R3             | Supported | Supported |     -     |     -     |     -     |
| TY51822R3_BOOT        | Supported | Supported |     -     |     -     |     -     |
| TY51822R3_OTA         | Supported | Supported |     -     |     -     |     -     |
| UBLOX_C027            | Supported | Supported | Supported | Supported | Supported |
| UBLOX_C029            | Supported | Supported | Supported |     -     | Supported |
| VK_RZ_A1H             | Supported | Supported |     -     |     -     | Supported |
| WALLBOT_BLE           | Supported | Supported |     -     |     -     |     -     |
| WALLBOT_BLE_BOOT      | Supported | Supported |     -     |     -     |     -     |
| WALLBOT_BLE_OTA       | Supported | Supported |     -     |     -     |     -     |
| WIZWIKI_W7500         | Supported |     -     | Supported |     -     |     -     |
| WIZWIKI_W7500ECO      | Supported |     -     | Supported |     -     |     -     |
| WIZWIKI_W7500P        | Supported |     -     | Supported |     -     |     -     |
| XADOW_M0              | Supported | Supported | Supported | Supported | Supported |
| XBED_LPC1768          | Supported | Supported | Supported | Supported | Supported |
+-----------------------+-----------+-----------+-----------+-----------+-----------+
Supported targets: 159

@screamerbg screamerbg changed the title Global settings and Repo caching Repo caching and Global settings Jun 11, 2016
sam-taylor-arm and others added 4 commits June 12, 2016 00:07
Can we add a link to the testing tools in the testing section?

Also I think we should call out a link to the config docs.
@screamerbg screamerbg changed the title Repo caching and Global settings Partner Workshop preparation Jun 12, 2016
@bridadan
Copy link
Contributor

+1 LGTM

@thegecko
Copy link
Member

Awesome work @screamerbg . I've successfully tried the caching for mbed-os and it's certainly quicker the second time round. I assume it only supports mbed-os projects right now and now classic ones?
Is it possible to run a command to pre-populate the cache, perhaps passing an array of repo URLs we know we will use? This could be used to build the cache as the C9 docker image is created meaning the first project created would also be quick!

else:
return False

def init(path=None):
popen([hg_cmd, 'init'] + ([path] if path else []) + (['-v'] if verbose else ['-q']))

def clone(url, name=None, depth=None, protocol=None):
def clone(url, name=None, depth=None, protocol=None, cache=None):
popen([hg_cmd, 'clone', formaturl(url, protocol), name] + (['-v'] if verbose else ['-q']))
Copy link

Choose a reason for hiding this comment

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

Use --mirror on the clone to a get mirror image of the upsream. Without this there will be situations in which the cache is incomplete. This implies --bare, but that makes sense any way in a cache copy.

@sg- sg- merged commit 9e60c87 into ARMmbed:master Jun 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants