On Fri, Apr 7, 2023 at 9:58 AM Sebastien Lorquet <sebast...@lorquet.fr> wrote:
> Thanks for the notification. > > Your proposal is mostly OK for me, I hope others will send reactions > too. I have just one concern. > > > If I attempt to rephrase the proposal: Starting from a commit in a > future, stm32h7 GPIO definitions will not include speed indications > anymore, and these will have to be added manually in board.h, but ONLY > if the LEGACY_PINMAP is not set? > > > Here is my concern: What will happen if a user (me, probably) builds a > NuttX with this new commit from a full stored defconfig, but does not > regenerate its config prior to rebuilding ? the LEGACY_PINMAP setting > will not be present when building in that case. > > Can we force a config update before starting the build, so the > LEGACY_PINMAP setting will be set to Y automatically in all cases? > > > Also, this has to be documented very clearly, not just the official > release notes for the next release! > > Aditionnally, if LEGACY_PINMAP is set in user config, maybe we can add a > compile time warning in stm32h7/stm32_gpio.c that in the future, users > are required to update their board.h and once done, disable LEGACY_PINMAP ? > > Sebastien I am okay with this and have substantially the same remarks as Sebastien. We should be careful to document it in the release notes, and I have some (still vague) idea how to help people notice this change (and future breaking changes) if they build from a stored full defconfig (meaning a saved .config): Could we add a Kconfig setting that in some way identifies the version of NuttX with which it was created? The idea is that if you load a full defconfig from an earlier release, you could get a build-time warning about breaking changes that happened since that release. Each time we add a breaking change, we would encode/document it in some kind of file that encodes all such breaking changes (at least starting with the release where this feature is introduced) along with logic what to check for each breaking change... So for an example related to STM32 GPIO pin speeds, you load an old saved full .config and try to build with it, and if the config was created with a NuttX version older than X.Y and the arch is STM32 and STM32xx_USE_LEGACY_PINMAP is not set, then the build would output a warning: "Warning: You may need to update your board.h to specify GPIO pin speeds. See PR #XXXX." or something like that. Just an idea to consider... Nathan