Skip to content

Commit 3757973

Browse files
committed
Throw clearer error when using picotool >2.1.1 with SDK <=2.1.1
This is required due to 2.1.0 and 2.1.1 SDK releases pointing at picotool develop branch rather than the respective picotool releases (raspberrypi/pico-sdk#2401)
1 parent b42e72a commit 3757973

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5095,6 +5095,10 @@ bool encrypt_command::execute(device_map &devices) {
50955095
if (string_to_hex_array(settings.filenames[3], iv_salt.data(), iv_salt.size(), "IV OTP salt")) {
50965096
ivFromFile = false;
50975097
} else if (get_file_type_idx(3) != filetype::bin) {
5098+
if (get_file_type_idx(3) == filetype::pem) {
5099+
// picotool encrypt <=2.1.1 would take PEM key file in the location of the IV OTP salt
5100+
fail(ERROR_ARGS, "This picotool version (%s) is not compatible with SDK versions <=2.1.1 - you must manually build & install picotool version 2.1.1 to use those SDK versions with encryption", PICOTOOL_VERSION);
5101+
}
50985102
fail(ERROR_ARGS, "Can only read IV OTP salt from BIN file");
50995103
}
51005104

0 commit comments

Comments
 (0)