4
\$\begingroup\$

I'm working with an 8051 (Cypress FX2LP) that doesn't have jtag/bdm capability. Typically, developers on this project have been using ad-hoc serial printfs for debugging. I'm looking into options for serial debug monitors such as Keil's Mon51, Isd51 or IAR's generic ROM-monitor.

I'll need to modify/configure this debug monitor to write to code RAM (to set software breakpoints). I'd guess that most 8051 debug monitors offer the ability for such modifications in order to support Harvard architecture or bank switching.

The Keil tools come with Mon51 and Isd51. The Isd51 is very small and comes as source that can optionally be embedded in the application. C:/Keil/C51/ISD51/Examples/Generic_8052 works as-is on the Cypress eval board. This can all be done with the free Keil eval (subject to the eval size limitations).

This pdf 'MSC1210 Debugging Strategies' from TI, explains some strategies for serial debugging on an 8051.

If this Cypress part had jtag/bdm - it would be a no-brainer - I'd use that.

Does anybody have recommendations for serial debuggers for 8051 or similar processors?

Have you had to modify it to write to Harvard code RAM or flash etc?

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

I have been using Mon51 with the Cypress FX2 for going on 10 years with very good success. In addition we use the RTXtiny task switcher and code banking. I have found the monitor to be generally solid and with enough functionality for our needs.

To use it we had to "von neumanize" our memory; logically AND PSEN# with RD#, which hasn't been a problem.

We also use the hardware bootloader from serial eeprom which also works tremendously well in my opinion.

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

For the monitor on the target-side, ISD51 has these advantages over Mon51:

  • It's linked into the firmware image as extra functions and ISRs so linking and locating is easy.
  • All source is available so that it can be modified to communicate thru serial ports and can be modified to write to code-space using any platform-specific tricks to write to code-space.
  • It's very small yet supports break-points (which is why write-to-code-space is required), variable watching and register inspection.

For the host-side debugger, ISD51 talks to Keil's Windows-based debugger (which I'm using) and I don't know if the interface is compatible with other debuggers. As Rowan suggested, it would be very cool to have other options available such as Visual Studio, Eclipse, DDD on Windows etc.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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