1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-29 00:11:16 +01:00

tools/uf2/nrf52_softdevice_check: abort when several bootloaders present

The current tooling cannot distinguish which one is the correct one to flash.
This commit is contained in:
Mikolai Gütschow 2025-04-29 10:59:29 +02:00
parent d973ca18a9
commit 7befca8a91
No known key found for this signature in database
GPG Key ID: 943E2F37AA659AD5

View File

@ -24,10 +24,17 @@ if [ -z "${MOUNTPOINT}" ]; then
exit 1
fi
if [ ! "$(echo "${MOUNTPOINT}" | wc -l)" -eq 1 ]; then
echo "More than one device with UF2 bootloader found!"
echo "RIOT cannot distinguish the correct device."\
"Please connect no more than one device at a time."
exit 1
fi
INFO_FILE="${MOUNTPOINT}/INFO_UF2.TXT"
if [ ! -f "${INFO_FILE}" ]; then
echo "No INFO_FILE.TXT found in UF2 Mass Storage Device!"
echo "No INFO_UF2.TXT found in UF2 Mass Storage Device!"
exit 1
fi