fjpanag commented on pull request #2477:
URL: https://github.com/apache/incubator-nuttx/pull/2477#issuecomment-739254711


   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.
   - 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.
   
   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.
   
   Regarding boards with multiple MCUs.  
   Why is this affecting us? 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.  
   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.


----------------------------------------------------------------
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


Reply via email to