Skip to content

Commit d866019

Browse files
committed
Update RTC compat tests to use new binutils-gdb (esp32ulp)
The examples from the testsuite are the same as in the previous binutils-esp32ulp repo from Espressif. But since the old repo will no longer be maintained, we switch to the new one. Currently all development happens on the esp32ulp-elf-2.35 branch and master does not (yet?) contain any files related to the Espressif-adapted assembler/linker. So we use this branch for now. Given that the branch name includes what appears to be a version number, it could mean Espressif might switch to a different branch down the line. We should pay attention to this and can then choose to switch to that branch too.
1 parent 0bfa305 commit d866019

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

tests/02_compat_rtc_tests.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ fetch_ulptool_examples() {
2727
}
2828

2929
fetch_binutils_esp32ulp_examples() {
30-
[ -d binutils-esp32ulp ] && return
30+
[ -d binutils-gdb ] && return
3131

32-
echo "Fetching binutils-esp32ulp examples"
32+
echo "Fetching binutils-gdb (esp32ulp) examples"
3333
log_file=log/fetch-binutils.log
3434
git clone --depth 1 \
35-
https://github.com/espressif/binutils-esp32ulp.git 1>$log_file 2>&1
35+
-b esp32ulp-elf-v2.35_20220830 \
36+
https://github.com/espressif/binutils-gdb.git 1>$log_file 2>&1
3637
}
3738

3839
build_defines_db() {
@@ -63,7 +64,7 @@ patch_test() {
6364

6465
if [ "${test_name}" = esp32ulp_jumpr ]; then
6566
(
66-
cd binutils-esp32ulp/gas/testsuite/gas/esp32ulp/esp32
67+
cd binutils-gdb/gas/testsuite/gas/esp32ulp/esp32
6768
cp ${test_name}.s ${out_file}
6869
echo -e "\tPatching test to work around binutils-esp32ulp .global bug"
6970
cat >> ${out_file} <<EOF
@@ -74,11 +75,11 @@ EOF
7475

7576
elif [ "${test_name}" = esp32ulp_ranges ]; then
7677
(
77-
cd binutils-esp32ulp/gas/testsuite/gas/esp32ulp/esp32
78+
cd binutils-gdb/gas/testsuite/gas/esp32ulp/esp32
7879
# merge 2 files: https://github.com/espressif/binutils-esp32ulp/blob/249ec34/gas/testsuite/gas/esp32ulp/esp32/check_as_ld.sh#L31
7980
echo -e "\t${test_name} requires esp32ulp_globals. Merging both files into ${out_file}"
8081
cat esp32ulp_globals.s ${test_name}.s > ${out_file}
81-
echo -e "\tPatching test to work around binutils-esp32ulp .global bug"
82+
echo -e "\tPatching test to work around binutils-gdb (esp32ulp) .global bug"
8283
cat >> ${out_file} <<EOF
8384
.global min_add
8485
.global min_jump1
@@ -99,7 +100,7 @@ fetch_ulptool_examples
99100
fetch_binutils_esp32ulp_examples
100101
build_defines_db $1
101102

102-
for src_file in ulptool/src/ulp_examples/*/*.s binutils-esp32ulp/gas/testsuite/gas/esp32ulp/esp32/*.s; do
103+
for src_file in ulptool/src/ulp_examples/*/*.s binutils-gdb/gas/testsuite/gas/esp32ulp/esp32/*.s; do
103104

104105
src_name="${src_file%.s}"
105106
src_dir="${src_name%/*}"
@@ -116,7 +117,7 @@ for src_file in ulptool/src/ulp_examples/*/*.s binutils-esp32ulp/gas/testsuite/g
116117
fi
117118
done
118119

119-
# BEGIN: work around known issues with binutils-esp32ulp
120+
# BEGIN: work around known issues with binutils-gdb (esp32ulp)
120121
ulp_file="${src_name}.ulp"
121122

122123
if patch_test ${test_name}; then
@@ -125,7 +126,7 @@ for src_file in ulptool/src/ulp_examples/*/*.s binutils-esp32ulp/gas/testsuite/g
125126
src_name="${src_file%.tmp}"
126127
ulp_file="${src_name}.tmp.ulp" # when extension is not .s, micropython-esp32-ulp doesn't remove original extension
127128
fi
128-
# END: work around known issues with binutils-esp32ulp
129+
# END: work around known issues with binutils-gdb (esp32ulp)
129130

130131
echo -e "\tBuilding using micropython-esp32-ulp"
131132
log_file="${src_name}.log"

0 commit comments

Comments
 (0)