-
Notifications
You must be signed in to change notification settings - Fork 146
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
Kconfig: Create Kconfig framework for mcux-sdk #42
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Susan Su <susan.su@nxp.com>
We do not accept contributions to files under CMSIS, these files are sourced from https://github.com/ARM-software/CMSIS_5, please contribute to the upstream directly. |
@FelixWang47831, for your information, since your previous commit change in #14 and #38 are all included in this new PR, I will close previous PR. Paste Felix's suggestion for how to use the kconfig framework. Install kconfig lib(Python version compatibility: 2.7/3.2+): pip(3) install kconfiglib |
Review comments from @dleach02, the kconfig.xx needs to be updated to "Kconfig.xx" |
I will also add that if this is intended for future integration with Zephyr that Zephyr appears to have a style to keep the Kconfig variable names all CAPS. We should follow that implicit style. |
@@ -0,0 +1,115 @@ | |||
# Copyright 2021 NXP |
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.
USE all caps for Kconfig variables.
|
||
menu "CMSIS" | ||
|
||
config USE_CMSIS_Include_core_cm |
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.
You should keep the symmetry of of the variable names. So we start with "HAS_MCUX_SDK_" then on the enablement use "MCU_SDK_". This clarifies the relationship.
Also the "USE" verb is not a style within Zephyr so I would not apply it here. Just stick with "MCU_SDK_" as the enablement flag.
@@ -49,68 +49,68 @@ list(APPEND CMAKE_MODULE_PATH | |||
|
|||
|
|||
# Copy the cmake components into projects |
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.
Why can't there be a generic top level cmake file for the drivers and components instead of one per device?
If you look at how Zephyr does this, there is a generic "HAS_MCUX_" then a generic "MCUX_" to enable it. The cmake is then at a higher level keeping the lower level device stuff to be very specific to the device.
menu "codec" | ||
|
||
depends on HAS_MCUX_SDK_component_ak4497_adapter || HAS_MCUX_SDK_component_codec_adapters || HAS_MCUX_SDK_component_cs42448_adapter || HAS_MCUX_SDK_component_cs42888_adapter || HAS_MCUX_SDK_component_da7212_adapter || HAS_MCUX_SDK_component_tfa9896_adapter || HAS_MCUX_SDK_component_tfa9xxx_adapter || HAS_MCUX_SDK_component_wm8524_adapter || HAS_MCUX_SDK_component_wm8904_adapter || HAS_MCUX_SDK_component_wm8960_adapter || HAS_MCUX_SDK_component_codec_i2c_LPC51U68 || HAS_MCUX_SDK_component_codec_i2c_LPC54114_cm4 || HAS_MCUX_SDK_component_codec_i2c_LPC54628 || HAS_MCUX_SDK_component_codec_i2c_LPC54S018 || HAS_MCUX_SDK_component_codec_i2c_LPC54S018M || HAS_MCUX_SDK_component_codec_i2c_LPC55S16 || HAS_MCUX_SDK_component_codec_i2c_LPC55S28 || HAS_MCUX_SDK_component_codec_i2c_LPC55S69_cm33_core0 || HAS_MCUX_SDK_component_codec_i2c_MCIMX7U5 || HAS_MCUX_SDK_component_codec_i2c_MIMX8ML8 || HAS_MCUX_SDK_component_codec_i2c_MIMX8MM6 || HAS_MCUX_SDK_component_codec_i2c_MIMX8QM6_cm4_core0 || HAS_MCUX_SDK_component_codec_i2c_MIMX8QM6_cm4_core1 || HAS_MCUX_SDK_component_codec_i2c_MIMX8QX6 || HAS_MCUX_SDK_component_codec_i2c_MIMXRT1011 || HAS_MCUX_SDK_component_codec_i2c_MIMXRT1015 || HAS_MCUX_SDK_component_codec_i2c_MIMXRT1021 || HAS_MCUX_SDK_component_codec_i2c_MIMXRT1024 || HAS_MCUX_SDK_component_codec_i2c_MIMXRT1052 || HAS_MCUX_SDK_component_codec_i2c_MIMXRT1062 || HAS_MCUX_SDK_component_codec_i2c_MIMXRT1064 || HAS_MCUX_SDK_component_codec_i2c_MIMXRT1166_cm4 || HAS_MCUX_SDK_component_codec_i2c_MIMXRT1166_cm7 || HAS_MCUX_SDK_component_codec_i2c_MIMXRT1176_cm4 || HAS_MCUX_SDK_component_codec_i2c_MIMXRT1176_cm7 || HAS_MCUX_SDK_component_codec_i2c_MIMXRT595S_cm33 || HAS_MCUX_SDK_component_codec_i2c_MIMXRT685S_cm33 || HAS_MCUX_SDK_component_codec_i2c_MK66F18 || HAS_MCUX_SDK_component_codec_ak4497_adapter || HAS_MCUX_SDK_component_codec_wm8524_adapter | ||
|
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.
This is a bit extreme of a "depends". Is it really necessary?
default n | ||
select USE_device_CMSIS if HAS_MCUX_SDK_device_CMSIS | ||
|
||
config USE_device_startup_K32L3A60_cm0plus |
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.
What is this "device_startup" for?
default n | ||
select USE_device_system_K32L3A60_cm4 if HAS_MCUX_SDK_device_system_K32L3A60_cm4 | ||
|
||
config USE_device_system_K32L3A60_cm0plus |
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.
What is "device_system" for?
Signed-off-by: Susan Su susan.su@nxp.com
Prerequisites
Describe the pull request
A clear and concise description for the change in this Pull Request and which issue is fixed.
Fixes # (issue)
Type of change (please delete options that are not relevant):
Tests
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.