8 Replies Latest reply on Nov 15, 2014 7:16 AM by MichaelF_56

    Wiced Sense debugging using mac os x.

    userc_12221

      Hi,

       

      is there a way to debug a custom application compiled with Wiced smart IDE on mac os x (yosemite)  and downloaded to a Wiced Sense board ?

       

      Thanks,

       

      Luca

        • 1. Re: Wiced Sense debugging using mac os x.
          MichaelF_56

          Once you install the Silicon Labs USB to Serial drivers on your Mac: USB to UART Bridge VCP Drivers | Silicon Labs, then you should be able to connect the WICED Sense board to your Mac and program it using the WICED Smart SDK.  The programming interface to the board is not all that different from our more full featured TAG3 development board and many users develop applications for it using a Mac.

          • 2. Re: Wiced Sense debugging using mac os x.
            userc_6396

            Just to mention my experience:

            Yes, you can download a new FW image via UART and it will be launched automatically.
            But you cannot debug; the USB UART (VCP or dedicated FW download protocol used just used for loading patch code) is not a real debug interface.


            A debugger, e.g. as JTAG for breakpoints, stepping through code might be needed (and I guess not a header there on WICED Sense, just on the Smart EVM). I think, WICED Sense SW debug is not possible, just FW update.

             

            A bit hard to debug, you need some hooks. For instance: use LEDs, change LED PWM, change PWM beep and use in code as indication where you are and if a certain condition happened or not.

             

            The Debug trace does not do anything for me on Eclipse. No idea if something had to be configured (e.g. set a correct UART port somewhere). FW code itself has trace log statements, just to check if enabled when compiled (if trace code really generated or it is empty code) and if a UART trace (assuming as UART terminal logging, 115200 baud config is somewhere) is working.

             

            For debugging we might add (if not yet already there) a regular UART Tx from C-code so that we can see log messages on TeraTerm. Just to bear in mind: it will change timing dramatically inside FW.


            Implementing a UART command line where we can enter also commands, change memory content (global variables) ... running inside FW as another RTOS thread might be possible and reasonable. Just a question how much memory (SRAM, Flash where stored) is available to add a RTOS debug UART command line thread.
            (not sure but UART log and trace might be already there, just to enable or configure properly)

            • 3. Re: Wiced Sense debugging using mac os x.
              MichaelF_56

              With SDK 2.X, we incorporated an encoded trace mechanism, so you need to use the Trace plugin that's included within Exlipse, not a terminal emulator.

               

              More on this here: Re: How do I interpret the extra tracing data ?

               

              Also, the TAG3 full featured development board has switches you can set (SW4) to enable trace messages.  WICED Sense does not.

              • 4. Re: Wiced Sense debugging using mac os x.
                userc_6396

                Cool, great.

                OK, fine, no switch on WICED Sense but using the trace plugin should work, shouldn't it?
                How to enable it?

                • 5. Re: Wiced Sense debugging using mac os x.
                  MichaelF_56

                  Traces cannot be enabled on WICED Sense based on my understanding as there is no access to the switch which controls the level on the HCI Uart Rx line.  J.T. answered this somewhere else, but I cannot find the thread now.

                   

                  jota_1939431

                  • 7. Re: Wiced Sense debugging using mac os x.
                    userc_12221

                    Wiced Sense hasn't Jtag/SWD port and trace doesn't connect to serial port (via USB).

                    Invoking Trace from IDE menu cause a crash to Wiced Sense and I have to reset it and download elf file again.

                     

                    How is possible (if any) to start a debug session on Wiced Sense ?

                     

                    Thank you.

                    • 8. Re: Wiced Sense debugging using mac os x.
                      MichaelF_56

                      The link above has been fixed.

                       

                      I'm not aware of a technique to debug with WICED Sense as the board was design with a simple user experience in mind and the TAG3 board continues to represent the tool we recommend for development.