@@ -15,7 +15,7 @@ use std::{
15
15
path:: { Path , PathBuf } ,
16
16
} ;
17
17
18
- use clap:: { builder :: ArgPredicate , Args } ;
18
+ use clap:: Args ;
19
19
use comfy_table:: { modifiers, presets:: UTF8_FULL , Attribute , Cell , Color , Table } ;
20
20
use esp_idf_part:: { DataType , Partition , PartitionTable } ;
21
21
use indicatif:: { style:: ProgressStyle , HumanCount , ProgressBar , ProgressDrawTarget } ;
@@ -55,9 +55,9 @@ pub struct ConnectArgs {
55
55
#[ cfg( feature = "raspberry" ) ]
56
56
#[ cfg_attr( feature = "raspberry" , clap( long) ) ]
57
57
pub rts : Option < u8 > ,
58
- /// Use RAM stub for loading
59
- #[ arg( long, default_value_ifs ( [ ( "erase_parts" , ArgPredicate :: IsPresent , Some ( "true" ) ) , ( "erase_data_parts" , ArgPredicate :: IsPresent , Some ( "true" ) ) ] ) ) ]
60
- pub use_stub : bool ,
58
+ /// Do not use the RAM stub for loading
59
+ #[ arg( long) ]
60
+ pub no_stub : bool ,
61
61
}
62
62
63
63
/// Configure communication with the target device's flash
@@ -254,7 +254,7 @@ pub fn connect(args: &ConnectArgs, config: &Config) -> Result<Flasher> {
254
254
interface,
255
255
port_info,
256
256
args. baud ,
257
- args. use_stub ,
257
+ ! args. no_stub ,
258
258
) ?)
259
259
}
260
260
@@ -303,7 +303,7 @@ pub fn serial_monitor(args: MonitorArgs, config: &Config) -> Result<()> {
303
303
304
304
// The 26MHz ESP32-C2's need to be treated as a special case.
305
305
let default_baud = if chip == Chip :: Esp32c2
306
- && ! args. connect_args . use_stub
306
+ && args. connect_args . no_stub
307
307
&& target. crystal_freq ( flasher. connection ( ) ) ? == 26
308
308
{
309
309
74_880
0 commit comments