support flashing pca10059 from windows

This commit is contained in:
Olaf Flebbe
2021-06-03 14:27:33 +02:00
committed by Ron Evans
parent 9912dd6db1
commit 1f5e4e79aa
5 changed files with 48 additions and 1 deletions
+12
View File
@@ -639,6 +639,18 @@ func Build(pkgName, outpath string, config *compileopts.Config, action func(Buil
if err != nil {
return err
}
case "nrf-dfu":
// special format for nrfutil for Nordic chips
tmphexpath := filepath.Join(dir, "main.hex")
err := objcopy(executable, tmphexpath, "hex")
if err != nil {
return err
}
tmppath = filepath.Join(dir, "main"+outext)
err = makeDFUFirmwareImage(config.Options, tmphexpath, tmppath)
if err != nil {
return err
}
default:
return fmt.Errorf("unknown output binary format: %s", outputBinaryFormat)
}