8000 Explicitly target the ESP32 during binary comparison · insighio/micropython-esp32-ulp@d2a5df0 · GitHub
[go: up one dir, main page]

Skip to content

Commit d2a5df0

Browse files
committed
Explicitly target the ESP32 during binary comparison
When using binutils-gdb (esp32ulp) to generate the "reference binary", which we compare against, pass --mcpu=esp32 to select the original ESP32 variant. While this is the default target of esp32-ulp-as, adding this argument makes the choice explicit and shows how to select a variant, for when we add support the ESP32-S2 or ESP32-S3 (both use --mcpu=esp32s2 because their ULPs have the same binary format).
1 parent d866019 commit d2a5df0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/01_compat_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ for src_file in $(ls -1 compat/*.S); do
2626

2727
echo -e "\tBuilding using binutils"
2828
gcc -E -o ${pre_file} $src_file
29-
esp32ulp-elf-as -o $obj_file ${pre_file}
29+
esp32ulp-elf-as --mcpu=esp32 -o $obj_file ${pre_file}
3030
esp32ulp-elf-ld -T esp32.ulp.ld -o $elf_file $obj_file
3131
esp32ulp-elf-objcopy -O binary $elf_file $bin_file
3232

tests/02_compat_rtc_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ for src_file in ulptool/src/ulp_examples/*/*.s binutils-gdb/gas/testsuite/gas/es
141141
gcc -I esp-idf/components/soc/esp32/include -I esp-idf/components/esp_common/include \
142142
-x assembler-with-cpp \
143143
-E -o ${pre_file} $src_file
144-
esp32ulp-elf-as -o $obj_file ${pre_file}
144+
esp32ulp-elf-as --mcpu=esp32 -o $obj_file ${pre_file}
145145
esp32ulp-elf-ld -T esp32.ulp.ld -o $elf_file $obj_file
146146
esp32ulp-elf-objcopy -O binary $elf_file $bin_file
147147

0 commit comments

Comments
 (0)
0