@@ -634,19 +634,24 @@ bool efm32_probe(target_s *t)
634634 uint32_t pn = target_mem32_read32 (t , EFR32FG23_DI_PART );
635635 uint8_t family = (pn >> 24 ) & 0x3f ; // Extract bits 29-24 (6 bits)
636636 uint8_t familynum = (pn >> 16 ) & 0x3f ; /* Extract family ID from bits 21-16 */
637- uint16_t devicenum = pn & 0xffff ; /* Extract DEVICENUM from bits 0-15 */
638637
639638 /* Check for known EFR32FG23 OUIs */
640639 if (familynum == 23 && (family == 0 || family == 3 || family == 5 )) {
641640 /* Use Device Identification version 3 for EFR32FG23 */
642641 di_version = 3 ;
643- DEBUG_INFO ("EFR32xG23 Device found\n" );
644- DEBUG_INFO ("EFR32xG23 Family (decimal): %u\n" , family );
645- DEBUG_INFO ("EFR32xG23 FamilyNUM (decimal): %u\n" , familynum );
642+
643+ #ifndef DEBUG_INFO_IS_NOOP
644+ uint16_t devicenum = pn & 0xffff ; /* Extract DEVICENUM from bits 0-15 */
645+
646646 /* Convert device number to letter-number format (e.g., 1123 -> B123) */
647647 char letter = 'A' + (devicenum / 1000 );
648648 uint16_t number = devicenum % 1000 ;
649+
650+ DEBUG_INFO ("EFR32xG23 Device found\n" );
651+ DEBUG_INFO ("EFR32xG23 Family (decimal): %u\n" , family );
652+ DEBUG_INFO ("EFR32xG23 FamilyNUM (decimal): %u\n" , familynum );
649653 DEBUG_INFO ("EFR32xG23 Device : %c%03u\n" , letter , number );
654+ #endif
650655 } else {
651656 DEBUG_INFO ("Could not determine EFM32/EFR32 device type, assuming version 1." );
652657 di_version = 1 ;
0 commit comments