-
Notifications
You must be signed in to change notification settings - Fork 17
Mec172x hal 001 #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mec172x hal 001 #13
Conversation
Origin: MCHP https://github.com/MicrochipTech/hal_microchip Status: version 1.3.0 Add Microchip MEC172x HAL header files. Update HAL common headers. Signed-off-by: Scott Worley <[email protected]>
Origin: MCHP https://github.com/MicrochipTech/hal_microchip Status: version 1.3.0 Add Microchip MEC172x HAL header files. Update HAL common headers. Signed-off-by: Scott Worley <[email protected]>
…hip into mec172x_hal_001 Signed-off-by: Scott Worley <[email protected]>
MEC152x keyscan header has a misspelled define being used in a driver. Add misspelled define to MEC172x keyscan header. Signed-off-by: Scott Worley <[email protected]>
Add more defines for the new 32K clock configuration and monitor in the PCR and VBAT register blocks. Signed-off-by: Scott Worley <[email protected]>
Add missing MEC172x ADC register defines. Signed-off-by: Scott Worley <[email protected]>
Update MEC172x basic timer register structure instance names using new naming convention with backwards compatibility where required. Signed-off-by: Scott Worley <[email protected]>
Fix reserved space between MEC172x VBAT registers in register structure. Signed-off-by: Scott Worley <[email protected]>
Can we put these files into the main Zephyr tree? Why is a module needed? |
Having those 12k LoC in a module allows downstream users to exclude them if not using this particular platform. |
Yes I understand that, but why? As soon as we add tests for this code we will need it. 12k LoC is not a lot compared to the >2 million in Zephyr. The disadvantage is that the core code is somewhere else and must be updated with a separate PR, so is harder to keep in step |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be in the main repo
I agree, it would be preferred to add these files to the main Zephyr repo. |
This is not MCHP-specific but it's there for all Zephyr HAL and modules https://docs.zephyrproject.org/latest/guides/modules.html To keep track of specific HALs, and other module/components west is used. |
Does MHCP mean Microchip? If so, it seems that the code in this PR is actually Microchip-specific. If it is not, can you please explain what other microcontrollers use it? |
What I mean is that the module approach/usage is not Microchip-specific. It's the way all HAL and other Zephyr external modules are structured. Check the links given |
@sjg20 is suggesting we move all those new headers into Zephyr and skip the module part completely. In the case of microchip and this new "HAL" it is actually just header files and no code that need to be shimmed, so all of the driver code (.c files) is in the tree and we depend on external headers to build this code. Maybe it is something to consider if the license allows that and if those files are all being used, ie, we should not import files into zephyr that are not used. |
I certainly understand that this is done. I even understand that several vendors do things this way (e.g. STM32), perhaps for historical reasons and for a desire to maintain their code somewhat separate from Zephyr. But I really don't see the point. It just makes things harder IMO, for the reasons I mention above. |
Abandoning. Working on MEC172x downsized header for Zephyr SoC folder. |
Added MEC172x HAL headers. MCHP team generating headers generates complete headers for each chip instead of creating common files;<(