Comments (6)
Hi Pieter, in fact the idea of moving from the old configs/ directory to the new boards/ was exactly to let boards to share common code. Maybe to make it clear, the directory should be called ./boards/arm/common/drivers/ and so besides drivers we could have other common things (init/, script/, etc).
Also note that inside each board family (i.e. stm32, nrf52, etc) already exist a drivers/ directory. So I think putting this new drivers/ inside common/ will help to avoid users making mistakes.
Since @jerpelea is was to responsible to this original change, we need to wait for this feedback.
from nuttx.
I am opposed to these kinds of changes. The board directories are customization points and MUST NOT BE MERGED INTO COMMON FILES. That corrupts the modulare architecture of the OS and cannot be permitted.
There are things that are common not particularly customization points (like some USB Host logic). But I would resist strong any willy nilly combination of code just because it looks the same today (it might look different tomorrow, that is the nature of customization points).
I would refer you to the top-level INVIOLABLES.txt under "The Enemies."
109 Sometimes Code Duplication is OK
110 --------------------------------
111
112 o Sometimes is better to duplicate some logic than to introduce coupling
Any rampant combination of logic for now reason than the OCD compulsion to due so must be resisted. What you are proposing WILL damage the OS.
Autoleds, in particular, must not be combined!
Anyone who supports this proposal has no sense or understanding of the NuttX architecture or modularity goals. This would an absolute disaster for the OS!
from nuttx.
Very bad idea. Violates the basic principles or a modular operating system. We cannot consider this.
from nuttx.
Hi Alan,
Thanks for your answer.
@acassis wrote:
Maybe to make it clear, the directory should be called ./boards/arm/common/drivers/ and so besides drivers we could have other common things (init/, script/, etc).
I take it you mean ./boards/arm/common/drivers/
, ./boards/arm/common/init/
, ./boards/arm/common/init/
, etc?
@acassis wrote:
Also note that inside each board family (i.e. stm32, nrf52, etc) already exist a drivers/ directory. So I think putting this new drivers/ inside common/ will help to avoid users making mistakes.
Do you mean that for example a new driver for ./boards/arm/stm32/<newboard>/src/<newdriver>.*
will have to live in ./boards/arm/common/drivers/
, so that ./boards/arm/<stm32variants>/<board>/
can re-use it in a modular way?
from nuttx.
Hi Greg,
Thanks for your answer. I appreciate your point of view.
I do understand that making a braking change in any common place will break all code that uses it.
The trade-off is that changing something, that was copied 50 or more times, takes much more time and is just as error prone as fixing it in a common place.
@patacongo wrote:
The board directories are customization points and MUST NOT BE MERGED INTO COMMON FILES.
.
.
What you are proposing WILL damage the OS.
This was not my intention. I wanted to move common stuff from ./boards/ into a common place inside ./boards/. From my understanding this cannot affect the OS, but it can affect other implementations inside ./boards/
.
I'm sorry if I'm misunderstanding the OS, but am I wrong to argue that ./boards/ is not part of the OS, as ./boards/ has implementations that just use the OS?
from nuttx.
Reducing code duplication is not a priority. Never has been, never will be. Maintaining a strict module, independent architecture where changes in one are does not affect other areas is a high priority. We get there via a modulare, siloed architecture with no sharing between silos.
I am VERY strongly opposed with the urge to combine code for no reason than the other people are obsessed with combining code. It is unhealthy for the OS and will be resisted with every fiber.
There has never been a single case where duplicating code has caused any significant issues. yes, sometimes people have the same problem but that had been corrected in similar code. That happens maybe a couple of times per yeard and is immediately resolved. But combined code has a far worse problem (aside from trashing the architecture): Peoplel change the combined code for their own purposes and break everyone else's platforms. That is no acceptable and will not be allowed to happen (at least any futher that it already has).
This is a bad topic and is not going get you any support. I suggest doing something better with your time. This is unacceptable.
from nuttx.
Related Issues (20)
- nrf9160/nrf9160-dk:modem_ns crash on start HOT 12
- nrf52/ieee802.15.4/6lowpan server crash HOT 1
- speed up CI checks HOT 4
- Adding Board Support in Nuttx: Steps and Requirements HOT 4
- mkrd fail in rc.sysinit HOT 5
- SIM is mounting /tmp as vfat instead of using TMPFS
- NSH I/O redirection and I/O operation doesn't work and incomplete HOT 2
- Cannot Run ESP32C6-devkitm HOT 4
- GitHub Status: Disruption in service with some Redis clusters Jul 31, 2024
- Add esp32c6 power manager feature HOT 3
- [BUG] Just a test HOT 1
- [BUG] kasan read access error in umm_initialize HOT 9
- [BUG] Running lm3s6965-ek:qemu-protected with gdb-multiarch is crashing HOT 5
- [HELP] ESP32 chip revision ERROR HOT 2
- [BUG] ESP32C6 DevKitM spi issue HOT 17
- [FEATURE] Extensible PL011 UART driver HOT 2
- [HELP] Cannot debug esp32c6 using open ocd HOT 8
- [HELP] prompts "undefined referenc to `_impure_prt`" HOT 6
- [FEATURE] Add support for better pre-commit HOT 2
- [HELP] Register setting during booting the OS on ARM A53 FVP HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuttx.