3
\$\begingroup\$

I am using WindRiver JTAG Debugger to debug my code. Whenever I run the code with Debugger connected, Code works correctly but If I disconnect it, It fails to even Start!

Has anyone faced such kind of Problems?

\$\endgroup\$
  • 3
    \$\begingroup\$ You can't expect anyone to help unless you give enough information, like what processor it is for a start... \$\endgroup\$ – mikeselectricstuff Jan 21 '11 at 9:38
  • \$\begingroup\$ @mikeselectricstuff :I am using MFC5253 processor with WindRiver Debugger! \$\endgroup\$ – Swanand Jan 21 '11 at 12:19
5
\$\begingroup\$

My debugger for a Coldfire does some initialization of the SDRAM controller and other low-level registers that is normally done by the bootloader. Check to see how your debugger initializes the chip.

\$\endgroup\$
3
\$\begingroup\$

Here are the reasons I have seen this case occur:

  1. I have seen students not place pull up resistors on their MCLR pins on PICs. When hooked up to the debugger, the debugger pulls it up for them, but once they disconnect it nothing works.
  2. A bad ground. This is a bit harder to figure out. But I have seen a case where the programmer was able to provide a better ground connection then when being powered off of a power supply or battery.
  3. Does your setup provide power through your JTAG connection? I have seen a case recently where the microcontroller was going into a brown out state because the power was not able to settle fast enough before the micro started trying to turn things on. When plugged into a debugger there was power applied much before starting the code so this was never seen.
\$\endgroup\$
2
\$\begingroup\$

Generally, that problem is caused by the program failing to start properly from a reset when run without the debugger. For instance, with the Rowley CrossWorks ARM tools, STARTUP_FROM_RESET has to be defined for the pre-processor.

\$\endgroup\$
1
\$\begingroup\$

Perhaps you are using the Debug version when compiling with the JTAG device plugged in, but using Release when compiling without it? Also, if you are using different debug and release versions make sure you have optimisations set to the same for both variants.

\$\endgroup\$
  • \$\begingroup\$ Looks like you may have posted too early. Might want to check your post. \$\endgroup\$ – Kellenjb Jan 21 '11 at 12:14
  • \$\begingroup\$ @Kellenjb Blame Internet Exploder, which I have to use here at college :(. It appears to abort transactions randomly. \$\endgroup\$ – Thomas O Jan 21 '11 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.