@@ -27,12 +27,13 @@ fetch_ulptool_examples() {
27
27
}
28
28
29
29
fetch_binutils_esp32ulp_examples () {
30
- [ -d binutils-esp32ulp ] && return
30
+ [ -d binutils-gdb ] && return
31
31
32
- echo " Fetching binutils-esp32ulp examples"
32
+ echo " Fetching binutils-gdb ( esp32ulp) examples"
33
33
log_file=log/fetch-binutils.log
34
34
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
36
37
}
37
38
38
39
build_defines_db () {
@@ -63,7 +64,7 @@ patch_test() {
63
64
64
65
if [ " ${test_name} " = esp32ulp_jumpr ]; then
65
66
(
66
- cd binutils-esp32ulp /gas/testsuite/gas/esp32ulp/esp32
67
+ cd binutils-gdb /gas/testsuite/gas/esp32ulp/esp32
67
68
cp ${test_name} .s ${out_file}
68
69
echo -e " \tPatching test to work around binutils-esp32ulp .global bug"
69
70
cat >> ${out_file} << EOF
74
75
75
76
elif [ " ${test_name} " = esp32ulp_ranges ]; then
76
77
(
77
- cd binutils-esp32ulp /gas/testsuite/gas/esp32ulp/esp32
78
+ cd binutils-gdb /gas/testsuite/gas/esp32ulp/esp32
78
79
# merge 2 files: https://github.com/espressif/binutils-esp32ulp/blob/249ec34/gas/testsuite/gas/esp32ulp/esp32/check_as_ld.sh#L31
79
80
echo -e " \t${test_name} requires esp32ulp_globals. Merging both files into ${out_file} "
80
81
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"
82
83
cat >> ${out_file} << EOF
83
84
.global min_add
84
85
.global min_jump1
@@ -99,7 +100,7 @@ fetch_ulptool_examples
99
100
fetch_binutils_esp32ulp_examples
100
101
build_defines_db $1
101
102
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
103
104
104
105
src_name=" ${src_file% .s} "
105
106
src_dir=" ${src_name%/* } "
@@ -116,7 +117,7 @@ for src_file in ulptool/src/ulp_examples/*/*.s binutils-esp32ulp/gas/testsuite/g
116
117
fi
117
118
done
118
119
119
- # BEGIN: work around known issues with binutils-esp32ulp
120
+ # BEGIN: work around known issues with binutils-gdb ( esp32ulp)
120
121
ulp_file=" ${src_name} .ulp"
121
122
122
123
if patch_test ${test_name} ; then
@@ -125,7 +126,7 @@ for src_file in ulptool/src/ulp_examples/*/*.s binutils-esp32ulp/gas/testsuite/g
125
126
src_name=" ${src_file% .tmp} "
126
127
ulp_file=" ${src_name} .tmp.ulp" # when extension is not .s, micropython-esp32-ulp doesn't remove original extension
127
128
fi
128
- # END: work around known issues with binutils-esp32ulp
129
+ # END: work around known issues with binutils-gdb ( esp32ulp)
129
130
130
131
echo -e " \tBuilding using micropython-esp32-ulp"
131
132
log_file=" ${src_name} .log"
@@ -140,7 +141,7 @@ for src_file in ulptool/src/ulp_examples/*/*.s binutils-esp32ulp/gas/testsuite/g
140
141
gcc -I esp-idf/components/soc/esp32/include -I esp-idf/components/esp_common/include \
141
142
-x assembler-with-cpp \
142
143
-E -o ${pre_file} $src_file
143
- esp32ulp-elf-as -o $obj_file ${pre_file}
144
+ esp32ulp-elf-as --mcpu=esp32 - o $obj_file ${pre_file}
144
145
esp32ulp-elf-ld -T esp32.ulp.ld -o $elf_file $obj_file
145
146
esp32ulp-elf-objcopy -O binary $elf_file $bin_file
146
147
0 commit comments