Skip to content

Is there a good way of debugging code that uses the Xmodem transfers? #29

Answered by TomNisbet
rondnelson99 asked this question in Q&A
Discussion options

You must be logged in to vote

Ron,

I did most of the debugging by just storing a string that could be printed after the transfer finished. That's what the CmdStatus code does.

Some additional variables were added later that are printed with the INFO command. See PromDevice.h and cpp for the debugXXX variables. You can do a lot with this approach: store packet numbers to see how far you are getting, store the first character of the packet, etc. You can even store one or more debug strings and print them later. Maybe build a small buffer, like 16 characters, and add code that copies the beginning bytes of the packet to it when sequencenumber==1. Then you can dump this after the transfer and compare it to the start of yo…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rondnelson99
Comment options

Answer selected by TomNisbet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants