Skip to content

Conversation

@Parithi098
Copy link
Collaborator

  • used to write() API to generate bin to avoid build warnings

.cfg_type=CFG_FILE_R,
.value_addr=&cfg.sjtag_debug_token,
.argument_type=required_argument,
.help="Optional Argument. If not provided, the Debug Token will be generated\n"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it like if not provided, debug token will not be generated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rarun-mchp both arguments 'i'(debug_token_input_file) and 'o'(debug_token_output_file) are optional.

'o' is for SJTAG unlocking with HSM
'i' is for SJTAG unlocking without HSM

'o' with file name - sjtag_debug_token.bin is the default
i.e., switchtec mfg sjtag-unlock

So, to answer your question, even if no arguments are provided, debug token bin will still be generated.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expand the help statement.

fclose(debug_token_bin_file);
getcwd(dir_path, sizeof(dir_path));
printf("Generated SJTAG Debug Token Path: %s/sjtag_debug_token.bin\n", dir_path);
switchtec_perror("Error saving the Debug token");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test this path by providing the invalid absolute path.

.cfg_type=CFG_FILE_R,
.value_addr=&cfg.sjtag_debug_token,
.argument_type=required_argument,
.help="Optional Argument. If not provided, the Debug Token will be generated\n"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expand the help statement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants