cpu/esp: cleanup of ESP SDK log outputs#12998
Conversation
LOG_TAG macro is required for LOG_VERBOSE level in ESP SDK log output handling.
The log level for normal information should be LOG_DEBUG.
|
@benpicco This PR could be interesting for you. For example, it solves the problem with bunches |
To control the log level and the format of the log output of SDK libraries, a bunch of library-specific printf functions are realized which map the log output from SDK libraries to RIOT's log macros.
34ce3af to
53139c0
Compare
|
@benpicco Do you think that there is a chance to get this PR merged before the soft freeze of release 2020.01. The reason for my question is that a modified tool chain is required for this PR to take affect on the ESP8266, see RIOT-OS/riotdocker#95 and we have to merge this PR before we can merge RIOT-OS/riotdocker#95. If this PR will not become part of release 2020.01, we would have to keep RIOT-OS/riotdocker#95 on hold until this PR is released with 2020.04. Otherwise ESP8266 would not be compilable anymore with the current release. It would be OK for me, if you think it's too short notice. It was just a question. |
|
Sorry, I've been sick the last couple days. Btw.: since the SDK version tends to move in tandem with the RIOT code, have you thought of moving it to |
Yeah, but it doesn't seem like a reasonable way. The ESP8266 SDK contains a lot of binary blobs and has a size of about 109 MByte. Using it as a package would pull the SDK for each compiled application. It would slow down the compilation a lot and would take a lot of disk space, for example if you compile all applications. |
OK, if I prepare a lightweight ESP8266 SDK by removing everything but the required header files and binary libraries, the SDK would only have 5.9 MB. But 5.9 MB can still be a lot if you have a very slow internet connection and it has to be pulled on every compilation. |
|
@benpicco All lights are green. |
|
Today is hard feature freeze. Can wie merge it? |
|
If you want it in, we should merge it. |
Does this work in master? Can I still build with docker? @gschorcht @benpicco
BTW if there was a reason to question this, AFAIK I should have been consulted. |
|
Well If murdock passes it builds, but I would like to know why you though there was need of holding back. |
The PR has only added some new functions that are required by the ESP8266 toolchain update in PR RIOT-OS/riotdocker#95. They are not yet used but will take effect as soon as the toolchain in the docker is updated. That is, the toolchain update depends on this PR. That's why this PR had to merge first even though it doesn't take effect on ESP8266 at the moment. I just wanted to have it in release 2020.01 so that we are able to do the toolchain update in next few month. |
Ok thanks for the clarification, sorry for stressing for nothing. |
|
@benpicco Thanks for reviewing and merging this PR. |
Contribution description
The ESP SDK libraries generate a lot of log outputs at the default log level, which are usually not of interest. Especially, the WiFi SDK libraries that are used by
esp_nowandesp_wifiproduce a lot of such output about driver internals, for exampleThis PR implements a set of library-specific
printffunctions that intercept the log output from the SDK libraries and redirect them to the RIOT log macros. This allows to control the log output of the ESP SDK libraries according to the defined log level.The PR contains also some small cleanups of log outputs in initialization functions.
Note: This PR requires a modified SDK version for ESP8266 boards to use the changes. The modified SDK version is available at GitHub.
Testing procedure
Test any ESP32 board with:
With
LOG_LEVEL=4, you should see the log output as before. At default log level you should only seeThe test of the PR with an ESP8266 board requires a modified SDK Version. Without the modified version of the modified SDK Version, ESP8266 should be compilable. The modified version of the SDK can be installed with:
Once the modified SDK version is installed, you can use:
Issues/PRs references
This PR is prerequisite for PR RIOT-OS/riotdocker#95