tmedicci commented on issue #14550:
URL: https://github.com/apache/nuttx/issues/14550#issuecomment-2449953956

   > @tmedicci, thanks for sharing the history.
   > 
   > Can you teach why `arch/risc-v/src/espressif` is confusing people? I can't 
see it because specific names like `arch/risc-v/src/esp32c3` will attract me at 
the first place.
   
   Well, it's more about concepts. See 
[`CONFIG_ARCH_CHIP`](https://github.com/apache/incubator-nuttx/blob/9614e1fed5edfa5343f6f7ab2725b426fa4a0376/arch/risc-v/Kconfig#L483)
 used to set the chip directory for the 
[`nuttx/CMakeLists.txt`](https://github.com/apache/incubator-nuttx/blob/20e03f50cf011b919c2d80dabc46c73703ba966f/CMakeLists.txt#L276),
 and for the board/chip directory at the traditional make-related files, like 
[`nuttx/tools/Config.mk`](https://github.com/apache/incubator-nuttx/blob/e3d7d236189517129b66557342ed1273c84f8ab8/tools/Config.mk#L159):
 these configs refer to sources under `arch/<arch>/src/<chip>` and  
`boards/<arch>/<chip>`. I would expect this behavior to be followed by any 
arch/vendor/chip/. There are no `espressif` chips, and then makes no sense to 
move the common folder to `arch/risc-v/src/espressif`. If a series of chips use 
a common source code base, it makes sense to me it to be under 
`arch/<arch>/src/common` if the code applies to all arch or under `arch/<
 arch>/src/common/<vendor>` if applies to specific vendor.
   
   I understand that it would be technically possible to keep the `esp32c3` and 
the `espressif` folders under the same level, but this creates more effort in 
adjusting the build system and isn't as intuitive as using it under the common 
folder.
   
   My point: don't mess arch, vendors and chips. Currently, the level 
`arch/risc-v/src/` refers to chips (see first paragraph). One possible change 
would be transforming this level into vendors (and we'd have something like 
`arch/risc-v/src/espressif/esp32c3` and `arch/arm/src/stm/stm32f7`, for 
instance) and move chips into it. As you may suppose, that would be a huge 
change (so, that's why we moved `espressif` vendor to the common folder)


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