From d479ca1e694c9f1b765e8b6639889a6870328d83 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 5 Dec 2023 21:26:48 -0500 Subject: [PATCH] Corrected the set_user_id.py script to put the bits in the correct direction when casting from an integer to a binary string. This is the same correction that was made to caravel-gf180mcu some time ago. Thanks to Mitch Bailey for finding and reporting the issue. --- scripts/set_user_id.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/set_user_id.py b/scripts/set_user_id.py index 905d1675..cf53b2bf 100755 --- a/scripts/set_user_id.py +++ b/scripts/set_user_id.py @@ -170,7 +170,7 @@ def usage(): try: user_id_int = int('0x' + user_id_value, 0) - user_id_bits = '{0:032b}'.format(user_id_int) + user_id_bits = '{0:032b}'.format(user_id_int)[::-1] except: print('Error: Cannot parse user ID "' + user_id_value + '" as an 8-digit hex number.') sys.exit(1)