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

Chained configurations overrides #593

Closed
haneefdm opened this issue Feb 3, 2022 · 2 comments
Closed

Chained configurations overrides #593

haneefdm opened this issue Feb 3, 2022 · 2 comments

Comments

@haneefdm
Copy link
Collaborator

haneefdm commented Feb 3, 2022

Sometimes, when you have a chained configuration, you might want to override/null a setting for a child. lets say you have something like this in the top-level config.

    "sdvFile": "./data/mysvd.svd",
    "chainedConfigurations": {
        "enabled": true,
        "waitOnEvent": "postInit",
        "lifecycleManagedByParent": true,
        "launches": [
            {
                "name": "Attach Network Core", 
                "folder": "${workspaceFolder}/../net",
                "overrides": {
                  "svdFile": "",
                  "loadFiles": []
                }
            }
        ]
    }

Assume that the configuration"Attach Network Core" has its own "svdFile" specification. The parent is specifying that while launching the child, ignore the setting for "svdFile". The "loadFiles" being an empty set means do not program the device -- ie you can have a child configuration of type "launch" and start debug without re-programming because the parent took care of that already. I have two issues.

  • First I am assuming that this is possible without too much trouble. I will find out soon
  • I have no idea on how to make IntelliSense work for the "overrides". There is so much duplication in package.json already. If anyone knows any VSCode tricks to make life easier, please let me know.

There may be other things like "post..." settings that are different or not applicable to child configurations. The goal is to use existing configurations so that they can be used stand-alone and also be usable in a chained configuration without having to duplicate an entire configuration for minor changes.

The "svdFile" example above may be a bad example because what you might want is to refresh the peripherals regardless of which core halted. But that should be a separate topic.

Btw, the "loadFile" already works this way if you want to avoid programming for any configuration without having to do a whole override....

@haneefdm
Copy link
Collaborator Author

haneefdm commented Jun 1, 2022

Feature is now released in 1.5.1

In addition to overrides, there is also an inherit feature.

@haneefdm haneefdm closed this as completed Jun 1, 2022
@haneefdm
Copy link
Collaborator Author

Note: overrides/inherits work now but only when the "detached": false. Eventually, this should also work when detached is true

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

No branches or pull requests

1 participant