Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions newt/cli/build_cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,10 @@ func loadRunCmd(cmd *cobra.Command, args []string) {
NewtUsage(cmd, util.NewNewtError("Must specify target"))
}

if util.InjectSyscfg != "" {
util.InjectSyscfg = "MYNEWT_DOWNLOADER=" + util.InjectSyscfg
}

TryGetProject()

t := ResolveTarget(args[0])
Expand Down Expand Up @@ -501,6 +505,8 @@ func AddBuildCommands(cmd *cobra.Command) {
"Extra commands to send to JTAG software")
loadCmd.PersistentFlags().StringVarP(&imgFileOverride, "imgfile", "", "",
"Path of .img file to load instead of target artifact")
loadCmd.Flags().StringVarP(&util.InjectSyscfg, "loader", "L", "",
"Override loader value from syscfg")

debugHelpText := "Open a debugger session for <target-name>"

Expand Down
6 changes: 6 additions & 0 deletions newt/cli/run_cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ func runRunCmd(cmd *cobra.Command, args []string) {
useV2 = true
}

if util.InjectSyscfg != "" {
util.InjectSyscfg = "MYNEWT_DOWNLOADER=" + util.InjectSyscfg
}

TryGetProject()

b, err := TargetBuilderForTargetOrUnittest(args[0])
Expand Down Expand Up @@ -170,6 +174,8 @@ func AddRunCommands(cmd *cobra.Command) {
"pad-image", "i", 0, "Pad image to this length")
runCmd.PersistentFlags().StringVarP(&sections,
"sections", "S", "", "Section names for TLVs, comma delimited")
runCmd.Flags().StringVarP(&util.InjectSyscfg, "loader", "L", "",
"Override loader value from syscfg")

cmd.AddCommand(runCmd)
AddTabCompleteFn(runCmd, func() []string {
Expand Down