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

Start migrating to protobuf board configs #970

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Commits on Oct 17, 2024

  1. Configuration menu
    Copy the full SHA
    9ad0da1 View commit details
    Browse the repository at this point in the history
  2. remove support for legacy configs

    users should migrate to the previous release first, if they want to be
    supported without redoing their config
    bsstephan committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    bad7d31 View commit details
    Browse the repository at this point in the history
  3. support loading the board config if the user config is not present

    this also adds a sanity check for the now-expanded size of the storage
    sections in the flash
    bsstephan committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    b631d2a View commit details
    Browse the repository at this point in the history
  4. remove the build_info for compile-time pin defines

    this is no longer relevant in the protobuf-as-board-config world
    bsstephan committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    51b8301 View commit details
    Browse the repository at this point in the history
  5. break up the board/user config loaders and splice them together

    this lets a board config patched into the binary to specify values that
    are not in the user config, and have them be applied to the user config.
    essentially, on board boot, we now:
    
    1. pb_decode in loadBoardConfig
    2. this loads the defaults
    3. this then populates the structure with values from the board config
    4. pb_decode_ex in loadUserConfig
    5. this does NOT load the defaults
    6. this then splices values from the user config into the structure
    
    the BoardConfig.h files and initUnset... remain, but this will allow us
    to move off of that as we start getting tooling in place for the
    protobuf board configs
    bsstephan committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    e51c50f View commit details
    Browse the repository at this point in the history
  6. DRY the config loader, and always start with initialized config

    it was possible to never call pb_decode to initialize the config with
    defaults (e.g. if both the board and user configs were empty), this
    avoids that, in which case the calls are essentially identical
    bsstephan committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    f96eda9 View commit details
    Browse the repository at this point in the history
  7. start replacing some initUnset... with proto defaults

    I think this is going to be a long road, but this is the kind of thing
    that's possible even without a board config in place
    bsstephan committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    8910179 View commit details
    Browse the repository at this point in the history
  8. add a post-build command to patch board config into .bin/.uf2

    this starts the replacement of BoardConfig.h + migration code with
    shipped protobuf configs. this should help cleanup some code, and one
    day will hopefully replace the need for per-board builds entirely,
    greatly speeding up the GitHub build/creation of board binaries
    bsstephan committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    1cdb7a8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ed1d522 View commit details
    Browse the repository at this point in the history
  10. only patch the UF2, and keep a backup of the old one

    also spit out the summary info just so people can see what happened
    happened
    bsstephan committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    e3935d9 View commit details
    Browse the repository at this point in the history
  11. copy the .proto files into one location before running concatenate

    something about the protoc compiler (maybe just on Python 3.12?) doesn't
    like multiple -P path arguments, and until that's fixed, it's easier to
    just copy the files into one spot, which works fine
    bsstephan committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    b1bfff8 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    441031a View commit details
    Browse the repository at this point in the history