From 9be4dc08131ae1af3b14503ac525667f0c39b456 Mon Sep 17 00:00:00 2001 From: Wilko Nienhaus Date: Sun, 15 Dec 2024 11:53:13 +0200 Subject: [PATCH] Fix compat tests due to esp-idf moving include files Peripheral register definitions were moved to a new directory inside the ESP-IDF: components/soc/{cpu_type}/register. This change caused our compat tests to fail because they depended on predefined register constants. This commit resolves the issue by adding the new directory to GCC's include search path using the -I option. Additionally, all header files in this new directory are now added to the DefinesDB for the compat tests with RTC macros. Fixes #100. --- tests/01_compat_tests.sh | 1 + tests/02_compat_rtc_tests.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/tests/01_compat_tests.sh b/tests/01_compat_tests.sh index 0732d34..a6fc2d1 100755 --- a/tests/01_compat_tests.sh +++ b/tests/01_compat_tests.sh @@ -53,6 +53,7 @@ run_tests_for_cpu() { echo -e "\tBuilding using binutils ($cpu)" gcc -I esp-idf/components/soc/$cpu/include -I esp-idf/components/esp_common/include \ + -I esp-idf/components/soc/$cpu/register \ -x assembler-with-cpp \ -E -o ${pre_file} $src_file esp32ulp-elf-as --mcpu=$cpu -o $obj_file ${pre_file} diff --git a/tests/02_compat_rtc_tests.sh b/tests/02_compat_rtc_tests.sh index 1e6a2d1..be2a98d 100755 --- a/tests/02_compat_rtc_tests.sh +++ b/tests/02_compat_rtc_tests.sh @@ -61,6 +61,7 @@ build_defines_db() { rm -f "${defines_db}" micropython -m esp32_ulp.parse_to_db \ esp-idf/components/soc/$cpu/include/soc/*.h \ + esp-idf/components/soc/$cpu/register/soc/*.h \ esp-idf/components/esp_common/include/*.h 1>$log_file # cache defines.db @@ -184,6 +185,7 @@ run_tests_for_cpu() { echo -e "\tBuilding using binutils ($cpu)" gcc -I esp-idf/components/soc/$cpu/include -I esp-idf/components/esp_common/include \ + -I esp-idf/components/soc/$cpu/register \ -x assembler-with-cpp \ -E -o ${pre_file} $src_file esp32ulp-elf-as --mcpu=$cpu -o $obj_file ${pre_file}