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

cmake: flash: three runners.yaml fixes #23027

Merged
merged 1 commit into from
Feb 24, 2020

Conversation

mbolivar
Copy link
Contributor

@mbolivar mbolivar commented Feb 21, 2020

There are three problems with the way runners.yaml is being created:

  1. The dictionary which contains the arguments for each runner is
    using the runner's name converted to a C identifier instead of the
    runner's name itself. That causes west flash to fail when the two
    are different, e.g. for 'misc-flasher' (runner name), which is
    different than 'misc_flasher' (runner name as C identifier)

  2. We need to make sure that the dictionary key maps to an empty list
    if there are no arguments, which normally doesn't happen since the
    runner usually at least takes the path of the file to flash or debug.
    It does happen in the case of misc-flasher, though, since the whole
    point of that runner is that it's an escape hatch for people with
    out of tree scripts that nevertheless want 'west flash' integration
    for things like sanitycheck device testing.

  3. A copy/paste error is setting the debug runner to the flash runner.

Fix them all.

Fixes: #23004

@mbolivar mbolivar added the bug The issue is a bug, or the PR is fixing a bug label Feb 21, 2020
@mbolivar mbolivar added this to the v2.2.0 milestone Feb 21, 2020
cmake/flash/CMakeLists.txt Outdated Show resolved Hide resolved
There are two problems with the way runners.yaml is being created:

1. The dictionary which contains the arguments for each runner is
   using the runner's name converted to a C identifier instead of the
   runner's name itself. That causes west flash to fail when the two
   are different, e.g. for 'misc-flasher' (runner name), which is
   different than 'misc_flasher' (runner name as C identifier)

2. We need to make sure that the dictionary key maps to an empty list
   if there are no arguments, which normally doesn't happen since the
   runner usually at least takes the path of the file to flash or debug.
   It does happen in the case of misc-flasher, though, since the whole
   point of that runner is that it's an escape hatch for people with
   out of tree scripts that nevertheless want 'west flash' integration
   for things like sanitycheck device testing.

3. A copy/paste error is setting the debug runner to the flash runner.

Fix them all.

Fixes: zephyrproject-rtos#23004
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
@mbolivar mbolivar changed the title cmake: flash: two runners.yaml fixes cmake: flash: three runners.yaml fixes Feb 21, 2020
@mbolivar mbolivar requested a review from carlescufi February 21, 2020 21:38
Copy link
Member

@carlescufi carlescufi left a comment

Choose a reason for hiding this comment

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

Tested, works for me. Thanks!

@mbolivar mbolivar requested a review from jhedberg February 21, 2020 23:27
Copy link
Collaborator

@chen-png chen-png left a comment

Choose a reason for hiding this comment

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

tested, it solved #23004.

@jhedberg jhedberg merged commit e4479e2 into zephyrproject-rtos:master Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't use west to flash test images into up_squared board.
7 participants