Shop OBEX P1 Docs P2 Docs Learn Events
Debugger doesn't seem to be working — Parallax Forums

Debugger doesn't seem to be working

jswinnjswinn Posts: 8
edited 2006-11-10 22:50 in General Discussion
I'm trying to go through the tutorial on page 9 of "Programming the SX Microcontroller." I was able to get the code assembled successfully.· Then I pushed the "debug" button.· It shows it is "erasing", then "programming for debug."· In the "registers" window the hex and binary register contents show zeros as does the M and W registers.· The register bank also shows all zeros.· The "stop"·, "walk", "run", and "poll" buttons are inactive.· but the debugger says "running" at the top.· Just as a test I reconfigured the LED and resistor as in pg 18 of the "SX Key Development System Manual" and ran "led28.src."· Worked fine but same results with the debugger tool.
855 x 676 - 360K

Comments

  • BeanBean Posts: 8,129
    edited 2006-10-20 16:38
    Do you have a resonator plugged into the SX-Tech board ? If so, remove it.
    The SX-Key cannot debug if the resonator is installed.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com

    "People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin
    ·
  • jswinnjswinn Posts: 8
    edited 2006-10-20 17:23
    Thanks for help.··I don't have a resonator plugged in.
  • BeanBean Posts: 8,129
    edited 2006-10-20 17:29
    Hmmm,
    I don't think it matters, but try adding OPTIONX to the DEVICE line.
    Can you debug anything ? Your SX-Key may be damaged.
    Your not using the SX-Blitz are you ?

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com

    "People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin
    ·
  • jswinnjswinn Posts: 8
    edited 2006-10-20 17:55
    Tried adding optionx to the device line. No luck. I'm pretty new with microcontrollers, not sure what the SX blitz is. I received the SX Tool Kit Plus. I don't think I am using the SX-Blitz.
  • RsadeikaRsadeika Posts: 3,837
    edited 2006-10-20 18:05
    Since you are new to this, I have to ask, what gives you the impression that the debugger is not working. What are you expecting to see. First, you may want to attach the code that you are using, so we can see what you are working with, and you might want to be a lot more specicific as to what you would like us to address, youre observation and response is much to vague, for you it's probably not vague at all, but for us it is. Try to be a little more specific.

    Ray
  • jswinnjswinn Posts: 8
    edited 2006-10-20 18:41
    I've attached the two files I am running.

    I created the one titled "TUT001.src" directly from page 11 of the book I received with the "SX Tech Tool Kit Plus."· The book is titled "Programming the SX Microcontroller A complete Guide" by Gunther Daubach.· I expect to see the same results as shown on page 14 of the same book.· I believe I should be able to step through the program as outlined in section 1.3.5 pg 16 of the book.· As I mentioned in a previous thread, the "step" , "walk"·and "run" buttons in the "Debug" window are not active meaning I can not push them down and step through the program.· Please see the screenshot I uploaded to my first post.

    I also expect to see hex values loaded in the registers not all zeros. Correct?

    I have also uploaded "led28.src."· This one I just downloaded from the Parallax website.· When I run the debugger on this one I think I should be able to step through it as well.
  • BeanBean Posts: 8,129
    edited 2006-10-20 18:47
    The SX-Blitz is another programmer that is similar to the SX-Key, but does NOT do debugging.
    It should say right on it if it is an SX-Key or an SX-Blitz.
    [noparse][[/noparse]edit] Sorry, you said you got the SX-Tech kit. That comes with the SX-Key.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com

    "People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin


    Post Edited (Bean (Hitt Consulting)) : 10/20/2006 6:57:57 PM GMT
  • jswinnjswinn Posts: 8
    edited 2006-10-20 18:53
    It says SX Key Rev F.
  • BeanBean Posts: 8,129
    edited 2006-10-20 18:58
    Can you try another SX28 chip ? Maybe the chip is damaged.
    Have EVER been able to debug ? Or did it just stop debugging at some time ?
    I'm still thinking it may be a bad SX-Key ???

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com

    "People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin
    ·
  • jswinnjswinn Posts: 8
    edited 2006-10-20 19:06
    I have only had the kit a couple of days. I just took everything out of the box yesterday. The debugger has never worked. If I am making the correct assumptions of what I should see. I tried the other chip I was sent and still the same results.
  • RsadeikaRsadeika Posts: 3,837
    edited 2006-10-20 19:21
    OK, in the tutoo1.src program that you attached, you may want to change the second clrb·to clrb rb.0. As the program stands you are trying to light up the wrong pin, unless of course you have an LED on rb.1. For the second program, you have a loop that has two djnz commands, that means you have to step 256 times just to get through Count1 ... I tried led28.src the other day, and it worked for me.

    Ray
  • jswinnjswinn Posts: 8
    edited 2006-10-20 19:57
    I initially had it going to rb.0. I changed that to rb.1 just to see if making a change in my program made any difference getting the debugger to work. Thanks for your suggestion on the second program. It isn't mine though. I only downloaded it from the Parallax website to see if my chip and SX key was working. The LED started blinking so I assume that part is working. I think I got the information I need. I will call Parallax and see if I can get a new SX Key.

    Thanks you guys for your help!
  • John KauffmanJohn Kauffman Posts: 653
    edited 2006-10-22 18:53
    I'm curious. TUt01.SRC had:

    ; TUT001.SRC
    ; ===============================================================================
    LIST Q = 37
    Device SX28L, TURBO, STACKX, OSCHS2, optionx
    IRC_CAL IRC_FAST
    FREQ 50_000_000

    But JSwinn said there was no resononator.
    With no resonator shouldn't the freq be 4_000_000 and timing directive of OSC4MHZ?
    With the timing commands wrong, I would expect the debug result of walk disabled.

    As I read, his debugging is working with downloaded file from Parallax.
    JSWinn: did you get your TuT01 file to debug?
    Would his debugger work with the (wrong) timing directives as posted int TUT01?? Or am I getting something wrong?

    Thanks.
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2006-10-22 22:56
    Hey all,

    I feel, some explanation is in place here:

    The FREQ directive in an SX assembly code is a special information for the IDE how to control the SX-Key. The frequency specified with this directive will be generated by the SX-Key when you launch a debug session. It also specifies the clock frequency, the SX-Key will generate when you select "Run - Run" from the menu. Think of the SX-Key as an external clock generator connected to the SX OSC1 pin, feeding the clock signal into the SX.

    Usually, you would specify a frequency identical to the frequency of the clock generator (either the internal clock, and external RC network, an X-tal, a resonator, or a separate clock generator) you will use later, when you are going to run the SX stand-alone, i.e. w/o the SX-Key attached. Nevertheless, you may, for example, include a FREQ 50_000_000, and attach a 5 MHz resonator later, but in this case, your program will run slower by the factor of 10 in stand-alone mode, compared to the debugging session.

    On the other hand, the OSCxx directive is ignored when you use the SX-Key to clock the device under test. This directive controls the type of clock device for stand-alone mode, i.e. the internal RC clock (not very stable), or the gain of the internal SX clock driver for external clock devices, like X-Tals and resonators. Which gain you need to select, depends on the clock frequency you are going to use, and the type of the clock device. You can find more information about this settings in the SX data sheets.

    None of these settings and directives should influence the operation of the debugger. When you select "Run Debug", and (after the Erase/Program dialog), the debug window comes up showing "Running" instead of "Idle" in the status information, you either have connected some external clock device to the OSC1 and OCS2 pins in parallel to the SX-Key, or you have programmed the SX using the "Run Program" option before, and started the debugger via "Run Debug (reenter)", or the SX-Key is defective.

    Usually, you can't "fry" an SX-Key by plugging it on the four header pins in reverse orientation but if you plug it on the pins with an offset, i.e. only three or two pins connect to the SX-Key, it most likely goes up to "Semiconductor Heaven". So always turn off power before attaching the SX-Key, and double-check its orientation, and if it sits on all four header pins before applying power.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • PLJackPLJack Posts: 398
    edited 2006-10-29 17:33
    Just a heads up.
    I am having the same exact problem.

    I recently setup my ThinkPad for use at my workstation.
    The SX compiler and SX simulator have never been installed on this machine so it is a fresh install.
    The SX sample programs exhibit the same behavior.
    Both versions of the software are current, downloaded from Parallax about a week ago.

    I'm planning on working on some stepper motor code tonight. I'll move the hardware to my other machine to confirm that it is not a hardware issue. It really looks like an OS issue to me at this point. Nothing to confirm that, just a hunch.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - PLJack - - -



    Perfection in design is not achieved when there is nothing left to add.
    It is achieved when there is nothing left to take away.
  • PLJackPLJack Posts: 398
    edited 2006-10-29 18:45
    Problem solved. Not and OS issue, so much for hunches.

    I connected the hardware to my other machine, loaded the same code, SXSim still did not work(grayed run button).
    Loaded a S/B example, same affect.
    Installing a new SX chip did not help.

    After some trouble shooting I found the problem.
    I have (read had) a four pin computer audio cable between the SX-Key and the proto board. I Placed a four pin header into the SX-Key to accept one side of the cable, then plugged the other end into the proto board.
    I did this quite some time ago. Never had a problem programming the SX. Apparently this configuration does not work with the debugger. Did not take the time to find out, but I suspect that either the cable is too long to work with the SX-Key or the four pin header was not making firm contact with all four pins of the SX-Key.

    If I connect the SX-Key directly I have no problems with SXSim.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - PLJack - - -



    Perfection in design is not achieved when there is nothing left to add.
    It is achieved when there is nothing left to take away.
  • jswinnjswinn Posts: 8
    edited 2006-11-08 13:24
    I received a new SX key from Parallax today.· The debugger is working now.· I'm up and running again.
  • PLJackPLJack Posts: 398
    edited 2006-11-10 22:50
    jswinn said...
    I received a new SX key from Parallax today. The debugger is working now. I'm up and running again.

    There you go. Glad to hear it.

    I find the SX key to be pretty resilient. I wonder how you smoked your last one.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - PLJack - - -



    Perfection in design is not achieved when there is nothing left to add.
    It is achieved when there is nothing left to take away.
Sign In or Register to comment.