Open
Conversation
Collaborator
Parithi098
commented
Oct 17, 2025
- used to write() API to generate bin to avoid build warnings
rarun-mchp
requested changes
Oct 28, 2025
| .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" |
Collaborator
There was a problem hiding this comment.
is it like if not provided, debug token will not be generated.
Collaborator
Author
There was a problem hiding this comment.
@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.
Collaborator
There was a problem hiding this comment.
expand the help statement.
rarun-mchp
requested changes
Oct 29, 2025
| 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"); |
Collaborator
There was a problem hiding this comment.
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" |
Collaborator
There was a problem hiding this comment.
expand the help statement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.