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

[refactoring] Cleanup for option bytes and flash settings #941

Merged
merged 14 commits into from
Apr 22, 2020

Commits on Apr 20, 2020

  1. stlink.h: document a bit flash types.

    f1 xl should probably merged back into f0, with dual bank bit set.
    grevaillot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    e8503fb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    498de0c View commit details
    Browse the repository at this point in the history
  3. use constant for optkey

    grevaillot committed Apr 20, 2020
    Configuration menu
    Copy the full SHA
    598af1c View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2020

  1. Configuration menu
    Copy the full SHA
    4a28814 View commit details
    Browse the repository at this point in the history
  2. common: add some l0/l1 support in helpers

    give l0/l1 some love - l0/l1 are a bit specific regarding keys,
    bits, and lock registers.
    
    Also make handling of f0/f1 explicit: ultimate goal is to have some
    sanity check and clear codepath in that code in case some new target
    is added - and that the whole code uses these helpers.
    
    some work should be done to refactor a bit the flash register mapping
    based on family, but not yet.
    
    lo lock
    grevaillot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    29cfb7d View commit details
    Browse the repository at this point in the history
  3. update f2 and f4 option read/write code routines

    1) no need to unlock option flash to read it.
    
    "The option byte are always read-accessible and write-protected by default."
    
    current device specific option read code now only differs from generic read code
    by reading option bytes in the flash option byte register instead of option base.
    
    2) f4 and f2 have similar registers : use the same write code, with flash/option lock
    helpers. add flash busy wait and relock at end of access.
    
    3) add f446 option info to chip id
    grevaillot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    2cff67a View commit details
    Browse the repository at this point in the history
  4. update l4 option code to use helpers, based on l496.

    use generic unlock for l4, rename l496 to l4x, add wait flash busy,
    complete chip id for l476 (and other)
    grevaillot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    9e53550 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    70043c4 View commit details
    Browse the repository at this point in the history
  6. update l0/l1 option code:

    merge l0/l1, code is the same except flash base, add wait states and relock
    grevaillot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    f23de87 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c4d9936 View commit details
    Browse the repository at this point in the history
  8. use defines

    grevaillot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    a69a6fb View commit details
    Browse the repository at this point in the history
  9. common: whitespace fixes

    grevaillot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    853468d View commit details
    Browse the repository at this point in the history
  10. common: warn on unsupported access.

    should only happen currently after adding a new flash family.
    grevaillot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    f29e1a6 View commit details
    Browse the repository at this point in the history
  11. write option byte: final refactor

    now that all flash family methods are aligned, refactor
    main method to avoid duplicated lock/unlock, add info traces, and
    map methods based on familly instead of a small subset of selected
    devices.
    
    nb1: f0/f1 support is still missing
    
    nb2: option read/write is still conditioned by presence of option_base
    and option_size in chipid.c, but adding more chips should only be
    a matter of adding these two informations.
    grevaillot committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    8e69625 View commit details
    Browse the repository at this point in the history