binary-format supports uf2, nrf-dfu
This commit is contained in:
@@ -29,6 +29,8 @@ type Config struct {
|
||||
|
||||
// Binary and firmware configuration
|
||||
BinaryFormat string `json:"binary-format"`
|
||||
// UF2 configuration
|
||||
UF2FamilyID string `json:"uf2-family-id"`
|
||||
|
||||
// Flash and deployment configuration
|
||||
FlashCommand string `json:"flash-command"`
|
||||
@@ -39,9 +41,6 @@ type Config struct {
|
||||
MSDVolumeName []string `json:"msd-volume-name"`
|
||||
MSDFirmwareName string `json:"msd-firmware-name"`
|
||||
|
||||
// UF2 configuration
|
||||
UF2FamilyID string `json:"uf2-family-id"`
|
||||
|
||||
// Device-specific configuration
|
||||
RP2040BootPatch bool `json:"rp2040-boot-patch"`
|
||||
|
||||
@@ -66,6 +65,13 @@ func (c *Config) IsEmpty() bool {
|
||||
return c.Name == "" && c.LLVMTarget == "" && c.GOOS == "" && c.GOARCH == ""
|
||||
}
|
||||
|
||||
func (c *Config) FormatDetail() string {
|
||||
if c.BinaryFormat == "uf2" {
|
||||
return c.UF2FamilyID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// HasInheritance returns true if this config inherits from other configs
|
||||
func (rc *RawConfig) HasInheritance() bool {
|
||||
return len(rc.Inherits) > 0
|
||||
|
||||
Reference in New Issue
Block a user