2021-10-09 03:42:14 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -euo
|
|
|
|
|
|
|
|
for path in \
|
|
|
|
"examples/get-started/hello_world" \
|
|
|
|
"examples/bluetooth/nimble/blecent"; do
|
|
|
|
cd "${IDF_PATH}/${path}"
|
|
|
|
|
2021-10-14 08:00:05 -04:00
|
|
|
echo "CONFIG_APP_REPRODUCIBLE_BUILD=y" >sdkconfig
|
2021-10-09 03:42:14 -04:00
|
|
|
|
|
|
|
idf.py -B build_first fullclean build
|
|
|
|
idf.py -B build_second fullclean build
|
|
|
|
|
|
|
|
for item in \
|
|
|
|
"partition_table/partition-table.bin" \
|
|
|
|
"bootloader/bootloader.bin" \
|
|
|
|
"bootloader/bootloader.elf" \
|
|
|
|
"bootloader/bootloader.map" \
|
|
|
|
"*.bin" \
|
|
|
|
"*.elf" \
|
|
|
|
"*.map"; do
|
|
|
|
diff -s build_first/${item} build_second/${item} # use glob, don't use double quotes
|
|
|
|
done
|
2021-10-14 08:00:05 -04:00
|
|
|
|
|
|
|
# test gdb
|
|
|
|
rm -f gdb.txt
|
|
|
|
elf_file=$(find build_first -maxdepth 1 -iname '*.elf')
|
2024-04-04 04:24:49 -04:00
|
|
|
xtensa-esp32-elf-gdb -x build_first/prefix_map_gdbinit -ex 'set logging enabled' -ex 'set pagination off' -ex 'list app_main' -ex 'quit' "$elf_file"
|
2021-10-14 08:00:05 -04:00
|
|
|
if grep "No such file or directory" gdb.txt; then
|
|
|
|
exit 1
|
|
|
|
fi
|
2021-10-09 03:42:14 -04:00
|
|
|
done
|