boards/esp-based: Model features in Kconfig#14223
Conversation
22ebcc8 to
1dbb1c8
Compare
|
Adapted to the new symbol classification |
1dbb1c8 to
ef19441
Compare
MrKevinWeiss
left a comment
There was a problem hiding this comment.
Looks good, lets see what murdock says. ACK!
|
I guess the correct way to move forward is to set the |
Done |
MrKevinWeiss
left a comment
There was a problem hiding this comment.
Much better, I ACK! If anyone has reservations speak up now, I don't want to leave this too long and it always needing rebasing.
|
Please squash |
gschorcht
left a comment
There was a problem hiding this comment.
Please give me the chance to take a look. Sorry that I'm jumping into the review process so late but I was completely busy the last 3 month with preparing my courses for the ad-hoc online summer term. Now , I'm resuming slowly my work on RIOT. I will have a look in the next view days.
|
Yup and it looks like it needs another rebase. OK I will leave it in @gschorcht hands when he has time. |
1154ba0 to
0d1ee5d
Compare
|
@leandrolanzieri Thank you for contributing this. What was the reason for introducing different
If you wan't to classify CPU modules, you would have to define
But, as I said, it has no consequences, the source code is the same for all versions of the CPU. |
|
@leandrolanzieri The same for ESP8266. ESP12F is a module with CPU ESP8266 EX. The only difference is that the module already has some flash memory, a crystal and some capacitors and pull-ups. But the CPU model is the same and it doesn't have any impact on supported features. |
| config CPU_ARCH_XTENSA | ||
| bool | ||
| select HAS_ARCH_32BIT | ||
|
|
There was a problem hiding this comment.
| select HAS_ARCH_ESP | |
see PR #14375
There was a problem hiding this comment.
Why using a feature for that when CPU_ARCH could be checked?
| config HAS_PERIPH_ADC_CTRL | ||
| bool | ||
| help | ||
| Indicates that an ESP32 ADC controller peripheral is present. | ||
|
|
There was a problem hiding this comment.
ADC controller can't be configured by the user. It should be exposed in Kconfig.
| config HAS_PERIPH_ADC_CTRL | |
| bool | |
| help | |
| Indicates that an ESP32 ADC controller peripheral is present. |
There was a problem hiding this comment.
But this is a feature provided
There was a problem hiding this comment.
As you can see the symbol has no prompt, meaning that the user can't change the value (it's an invisible symbol). It's here in order to indicate that the feature is provided, like indicated in Makefile.features.
There was a problem hiding this comment.
I don't remember exactly, but providing it as a feature was a trick to compile cpu/esp32/periph/adc_ctrl.c when it is needed by other peripherals
Lines 55 to 57 in ef4835a
cpu/*/periph are compiled based on used features.
There was a problem hiding this comment.
As I remember, the C files in cpu/*/periph are compiled based on used features.
Yes. That's why this is included in the Kconfig. All features provided by Makefile.features should match these.
There was a problem hiding this comment.
Hm, but periph_adc_ctrl is only used internally and shouldn't be exposed to the user. Isn't it possible to drop this feature from Kconfig?
There was a problem hiding this comment.
As I mentioned, the user does not see this symbol and can't change the value of it directly (it has no prompt). It is there just to indicate that the feature is provided, just as FEATURES_PROVIDED += periph_adc_ctrl is there.
Edit: It is not a configurable parameter.
There was a problem hiding this comment.
As I mentioned, the user does not see this symbol
It is shown in the feature list
-*- <HAS_PERIPH_ADC_CTRL>
There was a problem hiding this comment.
In order to be able to see that, one needs to enable the show-all mode in menuconfig. That means that one will see symbols with and without prompt. You must have noticed also that one can't change the value of it. There is no way to make it not appear at all when using this mode.
|
Thanks for the feedback @gschorcht
That is the case usually so far with other
I understand what you mean. My though was that, usually a CPU model would define the amount of memory available so defining the modules as CPU model would make sense in that case. But we could go with
Ok.
Same as above: we are trying to have all the information possible, it may not be used now, but I think that being specific does not hurt in this case.
Would you be OK with this? |
0d1ee5d to
840b9cc
Compare
|
I rebased to solve conflict in the test Makefile. Also, I specified |
|
@leandrolanzieri PR #14117 will take longer to merge. How do we proceed? Shall we merge this PR first and PR #14117 has to be modified after a rebase. Or shall we apply the small cleanup from PR #14117 here as well? |
>All of them are features of each ESP SoC and have not to be configured by the board definition. Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com> Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
0cfe648 to
887ed43
Compare
|
@gschorcht done. I added the commit that moves the features. #14117 will still need to modify the Kconfig to add the definition and select |
887ed43 to
c6eaae9
Compare
|
@leandrolanzieri Thanks for this contribution. |
|
Thanks for the review and the suggestions! |
Contribution description
This models in Kconfig all the features of the esp8266 and esp32 boards:
Testing procedure
tests/kconfig_featuresshould pass for all boards. Which means thatmake info-features-providedandmake dependency-debug-features-provided-kconfigshould return the same list.Issues/PRs references
Part of #14148