davids5 commented on pull request #2477: URL: https://github.com/apache/incubator-nuttx/pull/2477#issuecomment-739258385
> Hi @davids5 > > Ok, we agree that the naming can change. Neither I like the chosen one, I just couldn't think anything better. > So I can follow your proposition: > > ``` > #define BOARD_STM32F2_VDD 3.3 > /* or */ > #define BOARD_STM32F4_VDD 3.3 > ``` > > Some questions: > > * Is it OK to have a float in these definitions, or shall I change it to mV (and have it 3300)? > * Is the `BOARD_` prefix needed? Please advise about the conventions used. The board the chip is on sets the voltage, If you drop it that information is lost. But I am OK with it, either way. > * Can you think of any better name? I am thinking that we need a name that is easily searchable in the datasheet. Those that don't know what this option is about, shall be able to easily find the information. Unfortunately, the datasheet is not very helpful. It is understood there is a VDD and maybe a VDD_IO for IC's. > > Regarding Kconfig. > I disagree to have this in Kconfig. This is an immutable property of a board, and there is no need to clutter Kconfig with this. It just leaves room for miss-configuration of the users. Did you mean agree? > > Regarding boards with multiple MCUs. > Why is this affecting us? That is correct it is not an issue now, but may become an issues in a complex system and the name space scoped to the cpu family is just clear. >I mean, for every MCU housed on the board, there will be a different build of NuttX, a separate firmware. There is one physical board, but I guess there will be multiple NuttX board packages, each for every MCU on board, and each containing the drivers for the peripheral that the specific MCU is using. Is there a meaning in having multiple definitions in the same board, since there will be two independent builds? (Other definitions, like `STM32_BOARD_XTAL` don't support what you propose). > > Regarding the default value. No. The rule has been that config changes do not change existing behavior and provide the default at it was. > I prefer to revise all board.h files. It's more work, but I am willing to do it. This is because lots of people will use these files as templates for their own custom boards. Thus the "examples" must be complete and advertise all supported features. Not many people will dive into the low-level drivers, to discover about this. > > That being said, I believe the best would be something like: > > ``` > #ifndef BOARD_STM32F4_VDD > #error "MCU Vdd is not defined." > #endif > ``` > > To clearly indicate a missing configuration. While it is true that we could change all the config. The change is to the the default, that is what is was. This will cause ripple that is of zero value in all projects using NuttX, No error should be issues nor is warning is needed, You can add them to the headers and document the setting in all the readme files. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org