Change rtc clock source (in sdkconfig.h)

Hi
I’d like to change the rtc clock source for arduino-esp32 from internal to:
CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL

I tried updating sdkconfig.h, but when compiling my project I now get a lot of:
#define CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL 1
^
:0:0: note: this is the location of the previous definition

What is wrong?

From this issue, since you say it’s the arduino-esp32 you’re trying to change this on, it looks like it’s a bit of an involved process… where you need to rebuild libesp32.a with the right flags set, and then add some extra lines to your code to actually use it…

Maybe @maxgerhardt knows something about this?

I know this is an old thread, but it’s exactly what I need to do and couldn’t find info anywhere.
I have an ESP32 project using framework = arduino and need to change CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT at sdkconfig.h.
How can I change it ?

@ivankravets can you explain how to do it pls?