Skip to content

Conversation

@avi-jois
Copy link
Contributor

Pylink 1.0 has the following breaking change:

@denravonska: Changed .flash() to no longer erase chip on flash; users will now need to ensure they call .erase() prior to flashing a non-erased region of flash.

However, pyOCD doesn't use JLinks's flash routines so there is no call in the codebase to .flash() from pylink. This makes it safe to allow pylink packages with a major version of 1.

@denravonska
Copy link

Worth noting is that JLink itself will erase the affected pages, at least on the devices I've tried it on, so an erase will happen. Just not on a chip level :)

@flit
Copy link
Member

flit commented Feb 28, 2023

Do you think we should bump the minimum pylink version too?

@avi-jois
Copy link
Contributor Author

I don't think it's necessary to bump the minimum version because there's no new feature that's needed, and keeping as wide a dependency range as possible minimizes possible dependency resolution conflicts.

@flit
Copy link
Member

flit commented Feb 28, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@flit
Copy link
Member

flit commented Mar 1, 2023

@avi-jois Do you mind if I rebase your branch so this can be merged? Thanks.

@avi-jois
Copy link
Contributor Author

avi-jois commented Mar 1, 2023 via email

Pylink 1.0 has the following breaking change:

@denravonska: Changed .flash() to no longer erase chip on flash; users will now
need to ensure they call .erase() prior to flashing a non-erased region of
flash.

However, pyOCD doesn't use JLinks's flash routines so there is no call
in the codebase to `.flash()` from `pylink`. This makes it safe to allow
`pylink` packages with a major version of 1.
@flit
Copy link
Member

flit commented Mar 19, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@flit
Copy link
Member

flit commented Mar 19, 2023

Fyi, I bumped the minimum pylink-square version to 1.0. As long as that package follows semantic versioning, this should ensure API compatibility until version 2.0.

@flit
Copy link
Member

flit commented Mar 19, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@flit flit merged commit 48320f7 into pyocd:main Mar 20, 2023
flit added a commit that referenced this pull request Mar 20, 2023
* [Dependencies] Bump Pylink

Pylink 1.0 has the following breaking change:

@denravonska: Changed .flash() to no longer erase chip on flash; users will now
need to ensure they call .erase() prior to flashing a non-erased region of
flash.

However, pyOCD doesn't use JLinks's flash routines so there is no call
in the codebase to `.flash()` from `pylink`. This makes it safe to allow
`pylink` packages with a major version of 1.

* dependencies: require pylink-square>=1.0,<2.0

---------

Co-authored-by: Chris Reed <flit@me.com>
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.

3 participants