Skip to content

Commit 9be4dc0

Browse files
committed
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.
1 parent 37e68c5 commit 9be4dc0

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

tests/01_compat_tests.sh

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ run_tests_for_cpu() {
5353

5454
echo -e "\tBuilding using binutils ($cpu)"
5555
gcc -I esp-idf/components/soc/$cpu/include -I esp-idf/components/esp_common/include \
56+
-I esp-idf/components/soc/$cpu/register \
5657
-x assembler-with-cpp \
5758
-E -o ${pre_file} $src_file
5859
esp32ulp-elf-as --mcpu=$cpu -o $obj_file ${pre_file}

tests/02_compat_rtc_tests.sh

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ build_defines_db() {
6161
rm -f "${defines_db}"
6262
micropython -m esp32_ulp.parse_to_db \
6363
esp-idf/components/soc/$cpu/include/soc/*.h \
64+
esp-idf/components/soc/$cpu/register/soc/*.h \
6465
esp-idf/components/esp_common/include/*.h 1>$log_file
6566

6667
# cache defines.db
@@ -184,6 +185,7 @@ run_tests_for_cpu() {
184185

185186
echo -e "\tBuilding using binutils ($cpu)"
186187
gcc -I esp-idf/components/soc/$cpu/include -I esp-idf/components/esp_common/include \
188+
-I esp-idf/components/soc/$cpu/register \
187189
-x assembler-with-cpp \
188190
-E -o ${pre_file} $src_file
189191
esp32ulp-elf-as --mcpu=$cpu -o $obj_file ${pre_file}

0 commit comments

Comments
 (0)