Skip to contentSkip to conversation

arm: stm32mp: stm32prog: add "Device Name" in iproduct during DFU USB enumeration

PATCH New Patrick Delaunay 2 participants 2 messages Jun 16, 2020 – Jul 2, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: stm32mp: stm32prog: add "Device Name" in iproduct during DFU USB enumeration

Add "Device Name" in iproduct during DFU USB enumeration to have this information in STM32CubeProgrammer trace (this tools is compatible with @Name since v2.3)

---

 arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c +4 -2
index 969245e199..30547f94c9 100644
@@ -197,10 +197,12 @@ bool stm32prog_usb_loop(struct stm32prog_data *data, int dev)
 	bool result;
 	/* USB download gadget for STM32 Programmer */
 	char product[128];
+	char name[SOC_NAME_SIZE];
 
+	get_soc_name(name);
 	snprintf(product, sizeof(product),
-		 "USB download gadget at Device ID /0x%03X, @Revision ID /0x%04X",
-		 get_cpu_dev(), get_cpu_rev());
+		 "USB download gadget at Device ID /0x%03X, @Revision ID /0x%04X, @Name /%s,",
+		 get_cpu_dev(), get_cpu_rev(), name);
 	g_dnl_set_product(product);
 
 	if (stm32prog_data->phase == PHASE_FLASHLAYOUT) {
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 arm: stm32mp: stm32prog: add "Device Name" in iproduct during DFU USB enumeration

Hi Patrick

Quoted 19 lines · Patrick Delaunay

Add "Device Name" in iproduct during DFU USB enumeration to have this information in STM32CubeProgrammer trace (this tools is compatible with @Name since v2.3)

---

 arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c +1 -0
index 969245e199..30547f94c9 100644
@@ -197,10 +197,12 @@ bool stm32prog_usb_loop(struct stm32prog_data *data, int dev)
 	bool result;
 	/* USB download gadget for STM32 Programmer */
 	char product[128];
+	char name[SOC_NAME_SIZE];

arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c bool stm32prog_usb_loop(struct stm32prog_data *data, int dev) · line 208

Quoted 10 lines
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c +3 -2
 
+	get_soc_name(name);
 	snprintf(product, sizeof(product),
-		 "USB download gadget at Device ID /0x%03X, @Revision ID /0x%04X",
-		 get_cpu_dev(), get_cpu_rev());
+		 "USB download gadget at Device ID /0x%03X, @Revision ID /0x%04X, @Name /%s,",
+		 get_cpu_dev(), get_cpu_rev(), name);
 	g_dnl_set_product(product);
 
 	if (stm32prog_data->phase == PHASE_FLASHLAYOUT) {

Thanks