zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
9.74k stars 6k forks source link

ESP32C3 failes to build with CONFIG_RTC_CLK_SRC_EXT_CRYS=y #72190

Closed fgihl closed 1 week ago

fgihl commented 2 weeks ago

Using zephyr main, you get build error when enabling external 32K clock on esp32c3. To enable external 32K clock I use the Kconfig CONFIG_RTC_CLK_SRC_EXT_CRYS=y

Repo: Fetch zephyr according to Getting started guide.

Modifiy hello world sample by adding the line CONFIG_RTC_CLK_SRC_EXT_CRYS=y to prj.conf

Build hello world using the line west build -p -b esp32c3_devkitm samples/hello_world

The following build error now happens: /home/fgihl/tmp/zephyr-validation/modules/hal/espressif/components/bootloader_support/src/bootloader_clock_init.c: In function 'bootloader_clock_configure': /home/fgihl/tmp/zephyr-validation/modules/hal/espressif/components/bootloader_support/src/bootloader_clock_init.c:85:31: error: 'CONFIG_ESP_SYSTEM_RTC_EXT_XTAL_BOOTSTRAP_CYCLES' undeclared (first use in this function) 85 | rtc_clk_32k_bootstrap(CONFIG_ESP_SYSTEM_RTC_EXT_XTAL_BOOTSTRAP_CYCLES); | ^~~~~~~~~~~ /home/fgihl/tmp/zephyr-validation/modules/hal/espressif/components/bootloader_support/src/bootloader_clock_init.c:85:31: note: each undeclared identifier is reported only once for each function it appears in [126/198] Building C object zephyr/arch/arch/riscv/core/CMakeFiles/archriscvcore.dir/fatal.c.obj ninja: build stopped: subcommand failed.

github-actions[bot] commented 2 weeks ago

Hi @fgihl! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙

sylvioalves commented 1 week ago

@fgihl, would you re-try using the PR linked here?

fgihl commented 1 week ago

Thanks @sylvioalves . Yes, this fixes the compile problem.