Skip to content

Commit 533bb19

Browse files
authored
removed vendor from load device in project script (#182)
1 parent a5e4288 commit 533bb19

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

internal/stm32CubeMX/stm32CubeMX.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,12 @@ func WriteProjectFile(workDir string, params BridgeParamType) (string, error) {
386386
if params.BoardName != "" && params.BoardVendor == "STMicroelectronics" {
387387
text.AddLine("loadboard", params.BoardName, "allmodes")
388388
} else {
389-
text.AddLine("load", params.Device)
389+
split := strings.Split(params.Device, "::")
390+
if len(split) >= 1 {
391+
text.AddLine("load", split[len(split)-1])
392+
} else {
393+
text.AddLine("load", params.Device)
394+
}
390395
}
391396
text.AddLine("project name", "STM32CubeMX")
392397

0 commit comments

Comments
 (0)