Is there a way to debug firmware using a rs-232 connection to the circuit?
See www.mecanique.co.uk/code-studio/ their solution adds a header to the firmware to add the debug functionality. I�m looking for something like this, but for C.
You have a pic with a bootloader, then you load the header+firmware and use the built-in debugger to run step by step.
AllanL5
Joined: 05 Apr 2004 Posts: 6
Posted: Thu Jun 17, 2004 2:15 pm
The way MBasic does this is to insert a debug call between every Basic token. I don't know how the Code Studio gets the debug information -- there's a slightly cryptic note that it uses "HSERIN/HSEROUT to send the debug information" which makes me think Code Studio does something similar.
If you wanted to debug 'C' code this way, you would need to develop a pre-processor which would insert a 'debug_pause()' entry or something between each 'real' line of 'C' code. Then compile with the 'debug_pause()' lines enabled.
'debug_pause()' should send some data to your monitoring program, and wait for you to give it a carriage return or something from your monitoring program. This way, you can debug over the same serial connection you program with.
The ICD hardware solutions do this in hardware -- since the ICD controls the clocking of the hardware. Simulators (like MPLAB 6.10 on have) let you do this in software -- but then you can't monitor the hardware pins to verify the rest of the circuit works.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum