Display uf2 combine --offset default-value in hexadecimal (#353)
* Display uf2 combine --offset default-value in hexadecimal
* Fix other `hex` options
---------
Co-authored-by: will-v-pi <108662275+will-v-pi@users.noreply.github.com>
Co-authored-by: William Vinnicombe <william.vinnicombe@raspberrypi.com>
diff --git a/README.md b/README.md
index 6e9bb9a..b22ba87 100644
--- a/README.md
+++ b/README.md
@@ -732,7 +732,7 @@
--minor <minor>
Add Minor Version
--rollback <rollback> [<rows>..]
- Add Rollback Version
+ Add Rollback Version, optionally specifying rollback rows in hex
Configuration
--hash
Hash the file
@@ -966,7 +966,7 @@
--abs-block
Enforce support for an absolute block
<abs_block_loc>
- absolute block location (default to 0x10ffff00)
+ absolute block location (memory address; default 0x10ffff00)
```
## uf2
@@ -1021,7 +1021,7 @@
--abs-block
Add an absolute block
<abs_block_loc>
- absolute block location (default to 0x10ffff00)
+ absolute block location (memory address; default 0x10ffff00)
```
### combine
@@ -1067,7 +1067,7 @@
--offset
Offset second UF2 by amount
<offset>
- offset amount (default to 0)
+ offset amount (hexadecimal; default 0x0)
Partition options
--partition
Place second UF2 in partition (first UF2 must contain a partition table)
@@ -1077,7 +1077,7 @@
--abs-block
Add an absolute block
<abs_block_loc>
- absolute block location (default to 0x10ffff00)
+ absolute block location (memory address; default 0x10ffff00)
```
The `--partition` argument can be used to place the second file in a partition number, provided that there is a partition table in the first file. For example, take this `pt.json`
@@ -1727,7 +1727,7 @@
--verbose
Print verbose output
-p <pad>
- Specify alignment to pad to, defaults to 0x1000
+ Specify alignment to pad to (hexadecimal; default 0x1000)
File to write to
<outfile>
The file name
diff --git a/main.cpp b/main.cpp
index 534b794..38c467b 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1225,7 +1225,7 @@
option("--rollback") &
integer("rollback").set(settings.seal.rollback_version) +
hex("rows").add_to(settings.seal.rollback_rows).min(0).repeatable()
- ).min(0) % "Add Rollback Version"
+ ).min(0) % "Add Rollback Version, optionally specifying rollback rows in hex"
);
}
@@ -1248,7 +1248,7 @@
named_file_selection_x("infile1", 1) % "Files to link" +
named_file_selection_x("infile2", 2) % "Files to link" +
optional_file_selection_x("infile3", 3) % "Files to link" +
- (option('p', "--pad") & hex("pad").set(settings.link.align)) % "Specify alignment to pad to, defaults to 0x1000"
+ (option('p', "--pad") & hex("pad").set(settings.link.align)) % "Specify alignment to pad to (hexadecimal; default 0x1000)"
);
}
@@ -1308,7 +1308,7 @@
#if SUPPORT_RP2350_A2
+ (
option("--abs-block").set(settings.uf2.abs_block) % "Enforce support for an absolute block" +
- hex("abs_block_loc").set(settings.uf2.abs_block_loc).min(0) % "absolute block location (default to 0x10ffff00)"
+ hex("abs_block_loc").set(settings.uf2.abs_block_loc).min(0) % "absolute block location (memory address; default 0x10ffff00)"
).force_expand_help(true).min(0) % "Errata RP2350-E10 Fix"
#endif
);
@@ -1610,7 +1610,7 @@
#if SUPPORT_RP2350_A2
+ (
option("--abs-block").set(settings.uf2.abs_block) % "Add an absolute block" +
- hex("abs_block_loc").set(settings.uf2.abs_block_loc).min(0) % "absolute block location (default to 0x10ffff00)"
+ hex("abs_block_loc").set(settings.uf2.abs_block_loc).min(0) % "absolute block location (memory address; default 0x10ffff00)"
).force_expand_help(true).min(0) % "Errata RP2350-E10 Fix"
#endif
);
@@ -1639,7 +1639,7 @@
).force_expand_help(true) % "UF2 Family options" +
(
option("--offset").set(settings.uf2.offset_set) % "Offset second UF2 by amount" &
- hex("offset").set(settings.uf2.offset) % "offset amount (default to 0)"
+ hex("offset").set(settings.uf2.offset) % "offset amount (hexadecimal; default 0x0)"
).force_expand_help(true) % "Offset options" +
(
option("--partition").set(settings.uf2.partition_set) % "Place second UF2 in partition (first UF2 must contain a partition table)" &
@@ -1648,7 +1648,7 @@
#if SUPPORT_RP2350_A2
+ (
option("--abs-block").set(settings.uf2.abs_block) % "Add an absolute block" +
- hex("abs_block_loc").set(settings.uf2.abs_block_loc).min(0) % "absolute block location (default to 0x10ffff00)"
+ hex("abs_block_loc").set(settings.uf2.abs_block_loc).min(0) % "absolute block location (memory address; default 0x10ffff00)"
).force_expand_help(true).min(0) % "Errata RP2350-E10 Fix"
#endif
);