raiden00pl commented on PR #10328:
URL: https://github.com/apache/nuttx/pull/10328#issuecomment-1691614304

   > I understand that the desire is to enable the Cortex M4 core by default, 
but allow the option to disable it at Kconfig-time. However, 
CONFIG_STM32H7_CORTEXM4_DISABLED causes many preprocessor conditionals to be in 
the form #if !defined(CONFIG_STM32H7_CORTEXM4_DISABLED) where the word 
"DISABLED" is very prominent and the ! makes it a double-negative, so we see 
the word "DISABLED" but it really means "ENABLED"... Wouldn't it be better to 
call it CONFIG_STM32H7_CORTEXM4_ENABLED, enable it by default in Kconfig, and 
remove the double-negative from all the preprocessor conditionals? I know it's 
a lot of code churn for nothing, except (hopefully) being a little more clear 
in the future.
   
   I agree, it makes sense. Changed.
   
   > Also it might be nice to add some Documentation to clarify that NuttX 
needs to be built twice, once for each core. Right now, the only documentation 
of this fact is in the PR comments, and someone looking at the code in the 
future will have a difficult time figuring that out. This is already a pretty 
big PR so it's okay to add this kind of Documentation in a separate PR, but 
maybe add at least a comment or a hint somewhere, such as in the ---help--- 
text of ARCH_CHIP_STM32H7 or something?
   
   doc will come later. First we have to solve 
https://github.com/apache/nuttx/issues/10241 to avoid some dirty hacks for 
build process. I assume this PR will only be used with cmake, compiling 2 
images with make is too annoying. 
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to