-
Notifications
You must be signed in to change notification settings - Fork 159
Open
Description
From this comment from @tact1m4n3.
In the nordic and wch hals (maybe others) we have the example apps explicitly call board.init().
Maybe we should add logic to microzig_main to call it if its present. It already does this for the app and for the hal.
Makes sense to me, my only real concern is whether this call should supercede an init for the chip/cpu, or be called in addition to it.
- If its the former, then the board init should probably call the chip init, which should probably call the cpu init.
- This grants extra flexibility (A board might opt not to call a chip init, for the reason below)
- But it's also extra boilerplate (more boards should call chip init, which should call cpu init) and duplicated code (they might opt to manually do some work, which is more places to make sure to update)
- If it's the latter, I think we run the risk of some configs doing extra work (best case) or trashing each other.
- For example, a chip setting up RCC to set up the clocks, only for a board, with an external clock, to immediately set them up again with an external clock.
Metadata
Metadata
Assignees
Labels
No labels