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.
Files changed (37) hide show
  1. {firestarter-1.2.1 → firestarter-1.2.2}/PKG-INFO +1 -1
  2. firestarter-1.2.2/firestarter/__init__.py +1 -0
  3. {firestarter-1.2.1 → firestarter-1.2.2}/firestarter/database.py +2 -0
  4. {firestarter-1.2.1 → firestarter-1.2.2}/firestarter/ic_layout.py +5 -3
  5. {firestarter-1.2.1 → firestarter-1.2.2}/firestarter/main.py +35 -30
  6. {firestarter-1.2.1 → firestarter-1.2.2}/firestarter.egg-info/PKG-INFO +1 -1
  7. firestarter-1.2.1/firestarter/__init__.py +0 -1
  8. {firestarter-1.2.1 → firestarter-1.2.2}/.github/scripts/update_version.py +0 -0
  9. {firestarter-1.2.1 → firestarter-1.2.2}/.github/workflows/publish.yml +0 -0
  10. {firestarter-1.2.1 → firestarter-1.2.2}/.github/workflows/release.yml +0 -0
  11. {firestarter-1.2.1 → firestarter-1.2.2}/.gitignore +0 -0
  12. {firestarter-1.2.1 → firestarter-1.2.2}/.vscode/launch.json +0 -0
  13. {firestarter-1.2.1 → firestarter-1.2.2}/LICENSE +0 -0
  14. {firestarter-1.2.1 → firestarter-1.2.2}/MANIFEST.in +0 -0
  15. {firestarter-1.2.1 → firestarter-1.2.2}/README.md +0 -0
  16. {firestarter-1.2.1 → firestarter-1.2.2}/communication_test.sh +0 -0
  17. {firestarter-1.2.1 → firestarter-1.2.2}/doc/package-details.md +0 -0
  18. {firestarter-1.2.1 → firestarter-1.2.2}/doc/protocol-id.md +0 -0
  19. {firestarter-1.2.1 → firestarter-1.2.2}/firestarter/avr_tool.py +0 -0
  20. {firestarter-1.2.1 → firestarter-1.2.2}/firestarter/data/avrdude.conf +0 -0
  21. {firestarter-1.2.1 → firestarter-1.2.2}/firestarter/data/database.json +0 -0
  22. {firestarter-1.2.1 → firestarter-1.2.2}/firestarter/data/pin-maps.json +0 -0
  23. {firestarter-1.2.1 → firestarter-1.2.2}/firestarter.egg-info/SOURCES.txt +0 -0
  24. {firestarter-1.2.1 → firestarter-1.2.2}/firestarter.egg-info/dependency_links.txt +0 -0
  25. {firestarter-1.2.1 → firestarter-1.2.2}/firestarter.egg-info/entry_points.txt +0 -0
  26. {firestarter-1.2.1 → firestarter-1.2.2}/firestarter.egg-info/requires.txt +0 -0
  27. {firestarter-1.2.1 → firestarter-1.2.2}/firestarter.egg-info/top_level.txt +0 -0
  28. {firestarter-1.2.1 → firestarter-1.2.2}/pyproject.toml +0 -0
  29. {firestarter-1.2.1 → firestarter-1.2.2}/requirements.txt +0 -0
  30. {firestarter-1.2.1 → firestarter-1.2.2}/setup.cfg +0 -0
  31. {firestarter-1.2.1 → firestarter-1.2.2}/test.py +0 -0
  32. {firestarter-1.2.1 → firestarter-1.2.2}/things.md +0 -0
  33. {firestarter-1.2.1 → firestarter-1.2.2}/tools/infoic.xml +0 -0
  34. {firestarter-1.2.1 → firestarter-1.2.2}/tools/parse_db.py +0 -0
  35. {firestarter-1.2.1 → firestarter-1.2.2}/tools/pin-layouts.odt +0 -0
  36. {firestarter-1.2.1 → firestarter-1.2.2}/tools/verified.txt +0 -0
  37. {firestarter-1.2.1 → firestarter-1.2.2}/write_test.sh +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: firestarter
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: EPROM burner software for the Relatively Universal ROM Programmer
5
5
  Author-email: Henrik Olsson <henols@gmail.com>
6
6
  Description-Content-Type: text/markdown
@@ -0,0 +1 @@
1
+ __version__ = "1.2.2"
@@ -128,6 +128,8 @@ def map_data(ic, manufacturer):
128
128
  if ic_type == 1:
129
129
  if protocol_id == 0x06:
130
130
  type = 3
131
+ elif protocol_id == 0x05:
132
+ type = 2
131
133
  elif flags & 0x08:
132
134
  type = 1
133
135
  # if pin_count == 24 and variant in [0, 1, 16]:
@@ -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['protocol-id']))
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 id, type, description in protocol_info:
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
- if res == "OK":
88
- if verbose:
89
- print(f"Programmer: {msg}")
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
- for port in ports:
141
- serial_port = check_port(port, json_data)
142
+ try:
143
+ for port in ports:
144
+ serial_port = check_port(port, json_data)
142
145
 
143
- if serial_port:
144
- config["port"] = port
145
- save_config()
146
- if verbose:
147
- print(f"Found programmer at port: {port}")
148
- else:
149
- print(f"Connected to programmer")
150
- return serial_port
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
- for port in ports:
153
- serial_port = check_port(port, json_data, FALLBACK_BAUD_RATE)
155
+ for port in ports:
156
+ serial_port = check_port(port, json_data, FALLBACK_BAUD_RATE)
154
157
 
155
- if serial_port:
156
- config["port"] = port
157
- save_config()
158
- if verbose:
159
- print(f"Found programmer at port: {port}")
160
- else:
161
- print(f"Connected to programmer")
162
- print(
163
- f"Using fallback baud rate: {FALLBACK_BAUD_RATE} consider updating firmware!"
164
- )
165
- return serial_port
166
- print("No programmer found")
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 "TIMEOUT_ERROR", "Timeout (expecting response)"
206
+ return "ERROR", "Timeout (expecting response)"
202
207
 
203
208
 
204
209
  def write_feedback(msg):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: firestarter
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: EPROM burner software for the Relatively Universal ROM Programmer
5
5
  Author-email: Henrik Olsson <henols@gmail.com>
6
6
  Description-Content-Type: text/markdown
@@ -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