I’m using PlatformIO to generate some code for an ESP32 Huzzah Feather and in the generated .bin file there are references to error/warning messages which don’t seem to affect the compilation of the project, but look slightly concerning nonetheless. As an example:
There’s also messages in there about the clock frequency that look like they should be written to a terminal:
[%6u][E][%s:%u] %s(): Bad frequency: %u MHz! Options are: 240, 160, 80, %u and %u MHz
Is there a way to turn these off or prevent them being written to the .bin? I’m not sure what purpose they serve and we need to compare source files built by different users to check for consistency and having the user’s name in there prevents this. I’ve included my PlatformIO setting below.
Thanks Maximilian. I had tried that option but it hadn’t cleared things up completely. I’m still getting the following in the .bin if there is anything else to try?
@"(Cannot use SET_PERI_REG_MASK for DPORT registers use DPORT_SET_PERI_REG_MASK)" && (!((((GPIO_PIN_MUX_REG[gpio_num])) >= 0x3ff00000) && ((GPIO_PIN_MUX_REG[gpio_num])) <= 0x3ff13FFC))
It seems related to the attachInterrupt function as if I comment this out the C:/users/“myusername”/.platformio/packages/framework-arduinoespressif32/tools/sdk part of the path disappears. It’s currently being used in the following form:
Sadly that specific headerfile does not have the capability to disable its assertions, but maybe if all asserts come from C and not C++, the upper path is chosen with assert(), which may listen to the NDEBUG (“no debug”) macro per this as its “disable switch”.
So, you should first try adding -DNDEBUG to your build flags.
Alternatively, as the basically ultra hack, you can globally define the include guard macro __ESP_ASSERT_H__ to make it think the header is already included, then redefine all externally used macros (TRY_STATIC_ASSERT) to empty macros swallowing all of their arguments. I’m not sure how this would work shell-escape wise, but something along the lines of