firestarter 2.0.7__tar.gz → 3.0.0b2__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 (57) hide show
  1. {firestarter-2.0.7 → firestarter-3.0.0b2}/MANIFEST.in +3 -2
  2. {firestarter-2.0.7 → firestarter-3.0.0b2}/PKG-INFO +109 -1
  3. {firestarter-2.0.7 → firestarter-3.0.0b2}/README.md +105 -0
  4. firestarter-3.0.0b2/firestarter/__init__.py +1 -0
  5. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter/config.py +11 -4
  6. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter/constants.py +24 -0
  7. firestarter-3.0.0b2/firestarter/data/chip_database.json +14064 -0
  8. firestarter-3.0.0b2/firestarter/data/pinouts.json +124 -0
  9. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter/database.py +222 -104
  10. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter/eprom_info.py +45 -7
  11. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter/eprom_operations.py +34 -11
  12. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter/firmware.py +242 -11
  13. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter/hardware.py +3 -1
  14. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter/ic_layout.py +53 -25
  15. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter/main.py +158 -7
  16. firestarter-3.0.0b2/firestarter/messages.py +302 -0
  17. firestarter-3.0.0b2/firestarter/serial_comm.py +985 -0
  18. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter.egg-info/PKG-INFO +109 -1
  19. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter.egg-info/SOURCES.txt +8 -21
  20. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter.egg-info/requires.txt +4 -0
  21. {firestarter-2.0.7 → firestarter-3.0.0b2}/pyproject.toml +13 -5
  22. firestarter-3.0.0b2/tests/test_audit_coverage_matrix.py +605 -0
  23. firestarter-3.0.0b2/tests/test_decoder.py +543 -0
  24. firestarter-3.0.0b2/tests/test_firmware_install.py +1068 -0
  25. firestarter-3.0.0b2/tests/test_fwguard.py +125 -0
  26. firestarter-3.0.0b2/tests/test_update_version.py +379 -0
  27. firestarter-2.0.7/.github/scripts/update_version.py +0 -60
  28. firestarter-2.0.7/.github/workflows/publish.yml +0 -18
  29. firestarter-2.0.7/.github/workflows/release.yml +0 -44
  30. firestarter-2.0.7/.gitignore +0 -27
  31. firestarter-2.0.7/.vscode/launch.json +0 -73
  32. firestarter-2.0.7/autocomplete.md +0 -71
  33. firestarter-2.0.7/doc/package-details.md +0 -118
  34. firestarter-2.0.7/doc/protocol-id.md +0 -360
  35. firestarter-2.0.7/firestarter/__init__.py +0 -1
  36. firestarter-2.0.7/firestarter/data/database_generated.json +0 -18584
  37. firestarter-2.0.7/firestarter/data/database_overrides.json +0 -176
  38. firestarter-2.0.7/firestarter/data/pin-maps.json +0 -67
  39. firestarter-2.0.7/firestarter/serial_comm.py +0 -541
  40. firestarter-2.0.7/firestarter_test.sh +0 -170
  41. firestarter-2.0.7/images/firestarter_logo.png +0 -0
  42. firestarter-2.0.7/images/ko-fi.png +0 -0
  43. firestarter-2.0.7/requirements.txt +0 -7
  44. firestarter-2.0.7/things.md +0 -7
  45. firestarter-2.0.7/tools/infoic.xml +0 -17204
  46. firestarter-2.0.7/tools/parse_db.py +0 -236
  47. firestarter-2.0.7/tools/pin-layouts.odt +0 -0
  48. firestarter-2.0.7/tools/verified.txt +0 -6
  49. firestarter-2.0.7/write_test.sh +0 -125
  50. {firestarter-2.0.7 → firestarter-3.0.0b2}/LICENSE +0 -0
  51. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter/avr_tool.py +0 -0
  52. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter/logging_utils.py +0 -0
  53. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter/utils.py +0 -0
  54. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter.egg-info/dependency_links.txt +0 -0
  55. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter.egg-info/entry_points.txt +0 -0
  56. {firestarter-2.0.7 → firestarter-3.0.0b2}/firestarter.egg-info/top_level.txt +0 -0
  57. {firestarter-2.0.7 → firestarter-3.0.0b2}/setup.cfg +0 -0
@@ -1,5 +1,6 @@
1
- include firestarter/data/database.json
2
- include firestarter/data/pin-maps.json
1
+ include firestarter/data/chip_database.json
2
+ include firestarter/data/pinouts.json
3
+ include firestarter/data/database_overrides.json
3
4
  include firestarter/data/avrdude.conf
4
5
  include firestarter/database.py
5
6
  include firestarter/ic_layout.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: firestarter
3
- Version: 2.0.7
3
+ Version: 3.0.0b2
4
4
  Summary: EPROM programmer software for the Relatively Universal ROM Programmer
5
5
  Author-email: Henrik Olsson <henols@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/henols/firestarter_app
@@ -26,6 +26,9 @@ Requires-Dist: requests>=2.20
26
26
  Requires-Dist: tqdm>=4.60
27
27
  Requires-Dist: argcomplete>=3.6.2
28
28
  Requires-Dist: rich>=14.0
29
+ Requires-Dist: packaging>=21.0
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest>=7.0; extra == "dev"
29
32
  Dynamic: license-file
30
33
 
31
34
 
@@ -55,6 +58,7 @@ Support and discussions forum at [Discord](https://discord.com/invite/kmhbxAjQc3
55
58
  ## Table of Content
56
59
  - [Installation](#Installation)
57
60
  - [Installing the Firestarter Python Program](#installing-the-firestarter-python-program)
61
+ - [Beta / Pre-release Channel](#beta--pre-release-channel)
58
62
  - [Installing the Firmware on the Arduino](#installing-the-firmware-on-the-arduino)
59
63
  - [Usage](#usage)
60
64
  - [General Usage](#general-usage)
@@ -102,6 +106,110 @@ This command installs the Firestarter application, which allows you to interact
102
106
  #### Auto complete
103
107
  How to enable auto complete for firestarter, see: [auto complete](autocomplete.md)
104
108
 
109
+ ### Beta / Pre-release Channel
110
+
111
+ v1.4 introduces an opt-in beta channel for both the app (via PyPI pre-releases) and the firmware
112
+ (via GitHub Pre-releases). App and firmware beta versions use matching `X.Y.ZbN` lockstep identifiers
113
+ so you always know both components are from the same beta cut.
114
+
115
+ #### Installing the beta app
116
+
117
+ ```bash
118
+ pip install --pre firestarter
119
+ firestarter --version # should print X.Y.ZbN (a beta identifier)
120
+ ```
121
+
122
+ `pip install --pre` opts into pre-release versions on PyPI. `pip install firestarter` (without `--pre`)
123
+ still installs only the latest stable release.
124
+
125
+ #### Installing beta firmware
126
+
127
+ **Fetch and install the latest beta firmware for the configured board:**
128
+
129
+ ```bash
130
+ firestarter fw -i --pre
131
+ ```
132
+
133
+ Mirrors `pip install --pre` semantics; if no pre-release firmware exists for the board, falls back
134
+ to stable.
135
+
136
+ **Pin an exact firmware tag:**
137
+
138
+ ```bash
139
+ firestarter fw -i --firmware-version 3.1.0b2
140
+ firestarter fw -i --firmware-version 3.1.0
141
+ ```
142
+
143
+ The version string is validated against the PEP 440 regex (`^[0-9]+\.[0-9]+\.[0-9]+((b|rc)[0-9]+)?$`);
144
+ invalid input fails fast with no network call.
145
+
146
+ **Explicit stable channel override (escape hatch):**
147
+
148
+ ```bash
149
+ firestarter fw -i --stable
150
+ ```
151
+
152
+ Use `--stable` on a beta-installed app to force installation of the stable firmware channel instead
153
+ of the magic-default `--pre` routing (see **Magic default on beta-installed apps** below).
154
+
155
+ #### Listing available firmwares
156
+
157
+ ```bash
158
+ firestarter fw --list # all releases for the configured board
159
+ firestarter fw --list --pre # pre-releases only
160
+ firestarter fw --list --stable # stable releases only
161
+ firestarter fw --list --json # JSON output (greppable / scriptable)
162
+ ```
163
+
164
+ Output is plain-text with columns for version, channel, published date, and asset URL by default;
165
+ `--json` emits the same data as a JSON array.
166
+
167
+ #### Magic default on beta-installed apps
168
+
169
+ On a beta-installed app (i.e. `__version__` parses as a PEP 440 pre-release), bare
170
+ `firestarter fw -i` (no channel flag) auto-routes to `--pre` so beta users get matching beta
171
+ firmware by default. The following INFO line is logged when this routing occurs:
172
+
173
+ > Beta app detected — defaulting to --pre. Use --firmware-version X.Y.Z to pin a stable version.
174
+
175
+ Use `firestarter fw -i --stable` as the escape hatch to keep installing stable firmware on a
176
+ beta-installed app.
177
+
178
+ Note: `--pre`, `--firmware-version`, and `--stable` are mutually exclusive (3-way mutex). Only
179
+ one may be specified at a time. `--json` requires `--list`. `-i/--install` and `--list` are
180
+ mutually exclusive.
181
+
182
+ #### Channel selection matrix
183
+
184
+ | Goal | App install | Firmware install |
185
+ |------|-------------|-----------------|
186
+ | Stable everything (default) | `pip install firestarter` | `firestarter fw -i` |
187
+ | Beta everything (matched lockstep) | `pip install --pre firestarter` | `firestarter fw -i --pre` |
188
+ | Beta app, stable firmware (escape hatch) | `pip install --pre firestarter` | `firestarter fw -i --stable` |
189
+ | Pin exact firmware version | — | `firestarter fw -i --firmware-version 3.1.0b2` |
190
+
191
+ #### Stability guarantee
192
+
193
+ > **⚠ No stability guarantees.** Beta builds are intended for testing pre-release features. They may contain bugs, may change without notice, or may be withdrawn. For production / hardware-bench use, install the stable release.
194
+
195
+ #### Reporting issues against a beta build
196
+
197
+ When reporting a bug against a beta build, please include:
198
+
199
+ - **App beta version:** output of `pip show firestarter` (the `Version:` line, which will read `X.Y.ZbN`)
200
+ - **Firmware beta version:** output of `firestarter fw --list` (locate the installed `X.Y.ZbN` row) OR the firmware handshake string printed at `firestarter hw` startup
201
+ - **Board:** `uno` or `leonardo` (or other configured board)
202
+ - **OS:** macOS / Linux / Windows + version
203
+ - **For hardware-related issues:** chip part number + manufacturer
204
+ - **Full stderr / traceback** for crashes
205
+ - **Repro steps**
206
+
207
+ Report app issues at: https://github.com/henols/firestarter_app/issues
208
+
209
+ Report firmware issues at: https://github.com/henols/firestarter/issues
210
+
211
+ Do not create new issue templates — use the existing Issues page linked above.
212
+
105
213
  ### Installing the Firmware on the Arduino
106
214
 
107
215
  First, a few things to remember.
@@ -25,6 +25,7 @@ Support and discussions forum at [Discord](https://discord.com/invite/kmhbxAjQc3
25
25
  ## Table of Content
26
26
  - [Installation](#Installation)
27
27
  - [Installing the Firestarter Python Program](#installing-the-firestarter-python-program)
28
+ - [Beta / Pre-release Channel](#beta--pre-release-channel)
28
29
  - [Installing the Firmware on the Arduino](#installing-the-firmware-on-the-arduino)
29
30
  - [Usage](#usage)
30
31
  - [General Usage](#general-usage)
@@ -72,6 +73,110 @@ This command installs the Firestarter application, which allows you to interact
72
73
  #### Auto complete
73
74
  How to enable auto complete for firestarter, see: [auto complete](autocomplete.md)
74
75
 
76
+ ### Beta / Pre-release Channel
77
+
78
+ v1.4 introduces an opt-in beta channel for both the app (via PyPI pre-releases) and the firmware
79
+ (via GitHub Pre-releases). App and firmware beta versions use matching `X.Y.ZbN` lockstep identifiers
80
+ so you always know both components are from the same beta cut.
81
+
82
+ #### Installing the beta app
83
+
84
+ ```bash
85
+ pip install --pre firestarter
86
+ firestarter --version # should print X.Y.ZbN (a beta identifier)
87
+ ```
88
+
89
+ `pip install --pre` opts into pre-release versions on PyPI. `pip install firestarter` (without `--pre`)
90
+ still installs only the latest stable release.
91
+
92
+ #### Installing beta firmware
93
+
94
+ **Fetch and install the latest beta firmware for the configured board:**
95
+
96
+ ```bash
97
+ firestarter fw -i --pre
98
+ ```
99
+
100
+ Mirrors `pip install --pre` semantics; if no pre-release firmware exists for the board, falls back
101
+ to stable.
102
+
103
+ **Pin an exact firmware tag:**
104
+
105
+ ```bash
106
+ firestarter fw -i --firmware-version 3.1.0b2
107
+ firestarter fw -i --firmware-version 3.1.0
108
+ ```
109
+
110
+ The version string is validated against the PEP 440 regex (`^[0-9]+\.[0-9]+\.[0-9]+((b|rc)[0-9]+)?$`);
111
+ invalid input fails fast with no network call.
112
+
113
+ **Explicit stable channel override (escape hatch):**
114
+
115
+ ```bash
116
+ firestarter fw -i --stable
117
+ ```
118
+
119
+ Use `--stable` on a beta-installed app to force installation of the stable firmware channel instead
120
+ of the magic-default `--pre` routing (see **Magic default on beta-installed apps** below).
121
+
122
+ #### Listing available firmwares
123
+
124
+ ```bash
125
+ firestarter fw --list # all releases for the configured board
126
+ firestarter fw --list --pre # pre-releases only
127
+ firestarter fw --list --stable # stable releases only
128
+ firestarter fw --list --json # JSON output (greppable / scriptable)
129
+ ```
130
+
131
+ Output is plain-text with columns for version, channel, published date, and asset URL by default;
132
+ `--json` emits the same data as a JSON array.
133
+
134
+ #### Magic default on beta-installed apps
135
+
136
+ On a beta-installed app (i.e. `__version__` parses as a PEP 440 pre-release), bare
137
+ `firestarter fw -i` (no channel flag) auto-routes to `--pre` so beta users get matching beta
138
+ firmware by default. The following INFO line is logged when this routing occurs:
139
+
140
+ > Beta app detected — defaulting to --pre. Use --firmware-version X.Y.Z to pin a stable version.
141
+
142
+ Use `firestarter fw -i --stable` as the escape hatch to keep installing stable firmware on a
143
+ beta-installed app.
144
+
145
+ Note: `--pre`, `--firmware-version`, and `--stable` are mutually exclusive (3-way mutex). Only
146
+ one may be specified at a time. `--json` requires `--list`. `-i/--install` and `--list` are
147
+ mutually exclusive.
148
+
149
+ #### Channel selection matrix
150
+
151
+ | Goal | App install | Firmware install |
152
+ |------|-------------|-----------------|
153
+ | Stable everything (default) | `pip install firestarter` | `firestarter fw -i` |
154
+ | Beta everything (matched lockstep) | `pip install --pre firestarter` | `firestarter fw -i --pre` |
155
+ | Beta app, stable firmware (escape hatch) | `pip install --pre firestarter` | `firestarter fw -i --stable` |
156
+ | Pin exact firmware version | — | `firestarter fw -i --firmware-version 3.1.0b2` |
157
+
158
+ #### Stability guarantee
159
+
160
+ > **⚠ No stability guarantees.** Beta builds are intended for testing pre-release features. They may contain bugs, may change without notice, or may be withdrawn. For production / hardware-bench use, install the stable release.
161
+
162
+ #### Reporting issues against a beta build
163
+
164
+ When reporting a bug against a beta build, please include:
165
+
166
+ - **App beta version:** output of `pip show firestarter` (the `Version:` line, which will read `X.Y.ZbN`)
167
+ - **Firmware beta version:** output of `firestarter fw --list` (locate the installed `X.Y.ZbN` row) OR the firmware handshake string printed at `firestarter hw` startup
168
+ - **Board:** `uno` or `leonardo` (or other configured board)
169
+ - **OS:** macOS / Linux / Windows + version
170
+ - **For hardware-related issues:** chip part number + manufacturer
171
+ - **Full stderr / traceback** for crashes
172
+ - **Repro steps**
173
+
174
+ Report app issues at: https://github.com/henols/firestarter_app/issues
175
+
176
+ Report firmware issues at: https://github.com/henols/firestarter/issues
177
+
178
+ Do not create new issue templates — use the existing Issues page linked above.
179
+
75
180
  ### Installing the Firmware on the Arduino
76
181
 
77
182
  First, a few things to remember.
@@ -0,0 +1 @@
1
+ __version__ = "3.0.0b2"
@@ -135,18 +135,25 @@ class ConfigManager:
135
135
  """
136
136
  return self._config.get(key, default)
137
137
 
138
- def set_value(self, key, value):
138
+ def set_value(self, key, value, persist=True):
139
139
  """
140
- Sets a value in the configuration and saves the configuration file.
140
+ Sets a value in the configuration.
141
141
  Args:
142
142
  key (str): The configuration key to set.
143
143
  value: The value to associate with the key.
144
+ persist (bool): If True (default), save the configuration file to disk.
145
+ If False, only update the in-memory value (used for CLI overrides
146
+ that should not stick for future invocations).
144
147
  """
145
148
  if value is None:
146
- self.remove_key(key)
149
+ if persist:
150
+ self.remove_key(key)
151
+ else:
152
+ self._config.pop(key, None)
147
153
  return
148
154
  self._config[key] = value
149
- self._save_config()
155
+ if persist:
156
+ self._save_config()
150
157
 
151
158
  def remove_key(self, key):
152
159
  """
@@ -9,6 +9,14 @@ FIRESTARTER_RELEASE_URL = (
9
9
  "https://api.github.com/repos/henols/firestarter/releases/latest"
10
10
  )
11
11
 
12
+ FIRESTARTER_RELEASES_URL = (
13
+ "https://api.github.com/repos/henols/firestarter/releases"
14
+ )
15
+
16
+ FIRESTARTER_RELEASE_BY_TAG_URL = (
17
+ "https://api.github.com/repos/henols/firestarter/releases/tags/{tag}"
18
+ )
19
+
12
20
  # Constants
13
21
  BAUD_RATE = "250000"
14
22
 
@@ -32,6 +40,22 @@ COMMAND_FW_VERSION = 13
32
40
  COMMAND_CONFIG = 14
33
41
  COMMAND_HW_VERSION = 15
34
42
 
43
+ COMMAND_NAMES = {
44
+ COMMAND_READ: "READ",
45
+ COMMAND_WRITE: "WRITE",
46
+ COMMAND_ERASE: "ERASE",
47
+ COMMAND_BLANK_CHECK: "BLANK_CHECK",
48
+ COMMAND_CHECK_CHIP_ID: "CHECK_CHIP_ID",
49
+ COMMAND_VERIFY: "VERIFY",
50
+ COMMAND_DEV_ADDRESS: "DEV_ADDRESS",
51
+ COMMAND_DEV_REGISTERS: "DEV_REGISTERS",
52
+ COMMAND_READ_VPP: "READ_VPP",
53
+ COMMAND_READ_VPE: "READ_VPE",
54
+ COMMAND_FW_VERSION: "FW_VERSION",
55
+ COMMAND_CONFIG: "CONFIG",
56
+ COMMAND_HW_VERSION: "HW_VERSION",
57
+ }
58
+
35
59
  # Control Flags
36
60
  FLAG_FORCE = 0x01
37
61
  FLAG_CAN_ERASE = 0x02