Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Per Westermark
02/13/12 09:34
Read: 778 times

Msg Score: +1
 +1 Good Answer/Helpful
#185899 - Beginners have even more reason for debug cells, i.e. ICE
Responding to: Richard Erlacher's previous message
No, I do not agree Richard.

An experienced developer is experienced about reading datasheets. And have experience looking at a problem and then try to deduce what may be wrong.

Beginners totally lack this experience. So for them, it's a huge advantage to be able to freeze the program at a specific state and compare the state in the processor with what they assumed it to be. And that obviously requires not only support for breakpoints. But also ability to look at some of the peripherial state. Some important parts of the peripherial state can be accessible using debug cells in the processor even when the state is not available to normal software. In some situations, debug cells inside the processor can allow the code to look at write-only registers.

Next thing that debug cells have the ability to not just set dumb breakpoints. But you can set breakpoints for read or write accesses to specific memory areas. So having a write-access interrupt at the end of the stack, you can switch into the debugger the first moment your program tries to overflow the stack. And the debug cells can support counted breakpoints, where you break after 1000 iterations. Single-stepping aint fun when you need to look at the result halfway through a huge initialization sequence. And beginners may not realize that without good debug cells, you will sometimes have to add special placeholder code inside the sourcecode just to help with debugging - things like:
// Dummy function to get a single place to set "multiple" breakpoints.
function dummy_call(void) {

for (i = 0; i < 10000; i+++) {
    if (i == 1023 || head == NULL || ...) {

Above construct is not something people think about before they have already spent lots of time debugging programs.

Next thing is that debug cells (which takes very few transistors inside the processor, and often can make do with very few processor pins - some AVR chips make use of the /RESET pin giving zero loss of pins) allows you to debug any part of the code. From a factory-empty chip with zero software in it and all the way to a final product. What do you do if you don't have a programmer for adding that monitor? Or you don't get any serial data out from the monitor? Debug the debugging tool?

The main thing here is that transistors are basically free. They have almost zero cost. So with zero cost, it is stupid to not get a processor that adds these extra transistors in the form of intelligent debug cells. For an experienced developer, it's just a question of saving expensive time. For a beginner, it is probably the difference between a working project and a major failure.

Next thing - a debugger who are stuck and asks for help on the net, can get better help if he/she is using a processor with some ICE functionality. People can tell them what to do to try to eliminate different possible error sources.

By the way - I feel your description of your cirumvention logic incorrect. It was most definitely aimed at circumventing the licensing limitations of the tool. I.e. an unethical work-around.

List of 61 messages in thread
Which modern small 8051 should I use?      Scott Navarre      02/11/12 15:08      
   addition      Scott Navarre      02/11/12 16:02      
      contradicting yourself.      Erik Malund      02/11/12 16:45      
      Get on with SiLabs        Michael Karas      02/11/12 20:55      
         Thanks for all of your input!      Scott Navarre      02/12/12 17:24      
            power miser      Erik Malund      02/12/12 19:15      
               Re: Power Miser      Scott Navarre      02/16/12 02:48      
            Still Need the SiLabs Adapter      Michael Karas      02/12/12 19:15      
      Why?        Richard Erlacher      02/11/12 23:38      
   RE: 8-bit 8051      Andy Neil      02/12/12 02:01      
      SiLabs is sometimes a bit slow ...      Richard Erlacher      02/12/12 10:25      
         RE: "slow"?      Andy Neil      02/12/12 10:45      
            Well ... It might have been coincidental ...      Richard Erlacher      02/12/12 17:57      
   AT89S2051/4051 or ATLP2052/4052      Jan Waclawek      02/13/12 02:17      
      and lose all the goodies      Erik Malund      02/13/12 06:54      
         Onewire debug?      Per Westermark      02/13/12 07:22      
            tradeoffs      Jan Waclawek      02/13/12 07:43      
               Is a hobbyist not extremely likely to gain      Erik Malund      02/13/12 07:51      
                  JTAG      Per Westermark      02/13/12 08:04      
                     cost to debug      Andy Peters      02/13/12 09:44      
                        cost of AVR debugging "dongle"      Jan Waclawek      02/13/12 11:14      
                  You have to ask yourself ...      Richard Erlacher      02/13/12 08:07      
                     Beginners have even more reason for debug cells, i.e. ICE        Per Westermark      02/13/12 09:34      
                     WHAT, exactly, is a hobbyist likely to gain from built-in de      Andy Neil      02/13/12 10:48      
                        I still think it 6 one way and half-a-dozen the other      Richard Erlacher      02/13/12 21:37      
                           why go old fashioned      Erik Malund      02/14/12 07:29      
                              Where you sit determines what you see.      Richard Erlacher      02/14/12 08:00      
                     exactly this        Erik Malund      02/13/12 11:10      
                        Those are all things the monitor allows      Richard Erlacher      02/13/12 21:38      
                           please explain how the monitor allows ...      Erik Malund      02/14/12 07:37      
                              Monitors really not good choice for new designs/developers      Per Westermark      02/14/12 07:51      
                                 Describing Richards preferences      Erik Malund      02/14/12 08:16      
                              It doesn't help with 'C' code at all      Richard Erlacher      02/14/12 08:10      
                                 maybe not using that word      Erik Malund      02/14/12 08:19      
                     "Small" 8051      Scott Navarre      02/14/12 08:38      
                        RE: "Small" 8051      Andy Neil      02/14/12 09:15      
                        Productivity/quality really important for hobbyists too        Per Westermark      02/14/12 09:28      
                        the calculation      Erik Malund      02/14/12 09:39      
                           True cost comes in maintainance      Per Westermark      02/14/12 09:56      
                              I totally agree, however      Erik Malund      02/14/12 10:06      
                           Ratio?      Andy Neil      02/14/12 11:02      
                              all numbers are arbitrary      Erik Malund      02/14/12 11:26      
                                 but it's good to be ...      Andy Neil      02/14/12 12:43      
                                    Not needed      Per Westermark      02/14/12 13:29      
                              A couple of things ...      Richard Erlacher      02/14/12 21:21      
                                 RE: A couple of things ...      Andy Neil      02/15/12 00:52      
                                 neither does a SILabs toolstick      Erik Malund      02/15/12 09:34      
                                    Starting out, the old-reliable antiques are very easy      Richard Erlacher      02/15/12 21:46      
                                       Wrong conceptual level for majority of needs      Per Westermark      02/16/12 02:54      
                                       only somewhat true      Erik Malund      02/16/12 07:21      
                        First, Define Icc and Code Size Targets      Jim Granville      02/15/12 03:00      
                           It's more complicated than that      Andy Neil      02/15/12 04:55      
                           that is not enough      Erik Malund      02/15/12 09:42      
                              that is not enough      Jim Granville      02/15/12 13:30      
                                 which was what I posted      Erik Malund      02/15/12 13:49      
                                    ROFL      Jim Granville      02/15/12 14:52      
                                    Not a simple formula!      Andy Neil      02/15/12 16:03      
                  power      Jan Waclawek      02/13/12 08:12      
                     OCD != Emulation        Andy Neil      02/13/12 10:31      
               the particular hobbyist in question      Andy Neil      02/13/12 10:42      
                  It does allow him to maintain separation from the hardware      Richard Erlacher      02/13/12 21:41      

Back to Subject List