firestarter 1.2.1__tar.gz → 1.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {firestarter-1.2.1 → firestarter-1.2.2}/PKG-INFO +1 -1
- firestarter-1.2.2/firestarter/__init__.py +1 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/firestarter/database.py +2 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/firestarter/ic_layout.py +5 -3
- {firestarter-1.2.1 → firestarter-1.2.2}/firestarter/main.py +35 -30
- {firestarter-1.2.1 → firestarter-1.2.2}/firestarter.egg-info/PKG-INFO +1 -1
- firestarter-1.2.1/firestarter/__init__.py +0 -1
- {firestarter-1.2.1 → firestarter-1.2.2}/.github/scripts/update_version.py +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/.github/workflows/publish.yml +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/.github/workflows/release.yml +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/.gitignore +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/.vscode/launch.json +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/LICENSE +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/MANIFEST.in +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/README.md +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/communication_test.sh +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/doc/package-details.md +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/doc/protocol-id.md +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/firestarter/avr_tool.py +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/firestarter/data/avrdude.conf +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/firestarter/data/database.json +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/firestarter/data/pin-maps.json +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/firestarter.egg-info/SOURCES.txt +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/firestarter.egg-info/dependency_links.txt +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/firestarter.egg-info/entry_points.txt +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/firestarter.egg-info/requires.txt +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/firestarter.egg-info/top_level.txt +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/pyproject.toml +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/requirements.txt +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/setup.cfg +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/test.py +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/things.md +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/tools/infoic.xml +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/tools/parse_db.py +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/tools/pin-layouts.odt +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/tools/verified.txt +0 -0
- {firestarter-1.2.1 → firestarter-1.2.2}/write_test.sh +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.2.2"
|
|
@@ -156,15 +156,17 @@ def print_chip_info(eprom, verbose=False):
|
|
|
156
156
|
print(f"Chip ID:\t{hex(eprom['chip-id'])}")
|
|
157
157
|
elif eprom["type"] == 4:
|
|
158
158
|
print(f"Type:\t\tSRAM")
|
|
159
|
+
elif eprom["type"] == 2:
|
|
160
|
+
print(f"Type:\t\tFlash Memory type 2")
|
|
159
161
|
elif eprom["type"] == 3:
|
|
160
|
-
print(f"Type:\t\tFlash Memory")
|
|
162
|
+
print(f"Type:\t\tFlash Memory type 3")
|
|
161
163
|
if eprom["flags"] & 0x00000008:
|
|
162
164
|
print(f"VPP:\t\t{eprom['vpp']}")
|
|
163
165
|
print(f"Pulse delay:\t{eprom['pulse-delay']}µS")
|
|
164
166
|
print_generic_eeprom(eprom)
|
|
165
167
|
|
|
166
168
|
if verbose:
|
|
167
|
-
print(protocol_info(eprom[
|
|
169
|
+
print(protocol_info(eprom["protocol-id"]))
|
|
168
170
|
print()
|
|
169
171
|
|
|
170
172
|
# Interpret the flags
|
|
@@ -397,7 +399,7 @@ def protocol_info(protocol_id):
|
|
|
397
399
|
),
|
|
398
400
|
),
|
|
399
401
|
]
|
|
400
|
-
for
|
|
402
|
+
for id, type, description in protocol_info:
|
|
401
403
|
if id == protocol_id:
|
|
402
404
|
return f"Protocol: {type} (0x{id:02X})\nDescription:\n - {description[0]}\n - {description[1]}\n - {description[2]}"
|
|
403
405
|
|
|
@@ -84,12 +84,14 @@ def check_port(port, data, baud_rate=BAUD_RATE):
|
|
|
84
84
|
ser.flush()
|
|
85
85
|
|
|
86
86
|
res, msg = wait_for_response(ser)
|
|
87
|
-
|
|
88
|
-
if
|
|
89
|
-
|
|
90
|
-
return ser
|
|
91
|
-
else:
|
|
87
|
+
while not res == "OK":
|
|
88
|
+
if res == "ERROR":
|
|
89
|
+
raise Exception(msg)
|
|
92
90
|
print(f"{res} - {msg}")
|
|
91
|
+
|
|
92
|
+
if verbose:
|
|
93
|
+
print(f"Programmer: {msg}")
|
|
94
|
+
return ser
|
|
93
95
|
except (OSError, serial.SerialException):
|
|
94
96
|
pass
|
|
95
97
|
|
|
@@ -137,33 +139,36 @@ def find_programmer(data, port=None):
|
|
|
137
139
|
json_data = json.dumps(data, separators=(",", ":"))
|
|
138
140
|
|
|
139
141
|
ports = find_comports(port)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
try:
|
|
143
|
+
for port in ports:
|
|
144
|
+
serial_port = check_port(port, json_data)
|
|
142
145
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
if serial_port:
|
|
147
|
+
config["port"] = port
|
|
148
|
+
save_config()
|
|
149
|
+
if verbose:
|
|
150
|
+
print(f"Found programmer at port: {port}")
|
|
151
|
+
else:
|
|
152
|
+
print(f"Connected to programmer")
|
|
153
|
+
return serial_port
|
|
151
154
|
|
|
152
|
-
|
|
153
|
-
|
|
155
|
+
for port in ports:
|
|
156
|
+
serial_port = check_port(port, json_data, FALLBACK_BAUD_RATE)
|
|
154
157
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
158
|
+
if serial_port:
|
|
159
|
+
config["port"] = port
|
|
160
|
+
save_config()
|
|
161
|
+
if verbose:
|
|
162
|
+
print(f"Found programmer at port: {port}")
|
|
163
|
+
else:
|
|
164
|
+
print(f"Connected to programmer")
|
|
165
|
+
print(
|
|
166
|
+
f"Using fallback baud rate: {FALLBACK_BAUD_RATE} consider updating firmware!"
|
|
167
|
+
)
|
|
168
|
+
return serial_port
|
|
169
|
+
print("No programmer found")
|
|
170
|
+
except Exception as e:
|
|
171
|
+
print("Error:", e)
|
|
167
172
|
return None
|
|
168
173
|
|
|
169
174
|
|
|
@@ -198,7 +203,7 @@ def wait_for_response(ser):
|
|
|
198
203
|
timeout = time.time()
|
|
199
204
|
|
|
200
205
|
if timeout + 2 < time.time():
|
|
201
|
-
return "
|
|
206
|
+
return "ERROR", "Timeout (expecting response)"
|
|
202
207
|
|
|
203
208
|
|
|
204
209
|
def write_feedback(msg):
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.2.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|