@@ -133,7 +133,7 @@ fn main() -> Result<()> {
133
133
check_for_update ( env ! ( "CARGO_PKG_NAME" ) , env ! ( "CARGO_PKG_VERSION" ) ) ;
134
134
135
135
// Load any user configuration, if present.
136
- let config = Config :: load ( ) . unwrap ( ) ;
136
+ let config = Config :: load ( ) ? ;
137
137
138
138
// Execute the correct action based on the provided subcommand and its
139
139
// associated arguments.
@@ -158,8 +158,6 @@ fn flash(args: FlashArgs, config: &Config) -> Result<()> {
158
158
let cargo_config = CargoConfig :: load ( & metadata. workspace_root , & metadata. package_root ) ;
159
159
160
160
let mut flasher = connect ( & args. connect_args , config) ?;
161
- print_board_info ( & mut flasher) ?;
162
-
163
161
let chip = flasher. chip ( ) ;
164
162
let target = chip. into_target ( ) ;
165
163
let target_xtal_freq = target. crystal_freq ( flasher. connection ( ) ) ?;
@@ -170,6 +168,8 @@ fn flash(args: FlashArgs, config: &Config) -> Result<()> {
170
168
// Read the ELF data from the build path and load it to the target.
171
169
let elf_data = fs:: read ( build_ctx. artifact_path ) . into_diagnostic ( ) ?;
172
170
171
+ print_board_info ( & mut flasher) ?;
172
+
173
173
if args. flash_args . ram {
174
174
flasher. load_elf_to_ram ( & elf_data) ?;
175
175
} else {
@@ -187,6 +187,13 @@ fn flash(args: FlashArgs, config: &Config) -> Result<()> {
187
187
. or ( metadata. partition_table . as_deref ( ) )
188
188
. or ( build_ctx. partition_table_path . as_deref ( ) ) ;
189
189
190
+ if let Some ( path) = & bootloader {
191
+ println ! ( "Bootloader: {}" , path. display( ) ) ;
192
+ }
193
+ if let Some ( path) = & partition_table {
194
+ println ! ( "Partition table: {}" , path. display( ) ) ;
195
+ }
196
+
190
197
let partition_table = match partition_table {
191
198
Some ( path) => Some ( parse_partition_table ( path) ?) ,
192
199
None => None ,
@@ -428,6 +435,12 @@ fn save_image(args: SaveImageArgs) -> Result<()> {
428
435
}
429
436
println ! ( "Merge: {}" , args. save_image_args. merge) ;
430
437
println ! ( "Skip padding: {}" , args. save_image_args. skip_padding) ;
438
+ if let Some ( path) = & args. save_image_args . bootloader {
439
+ println ! ( "Bootloader: {}" , path. display( ) ) ;
440
+ }
441
+ if let Some ( path) = & args. save_image_args . partition_table {
442
+ println ! ( "Partition table: {}" , path. display( ) ) ;
443
+ }
431
444
432
445
save_elf_as_image (
433
446
args. save_image_args . chip ,
0 commit comments