-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/esp32: startup info if module esp_log_startup is used #12810
cpu/esp32: startup info if module esp_log_startup is used #12810
Conversation
@benpicco What about this approach to reduce the startup information? |
d9e9937
to
9744fed
Compare
9744fed
to
563b0d0
Compare
@benpicco @MrKevinWeiss @aabadie You all have tested ESP32 boards a lot. You all have seen the information printed by these boards during the boot process, including the board configuration. Some of these information come from the bootloader, others from RIOT's platform-specific startup procedure. @benpicco asked for less information. I personally like these startup information. Therefore, I would like to ask what you think about the approach in this PR to print these startup information only when using the I tried to use |
Wouldn't it make more sense to reuse LOG_DEBUG for all board configurations ? The default logging level is INFO so all these messages won't be printed by default. Using |
First, I would like to find an agreement on whether all these startup information (bootloader outputs including SPI flash info, used clocks, heap information, system time and board configuration) are annoying or useful and whether they should be disabled or enabled by default? @yegorich You also used the ESP32 quite often, what do you think? |
Since LOG_DEBUG can't be defined as make variable and has to be defined as
it can't be used to control which bootloader is used, the one with startup information or the one without startup information. |
This was changed some time ago (#11592) Lines 179 to 185 in 574c7d5
|
Hm, I tried it with
but it didn't work 😟 The application makefile doesn't override it. |
Line 182 in 574c7d5
Shouldn't it be
here? |
Indeed that would be more inline with the comment |
I like the info actually, have a switch to turn it on and off is a good idea. My question would be, should it be on by default? I think so as people who are not familiar with RIOT are likely the ones to use it. Like so many make commands it can get lost in the noise. For those like @benpicco who are familiar with it and don't need the boot information it would be a lot easier disable it. Also you can add a message in the boot information to tell how to disable it... |
This would also be easy to realize with the pseudo-module
|
A goal of RIOT is consistent behavior across different architectures. So having an arch-specific verbosity-level module is odd. What's wrong with using the common |
Yeah, logging for ESP32 boards is a bit special and tricky 🕶️ The ESP32 port implements its own log module
This is realized by a bunch of macros that can be controlled by the pseudo-modules Of course, I can change it so that RIOT code uses RIOT's What about a compromise? We let the log module as is so that the user can decide how the log output should look like. We control the startup information with the module
The log output from RIOT part is compatible with other platforms by default. |
563b0d0
to
6c048e8
Compare
Startup information, including board configuration, is only printed when module esp_log_startup is used. This reduces the amount of information that is printed by default to the console during the startup. The user can enable module esp_log_startup to get the additional startup information.
To reduce the information that are printed at the console during the startup, special bootloaders are required that suppress the outputs which are only informational. The according bootloader has to be selected during the make process.
6c048e8
to
eb73358
Compare
|
Thank you for the ping, sorry forgot about this one. How much log output is the SDK producing anyway? If the esp logging provided added value over what RIOT logging currently does, maybe we should think of adding those features to RIOT logging then. Of how much of a different log output are we talking here anyway? |
Agreed.
The log output of ESP SDK is tagged as follows with a type, the system time in ms and a module name:
Even though the type and the system time in ms might not be useful, tagging log outputs with the module name in a consistent format, seems to be an advantage over RIOT's log output. In RIOT each module uses its own format for tagging. I have seen
It would be great to have a consistent format over all modules in RIOT too. That's why I already opened issue #10651. |
Looks good in general and I like that the verbose config information is not printed by default, this is more consistent with other platforms. I tested this PR on esp23-wroom-32 and it works as expected. |
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.
All green on Murdock and tested locally with success.
ACK and go!
@aabadie Thanks for reviewing, testing and merging 😄 |
Contribution description
This PR introduces the pseudomodule
esp_log_startup
to control the additional information that are printed at startup for ESP32 boards. Additional startup information, including board configuration, are only printed when theesp_log_startup
module is used. This reduces the amount of information that is printed by default to the console during the startup. The user can enable moduleesp_log_startup
explicitly to get the additional startup information.Testing procedure
Use any application to test the module with as following:
Issues/PRs references