Commit Graph

172 Commits

Author SHA1 Message Date
697c30406d
changelog for v0.11.0
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-12-18 08:46:14 -06:00
7fbccb6cde
provide better feedback when we have exhausted all config_pb2 options
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-12-18 08:46:14 -06:00
c81f4cd139
properly test protobuf structure packaging options
this should all be tested now:
1. invoking against precompiled _pb2.py files provided by user
2. invoking against .proto files provided by user which must be compiled
3. invoking with a special option to use shipped (by us) .proto files
   which must be compiled
4. erroring because none of the above occurred

this took some reorganization, but this should finally give me stability
in using this in GP2040-CE's build process

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-12-18 08:46:14 -06:00
c9c73c979a
tweak the debugging output of getting protobuf modules
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-12-18 08:46:14 -06:00
2334b8c630
version bumps, which necessitated a small update to tests
for some reason the GUI pilot server for testing doesn't go to the end
of the input field for edits, so the things that backspaced over old
values need an extra 'end' keypress now. I didn't look into why this is,
because it's fine in the actual GUI regardless

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-12-18 08:46:05 -06:00
98052312d9
release notes for v0.10.0
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-09-30 10:27:56 -05:00
783a0f08dd
extend tox coverage to Python 3.12
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-09-30 09:58:45 -05:00
f058727f34
requirements version bumps
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-09-30 09:58:45 -05:00
d4c4bbde96
update the repository for v0.7.10
note that the google protobuf project does not recommend shipping
generated _pb2.py files, so that functionality has been removed from the
project. this also partially undoes the previous commit since using the
provided .proto files is less of an issue and also the default now, so
maybe don't spam the console as much

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-09-30 09:58:07 -05:00
18f4f45bb5
log the exception causing to revert to the precompiled fallback
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-09-20 13:00:17 -05:00
733b49676c
allow for saving the board dump in .uf2 format
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-09-16 11:33:37 -05:00
dace99b9e0
fix comparison of configs in Save As test
newer config structures will convert old configs to the new fields'
defaults, meaning the after won't be the same as the before once there's
a proto change not present in the original file (such as with this proto
bump for 0.7.9), so just do a more rudimentary compare

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-06-05 11:39:17 -05:00
a64ae256a0
update protobuf snapshot files for GP2040-CE v0.7.9
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-06-05 11:38:52 -05:00
975afbbd6c
add twine to dev dependencies, for packaging to pypi
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-05-21 13:13:34 -05:00
01ad396bdb
changelog updates for v0.9.0.
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-05-21 13:09:15 -05:00
71ba03b181
update protobuf snapshot files for GP2040-CE v0.7.9
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-05-21 12:35:30 -05:00
241aa32d1e
requirements version bumps
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-05-21 12:22:02 -05:00
98a13cca90
put ancillary docs under the main license
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-21 18:55:39 -05:00
99504bfde6
support loading JSON files as configs to edit
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-20 21:31:14 -05:00
56eb65dd55
tweak the version flag output to show more package/system info
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-19 08:11:20 -05:00
2adb1540a1
include .json in the TUI Save As... prompt
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-15 23:22:18 -05:00
b4ba27dda0
add customary EOF \n to written JSON
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-15 20:18:12 -05:00
58f2f38546
preliminary support for writing configs direct to JSON
I'm hoping this will allow for editing the JSON configs directly with
edit-config

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-15 20:14:08 -05:00
8ad9b10018
CHANGELOG updates for v0.8.3
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-15 10:18:51 -05:00
2648aebd4f
add --backup flag to concatenate
makes it so that we retain the old file, e.g. GP2040CE.uf2.old if we're
about to write GP2040CE.uf2

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-15 10:13:28 -05:00
6a802bb232
support reading segmented UF2 files
now that we create segmented UF2 files properly in concatenate, we need
the ability to read them, which we'd previously saved for later; that
time is now. the reader now supports jumps forward (but not backwards,
and I don't know how likely it is we'll ever see this)

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-15 09:25:26 -05:00
7d34a441f8
use the proper block count when publishing multipart UF2s
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-15 00:05:54 -05:00
3524e5aa54
changelog for v0.8.1
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-14 23:35:48 -05:00
e133abc922
concatenate smaller UF2s by using indexed offsets
previous commit added the ability to pass a list of location+binary
combinations to create UF2s, meaning we no longer need to pad the
concatenated UF2 the same way we pad the raw binary output. this makes
for a more sanely-sized UF2 and faster write

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-14 23:26:50 -05:00
2bb049c442
take multiple binary arguments to convert_binary_to_uf2
this is in preparation for making smaller .uf2 files buy not needing
padding, instead passing multiple location+binary combos to the
converter

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-14 22:54:05 -05:00
ea4d4be709
fix bad loading of .uf2 files in summarize-gp2040ce
the UF2 file wasn't converted to binary format before searching for the
board/user config sections, so it was reading the middle of the UF2 file
instead of the end of the binary file and returning that there were no
configs

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-14 11:21:55 -05:00
90a5f879df
specify to package the protobuf snapshot
the REUSE stuff made simple discovery not work, so setuptools had to be
corrected, this has probably been wrong since then
2024-04-13 23:29:05 -05:00
0a214cff42
changelog updates for 0.8.0
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-13 23:20:36 -05:00
5022616f1d
summarize-gp2040ce --- print information about firmware
can be read from a file or over USB

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 20:13:38 -05:00
300fdec86a
import the storage module directly
getting tired of updating the import and having to isort it, honestly

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 20:01:20 -05:00
a0734c9b48
add method to search for version strings in binaries
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 20:01:20 -05:00
1f65f23a4f
clean up the huge import list in these tests
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 20:01:20 -05:00
eb95c80815
unsatisfyingly fix a mypy bytes vs. bytearray issue
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 20:01:20 -05:00
2a40c70b56
cover a bit more TUI in tests, and remove dead branches
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 20:01:20 -05:00
e35d8dbf3d
add some more UF2 tests and sanity checks
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 20:01:20 -05:00
4a7203d969
dump the board config via --board-config
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 20:01:20 -05:00
5b8396c097
update concatenate examples following rename of output flag
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 20:01:14 -05:00
6bc93f148b
allow for reading UF2 files in visualize-config
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 16:21:20 -05:00
2ce0c4d7df
don't "optimize" the UF2 until the combination is fixed
naively adding UF2 blocks together is at least wrong by spec; it
produces one file with wrong block counts --- say I'm writing 3770
blocks, the naive uf2(firmware) + uf2(config) solution yields a file
that says it's 3642 blocks for a while, then 128 blocks. picotool kind
of does a "wtf" at this but writes it anyway, but I am not confident
this is safe, so I'll just do the dumb thing again for now (meaning we
pretty much always write 8128 or 8192 blocks when concatenating configs)

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 15:27:58 -05:00
8e6a203398
improve concatenate to create smaller UF2s
the prior version, for the board/user configs, took the whole ~2MB
binary file and converted it to a UF2, which made for a lot of chunks
that were just writing 0s, between the end of the firmware and the start
of the config(s). this changes the logic to build each portion as
separate UF2 chunks and then combine them.

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 13:09:02 -05:00
65ae51af72
rename visualize-storage as visualize-config
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 10:39:29 -05:00
79ea02a968
confirm the v0.7.8-RC2 protobuf configs are also v0.7.8
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 10:33:48 -05:00
e8c854b9ea
backfill the CHANGELOG
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 10:29:28 -05:00
ffbc3cc0d7
check REUSE as part of tox
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 10:26:28 -05:00
ba620c87ca
fix pyproject.toml package find the proper way
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-04-12 10:23:18 -05:00