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

core: session: load the user script after the board is constructed #1561

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

flit
Copy link
Member

@flit flit commented May 21, 2023

This changes the user script to load after the Board instance is created.

The benefit is that top level objects exist when the script is loaded. Although, they aren't opened/connected/inited, so aren't really useful for much.

The downside is that you can't set target_override inside the script top-level. It can only be set from the yaml config file or command line.

Not sure when this PR will be merged.

It's not clear why, originally, the user script was loaded before the
board is created. In any case, the namespace update on .open() is
retained. Even though all the objects added to the namespace are
available now when the user script is loaded, they aren't really
usable since nothing is opened/connected/inited.
@yyjdelete
Copy link

yyjdelete commented Oct 11, 2023

After this commit, is there still a way to regist a new target without modify files of pyocd, like #981 does?

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.

None yet

2 participants