microchip-pic-avr-tools / pymcuprog

a Python utility for programming various Microchip MCU devices using Microchip CMSIS-DAP based debuggers
MIT License
96 stars 22 forks source link

Debug output from SerialUPDI uses non-padded hex strings #12

Closed dbuchwald closed 2 years ago

dbuchwald commented 2 years ago

Sample output:

pymcuprog.serialupdi.link - DEBUG - STCS to 0x03
pymcuprog.serialupdi.physical - DEBUG - send : [0x55, 0xc3, 0x8]
pymcuprog.serialupdi.link - DEBUG - STCS to 0x02
pymcuprog.serialupdi.physical - DEBUG - send : [0x55, 0xc2, 0x80]

Now, the problem is the 0x8 value, which should have been in fact 0x08. Other entries are not consistent with rest of the output either (0xc3 here but pymcuprog.serialupdi.link - DEBUG - LDCS from 0x0B elsewhere). This is all due to usage of hex(x) function usage in physical.py module.

xedbg commented 2 years ago

Thanks @dbuchwald ! Logged as DSG-4242 (We will take this in 'upstream' and it will pop out again on the next build published)

dbuchwald commented 2 years ago

Thanks a lot!