Skip to content
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

esp-idf 5.3.2 fails on P4 #1387

Closed
petermm opened this issue Dec 6, 2024 · 1 comment
Closed

esp-idf 5.3.2 fails on P4 #1387

petermm opened this issue Dec 6, 2024 · 1 comment

Comments

@petermm
Copy link
Contributor

petermm commented Dec 6, 2024

https://github.com/petermm/AtomVM/actions/runs/12200112028/job/34037206464

[1008/1055] Building C object esp-idf/avm_builtins/CMakeFiles/__idf_avm_builtins.dir/gpio_driver.c.obj
FAILED: esp-idf/avm_builtins/CMakeFiles/__idf_avm_builtins.dir/gpio_driver.c.obj 
ccache /opt/esp/tools/riscv32-esp-elf/esp-13.2.0_20240530/riscv32-esp-elf/bin/riscv32-esp-elf-gcc -DAVM_SELECT_IN_TASK -DAVM_TASK_DRIVER_ENABLED -DESP_PLATFORM -DHAVE_ATOMIC -DHAVE_CLOSE -DHAVE_CLOSEDIR -DHAVE_OPEN -DHAVE_OPENDIR -DHAVE_PTHREAD_RWLOCK -DHAVE_READDIR -DHAVE_SELECT -DHAVE_SOCKET -DHAVE_SOC_CPU_CORES_NUM -DIDF_VER=\"v5.3.2\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -I/__w/AtomVM/AtomVM/src/platforms/esp32/test/build/config -I/__w/AtomVM/AtomVM/src/platforms/esp32/components/avm_builtins/include -I/opt/esp/idf/components/newlib/platform_include -I/opt/esp/idf/components/freertos/config/include -I/opt/esp/idf/components/freertos/config/include/freertos -I/opt/esp/idf/components/freertos/config/riscv/include -I/opt/esp/idf/components/freertos/FreeRTOS-Kernel/include -I/opt/esp/idf/components/freertos/FreeRTOS-Ke
/__w/AtomVM/AtomVM/src/platforms/esp32/components/avm_builtins/gpio_driver.c: In function 'nif_gpio_deep_sleep_hold_en':
/__w/AtomVM/AtomVM/src/platforms/esp32/components/avm_builtins/gpio_driver.c:717:5: error: implicit declaration of function 'gpio_deep_sleep_hold_en'; did you mean 'nif_gpio_deep_sleep_hold_en'? [-Werror=implicit-function-declaration]
  717 |     gpio_deep_sleep_hold_en();
      |     ^~~~~~~~~~~~~~~~~~~~~~~
      |     nif_gpio_deep_sleep_hold_en
/__w/AtomVM/AtomVM/src/platforms/esp32/components/avm_builtins/gpio_driver.c: In function 'nif_gpio_deep_sleep_hold_dis':
/__w/AtomVM/AtomVM/src/platforms/esp32/components/avm_builtins/gpio_driver.c:727:5: error: implicit declaration of function 'gpio_deep_sleep_hold_dis'; did you mean 'nif_gpio_deep_sleep_hold_dis'? [-Werror=implicit-function-declaration]
  727 |     gpio_deep_sleep_hold_dis();
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
      |     nif_gpio_deep_sleep_hold_dis
cc1: some warnings being treated as errors

seems to be due to: espressif/esp-idf@706935f and we need to add SOC_GPIO_SUPPORT_HOLD_IO_IN_DSLP to the function guards.

@UncleGrumpy
Copy link
Collaborator

Indeed, a little surprised this didn't show up sooner, they must have added extra checks under the hood in this release. Using the SOC capabilities is definitely the way to go.

Not repeated to this issue, but there are other places in the code that we previously had to use the esp32 chip definition to decide to enable features, but these should all be replaced by the SOC capabilities definitions, now that that is supported in all current IDF versions.

petermm added a commit to petermm/AtomVM that referenced this issue Dec 8, 2024
petermm added a commit to petermm/AtomVM that referenced this issue Dec 11, 2024
petermm added a commit to petermm/AtomVM that referenced this issue Dec 12, 2024
bettio added a commit that referenced this issue Dec 12, 2024
Fix esp-idf >= 5.3.2 P4 builds

5.3.2 needs extra guards for esp32-P4
espressif/esp-idf@706935f

Fixes #1387

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
@petermm petermm closed this as completed Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants