Brian S. Stephan
0d54d3b805
concatenate flags to combine board and user configs
...
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-06 13:45:12 -06:00
Brian S. Stephan
ef71db6f5e
methods to add/retrieve board config to binary
...
with this, the combining methods can combine both a board and user
config into one binary, which is a step closer to having a command that
does it, and then we can start removing BoardConfig.h from the firmware
build and replace it with patched binaries.
to test it, another retrieval method was added too, and this will
probably be used for more dump commands or a better info or something
like that
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-06 11:43:54 -06:00
Brian S. Stephan
bc64a6531b
add a method to pad a binary to the spot of the board config
...
the board config will be the same space as the user config, directly in
front of it in the flash
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-05 23:42:45 -06:00
Brian S. Stephan
c74edabf6d
break up pad_binary_to_user_config
...
just some refactoring in order to reuse parts for the board config
support
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-05 21:13:14 -06:00
Brian S. Stephan
841c3a38c3
s/get_storage_section/get_user_storage_section/
...
more renaming to make room for future methods
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-05 21:13:14 -06:00
Brian S. Stephan
578fd416da
rename get_config_from_usb as get_user_config_from_usb
...
this is to distinguish from the board config later
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-05 21:13:10 -06:00
Brian S. Stephan
05228b9f62
s/STORAGE_/USER_CONFIG_/
...
more address define renames to make an upcoming feature clearer
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-03 18:27:16 -06:00
Brian S. Stephan
8681a18d26
s/pad_firmware_up_to_storage/pad_binary_up_to_user_config/
...
this is just to clarify the purpose of this since a related method is
coming soon for the board config
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-03 18:13:54 -06:00
Brian S. Stephan
1d912794c2
docs update for new concatenate JSON feature and flags
...
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-03 18:10:31 -06:00
Brian S. Stephan
1966f6a71e
option to concatenate to combine a JSON config to a binary
...
this allows for putting a JSON representation of a config into the user
config area of a binary to be flashed on the board. this allows for
conveying configs as simple JSON files and using them to convey specific
binaries by parts
this is the start of the support to use JSON files on a *new* section of
the binary reserved for board default configs
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-03 13:35:26 -06:00
Brian S. Stephan
416157663d
STORAGE_BOOTSEL_ADDRESS is a better name than _MEMORY_
...
this is also just a different addressing mode with the same binary
offset from the start, so derive it from the binary location
2024-01-03 12:24:05 -06:00
Brian S. Stephan
f2ed281053
test parsing config as JSON into a message
...
this also bumps the proto files in the test directory as a matter of
convenience, so some tests got updated accordingly
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-03 12:20:54 -06:00
Brian S. Stephan
23cb5c9e5a
add SPDX-FileCopyrightText
...
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-02 15:15:55 -06:00
Brian S. Stephan
39cd3754f3
correct the LICENSE copyright to my name
...
as the Open Stick Community is not a legal entity, and I have not
transferred copyright to anyone/thing else, and because I am to date the
only author in this repository, I believe it is clearer to all and
stronger to just be explicit here and put my name in the license
document. this will be followed up by a SPDX update to the files
accordingly.
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2024-01-02 15:09:13 -06:00
Brian S. Stephan
39b80f4c8b
Add DCO/signoff docs and sign off on MAINTAINERS entry
...
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2023-12-18 10:44:04 -06:00
Brian S. Stephan
b2bf7984b0
add SPDX-License-Identifier: MIT to all source
...
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
2023-12-18 10:17:35 -06:00
Brian S. Stephan
6aa3ea6f84
update README; had the right memory alignment but not the size
2023-11-07 08:59:15 -06:00
Brian S. Stephan
f8cf57d37c
changelog updates
2023-11-07 00:27:26 -06:00
Brian S. Stephan
fc022452f5
replace most references to pico with RP2040
2023-11-07 00:26:51 -06:00
Brian S. Stephan
a8156f5e89
add version compatibility information to README
2023-11-07 00:06:03 -06:00
Brian S. Stephan
9aef8aae7c
correct config dump example for new start address
2023-11-06 23:59:48 -06:00
Brian S. Stephan
fcb1297139
test with 0.7.5 files, which has an expanded config section
2023-11-06 23:55:01 -06:00
Brian S. Stephan
a681a8e6a0
version bumps for the requirements files
2023-11-06 15:31:01 -06:00
Brian S. Stephan
1a7672b826
link to changelog in the package metadata
2023-07-12 19:21:06 -05:00
Brian S. Stephan
b4d55e102b
start maintaining a changelog
2023-07-12 19:19:31 -05:00
Brian S. Stephan
d2ef3efa3b
trivial reordering of command line flags
2023-07-12 18:32:05 -05:00
Brian S. Stephan
cce165f012
add flag to have concatenate write direct to USB
2023-07-12 17:50:43 -05:00
Brian S. Stephan
fb1729a957
write in 4096 byte chunks
2023-07-12 17:33:12 -05:00
Brian S. Stephan
8c5bd4397f
allow edit-config to fallback to new config if old doesn't exist
2023-07-12 00:08:55 -05:00
Brian S. Stephan
6a147aa1d8
attempt to address USB corruption by padding more
2023-07-11 23:28:34 -05:00
Brian S. Stephan
a7b8309b33
--replace-extra to overwrite config area when concatenating
2023-07-11 18:36:17 -05:00
Brian S. Stephan
baa3959e8a
dump-config's filename argument is not optional
2023-07-11 16:32:46 -05:00
Brian S. Stephan
b7bb437ae8
command to dump whole GP2040-CE image from USB
2023-07-11 16:27:01 -05:00
Brian S. Stephan
ef842032f1
add textual-dev to dev dependencies
2023-07-11 11:44:47 -05:00
Brian S. Stephan
2f5a99b695
use proper field descriptor when checking missing children
2023-07-10 16:00:26 -05:00
Brian S. Stephan
63295eeb21
small README update
2023-07-09 10:55:16 -05:00
Brian S. Stephan
853283e69c
edit-config over USB
2023-07-09 10:47:27 -05:00
Brian S. Stephan
2c446f595a
a bit more coverage around USB interactions (aka lots of mocks)
2023-07-09 10:41:40 -05:00
Brian S. Stephan
5bcb3dba3f
method to write the config over USB at the proper alignment
2023-07-09 10:03:44 -05:00
Brian S. Stephan
2d024c5b34
pico.write must happen at 256 byte boundaries
...
there's no good way to tell if the payload should be padded or if it
should just be realigned, so raise an exception and make the caller
figure it out
2023-07-09 09:16:55 -05:00
Brian S. Stephan
c25f6f4fd3
add command for writing to the BOOTSEL Pico
2023-07-08 23:48:47 -05:00
Brian S. Stephan
a1e3955a1f
add command to erase a section of flash
...
used by picotool as part of the write, so we'll do the same
2023-07-08 23:25:38 -05:00
Brian S. Stephan
fcb68a1b24
it's not possible to mock a run() invocation, bss, you silly man
2023-07-08 23:23:00 -05:00
Brian S. Stephan
654bebdeb6
test an invocation of dump-config
2023-07-07 20:21:58 -05:00
Brian S. Stephan
7a9d5ad1d1
dump-config tool to easily backup a board's config section
...
doesn't require picotool, doesn't include padding, does include the
footer
2023-07-07 20:09:00 -05:00
Brian S. Stephan
e2ad75371e
DRY: convenience method to get config from USB
2023-07-07 20:03:41 -05:00
Brian S. Stephan
61aadae2ca
tiny README organization change
2023-07-07 19:00:12 -05:00
Brian S. Stephan
0378269a00
--usb flag to edit-config direct off the board
2023-07-07 18:58:25 -05:00
Brian S. Stephan
70d3ce8be0
--usb flag to visualize-storage direct off the board
2023-07-07 18:31:13 -05:00
Brian S. Stephan
10dcd149cc
add methods to read directly off the board over USB
2023-07-07 16:45:07 -05:00