@@ -524,7 +524,7 @@ auto device_selection =
524
524
(option(" --pid" ) & integer(" pid" ).set(settings.pid)) % "Filter by product id" +
525
525
(option(" --ser" ) & value(" ser" ).set(settings.ser)) % "Filter by serial number"
526
526
+ option(' f' , " --force" ).set(settings.force) % "Force a device not in BOOTSEL mode but running compatible code to reset so the command can be executed. After executing the command (unless the command itself is a ' reboot' ) the device will be rebooted back to application mode" +
527
- option(' F' , " --force-no-reboot" ).set(settings.force_no_reboot) % "Force a device not in BOOTSEL mode but running compatible code to reset so the command can be executed. After executing the command (unless the command itself is a ' reboot' ) the device will be left connected and accessible to picotool, but without the RPI-RP2 drive mounted"
527
+ option(' F' , " --force-no-reboot" ).set(settings.force_no_reboot) % "Force a device not in BOOTSEL mode but running compatible code to reset so the command can be executed. After executing the command (unless the command itself is a ' reboot' ) the device will be left connected and accessible to picotool, but without the USB drive mounted"
528
528
).min(0 ).doc_non_optional(true ).collapse_synopsys(" device-selection" );
529
529
530
530
#define file_types_x (i )\
@@ -668,15 +668,15 @@ struct verify_command : public cmd {
668
668
669
669
group get_cli () override {
670
670
return (
671
- device_selection % " Target device selection" +
672
671
file_selection % " The file to compare against" +
673
672
(
674
673
(option (' r' , " --range" ).set (settings.range_set ) % " Compare a sub range of memory only" &
675
674
hex (" from" ).set (settings.from ) % " The lower address bound in hex" &
676
675
hex (" to" ).set (settings.to ) % " The upper address bound in hex" ).force_expand_help (true ) +
677
676
(option (' o' , " --offset" ).set (settings.offset_set ) % " Specify the load address when comparing with a BIN file" &
678
677
hex (" offset" ).set (settings.offset ) % " Load offset (memory address; default 0x10000000)" ).force_expand_help (true )
679
- ).min (0 ).doc_non_optional (true ) % " Address options"
678
+ ).min (0 ).doc_non_optional (true ) % " Address options" +
679
+ device_selection % " Target device selection"
680
680
);
681
681
}
682
682
@@ -704,8 +704,8 @@ struct save_command : public cmd {
704
704
(option (" --family" ) % " Specify the family ID to save the file as" &
705
705
family_id (" family_id" ).set (settings.family_id ) % " family ID to save file as" ).force_expand_help (true ) +
706
706
( // note this parenthesis seems to help with error messages for say save --foo
707
- device_selection % " Source device selection " +
708
- file_selection % " File to save to "
707
+ file_selection % " File to save to " +
708
+ device_selection % " Source device selection "
709
709
)
710
710
);
711
711
}
@@ -862,7 +862,7 @@ struct link_command : public cmd {
862
862
named_file_selection_x (" infile1" , 1 ) % " Files to link" +
863
863
named_file_selection_x (" infile2" , 2 ) % " Files to link" +
864
864
optional_file_selection_x (" infile3" , 3 ) % " Files to link" +
865
- option (' p' , " --pad" ) & hex (" pad" ).set (settings.link .align ) % " Specify alignment to pad to, defaults to 0x1000"
865
+ ( option (' p' , " --pad" ) & hex (" pad" ).set (settings.link .align ) ) % " Specify alignment to pad to, defaults to 0x1000"
866
866
);
867
867
}
868
868
@@ -965,12 +965,12 @@ struct otp_list_command : public cmd {
965
965
" ROW_NAME to select a whole row by name.\n " \
966
966
" ROW_NUMBER to select a whole row by number.\n " \
967
967
" PAGE:PAGE_ROW_NUMBER to select a whole row by page and number within page.\n\n " \
968
- " ... or can select a single field/subset of a row (where REG_SEL is one of the above row selectors):\n\n "
969
- " REG_SEL .FIELD_NAME to select a field within a row by name.\n " \
970
- " REG_SEL .n-m to select a range of bits within a row.\n " \
971
- " REG_SEL .n to select a single bit within a row.\n " \
968
+ " ... or can select a single field/subset of a row (where ROW_SEL is one of the above row selectors):\n\n "
969
+ " ROW_SEL .FIELD_NAME to select a field within a row by name.\n " \
970
+ " ROW_SEL .n-m to select a range of bits within a row.\n " \
971
+ " ROW_SEL .n to select a single bit within a row.\n " \
972
972
" .FIELD_NAME to select any row's field by name.\n\n " \
973
- " .. or can selected multiple rows by using blank or '*' for PAGE or PAGE_ROW_NUMBER" ).repeatable ().min (0 )
973
+ " .. or can select multiple rows by using blank or '*' for PAGE or PAGE_ROW_NUMBER" ).repeatable ().min (0 )
974
974
) % " Row/Field Selection"
975
975
);
976
976
}
@@ -989,7 +989,7 @@ struct otp_get_command : public cmd {
989
989
return (
990
990
(
991
991
(option (' c' , " --copies" ) & integer (" copies" ).min (1 ).set (settings.otp .redundancy )) % " Read multiple redundant values" +
992
- option (' r' , " --raw" ).set (settings.otp .raw ) % " Get raw 24 bit values" +
992
+ option (' r' , " --raw" ).set (settings.otp .raw ) % " Get raw 24- bit values" +
993
993
option (' e' , " --ecc" ).set (settings.otp .ecc ) % " Use error correction" +
994
994
option (' n' , " --no-descriptions" ).set (settings.otp .list_no_descriptions ) % " Don't show descriptions" +
995
995
(option (' i' , " --include" ) & value (" filename" ).add_to (settings.otp .extra_files )).min (0 ).max (1 ) % " Include extra otp definition" // todo more than 1
@@ -1004,12 +1004,12 @@ struct otp_get_command : public cmd {
1004
1004
" ROW_NAME to select a whole row by name.\n " \
1005
1005
" ROW_NUMBER to select a whole row by number.\n " \
1006
1006
" PAGE:PAGE_ROW_NUMBER to select a whole row by page and number within page.\n\n " \
1007
- " ... or can select a single field/subset of a row (where REG_SEL is one of the above row selectors):\n\n "
1008
- " REG_SEL .FIELD_NAME to select a field within a row by name.\n " \
1009
- " REG_SEL .n-m to select a range of bits within a row.\n " \
1010
- " REG_SEL .n to select a single bit within a row.\n " \
1007
+ " ... or can select a single field/subset of a row (where ROW_SEL is one of the above row selectors):\n\n "
1008
+ " ROW_SEL .FIELD_NAME to select a field within a row by name.\n " \
1009
+ " ROW_SEL .n-m to select a range of bits within a row.\n " \
1010
+ " ROW_SEL .n to select a single bit within a row.\n " \
1011
1011
" .FIELD_NAME to select any row's field by name.\n\n " \
1012
- " .. or can selected multiple rows by using blank or '*' for PAGE or PAGE_ROW_NUMBER" ).repeatable ().min (0 )
1012
+ " .. or can select multiple rows by using blank or '*' for PAGE or PAGE_ROW_NUMBER" ).repeatable ().min (0 )
1013
1013
) % " Row/Field Selection"
1014
1014
);
1015
1015
}
@@ -1028,7 +1028,7 @@ struct otp_dump_command : public cmd {
1028
1028
group get_cli () override {
1029
1029
return (
1030
1030
(
1031
- option (' r' , " --raw" ).set (settings.otp .raw ) % " Get raw 24 bit values" +
1031
+ option (' r' , " --raw" ).set (settings.otp .raw ) % " Get raw 24- bit values. This is the default " +
1032
1032
option (' e' , " --ecc" ).set (settings.otp .ecc ) % " Use error correction"
1033
1033
).min (0 ).doc_non_optional (true ) % " Row/field options" +
1034
1034
(
@@ -1050,7 +1050,7 @@ struct otp_load_command : public cmd {
1050
1050
group get_cli () override {
1051
1051
return (
1052
1052
(
1053
- option (' r' , " --raw" ).set (settings.otp .raw ) % " Get raw 24 bit values" +
1053
+ option (' r' , " --raw" ).set (settings.otp .raw ) % " Set raw 24- bit values. This is the default for BIN files " +
1054
1054
option (' e' , " --ecc" ).set (settings.otp .ecc ) % " Use error correction" +
1055
1055
(option (' s' , " --start_row" ) & integer (" row" ).set (settings.otp .row )) % " Start row to load at (note use 0x for hex)" +
1056
1056
(option (' i' , " --include" ) & value (" filename" ).add_to (settings.otp .extra_files )).min (0 ).max (1 ) % " Include extra otp definition" // todo more than 1
@@ -1061,7 +1061,7 @@ struct otp_load_command : public cmd {
1061
1061
}
1062
1062
1063
1063
string get_doc () const override {
1064
- return " Load the row range stored in a file into OTP and verify. Data is 2 bytes/row for ECC, 4 bytes/row for raw." ;
1064
+ return " Load the row range stored in a file into OTP and verify. Data is 2 bytes/row for ECC, 4 bytes/row for raw (MSB is ignored) ." ;
1065
1065
}
1066
1066
};
1067
1067
@@ -1074,19 +1074,24 @@ struct otp_set_command : public cmd {
1074
1074
group get_cli () override {
1075
1075
return (
1076
1076
(
1077
- (option (' c' , " --copies" ) & integer (" copies" ).min (1 ).set (settings.otp .redundancy )) % " Read multiple redundant values" +
1078
- option (' r' , " --raw" ).set (settings.otp .raw ) % " Set raw 24 bit values" +
1077
+ (option (' c' , " --copies" ) & integer (" copies" ).min (1 ).set (settings.otp .redundancy )) % " Write multiple redundant values" +
1078
+ option (' r' , " --raw" ).set (settings.otp .raw ) % " Set raw 24- bit values" +
1079
1079
option (' e' , " --ecc" ).set (settings.otp .ecc ) % " Use error correction" +
1080
1080
option (' s' , " --set-bits" ).set (settings.otp .ignore_set ) % " Set bits only" +
1081
1081
(option (' i' , " --include" ) & value (" filename" ).add_to (settings.otp .extra_files )).min (0 ).max (1 ) % " Include extra otp definition" // todo more than 1
1082
1082
).min (0 ).doc_non_optional (true ) % " Redundancy/Error Correction Overrides" +
1083
1083
(
1084
1084
option (' z' , " --fuzzy" ).set (settings.otp .fuzzy ) % " Allow fuzzy name searches in selector vs exact match" +
1085
1085
(value (" selector" ).add_to (settings.otp .selectors ) %
1086
- " The row/field selector, which can be:\n ROW_NAME or ROW_NUMBER or PAGE:PAGE_ROW_NUMBER to select a whole row.\n "
1087
- " FIELD, REG.FIELD, REG.n-m, PAGE:PAGE_ROW_NUMBER.FIELD or PAGE:PAGE_ROW_NUMBER.n-m to select a row field.\n\n "
1088
- " where:\n\n REG and FIELD are names (or parts of names with fuzzy searches).\n PAGE and PAGE_ROW_NUMBER are page numbers and row within a page, "
1089
- " ROW_NUMBER is an absolute row number offset, and n-m are the inclusive bit ranges of a field." )
1086
+ " The row/field selector, which can select a whole row:\n\n " \
1087
+ " ROW_NAME to select a whole row by name.\n " \
1088
+ " ROW_NUMBER to select a whole row by number.\n " \
1089
+ " PAGE:PAGE_ROW_NUMBER to select a whole row by page and number within page.\n\n " \
1090
+ " ... or can select a single field/subset of a row (where ROW_SEL is one of the above row selectors):\n\n "
1091
+ " ROW_SEL.FIELD_NAME to select a field within a row by name.\n " \
1092
+ " ROW_SEL.n-m to select a range of bits within a row.\n " \
1093
+ " ROW_SEL.n to select a single bit within a row.\n " \
1094
+ " .FIELD_NAME to select any row's field by name." )
1090
1095
) % " Row/Field Selection" +
1091
1096
integer (" value" ).set (settings.otp .value ) % " The value to set" +
1092
1097
(
@@ -7882,7 +7887,10 @@ static void sleep_ms(int ms) {
7882
7887
}
7883
7888
7884
7889
void get_terminal_size (int & width, int & height) {
7885
- #if defined(_WIN32)
7890
+ #if defined(DOCS_WIDTH)
7891
+ width = DOCS_WIDTH;
7892
+ height = 24 ;
7893
+ #elif defined(_WIN32)
7886
7894
CONSOLE_SCREEN_BUFFER_INFO csbi;
7887
7895
GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &csbi);
7888
7896
width = (int )(csbi.dwSize .X );
0 commit comments