Reply
Posts: 2
Registered: ‎04-10-2017

Thunderboard Sense: Printing output on Program Output Console (Debugging)

Hi,

 

I'm new to Thunderboard Sense and having trouble printing text on the output console. I have tried the solution described in this thread http://community.silabs.com/t5/32-bit-MCU/SWO-printf-on-ERF32MG/m-p/187625#M13418. But I'm still not getting any output on the console. I notice that, the Thunderboard Sense example program contains some printf statement but the console does not display any output. Am I missing something? Thanks.

Posts: 322
Registered: ‎12-05-2016

Re: Thunderboard Sense: Printing output on Program Output Console (Debugging)

Hi @mohalim,

 

I will try and look into this today to get you an answer.  I was able to open teraterm (other terminal emulator programs can be used) and connect to the serial port associated with the J-Link connection and see program output in teraterm, but I need to look into it more as this wasn't a specific printf I added or was trying to see.  The serial port associated with the J-Link can be seen by highlighting the command [Window] > [Preferences] > [Simplicity Studio] > [Adapter Packs] > [Exx32 adapter pack] > [serialsports: $(cptstreamer) -ports, batch] and then clicking the [Bare run] link.

 

Thank you,

jpitt

Posts: 2
Registered: ‎04-10-2017

Re: Thunderboard Sense: Printing output on Program Output Console (Debugging)

Hi @jpitt,

 

I've tried using a terminal emulator program and I could see the outputs. I don't understand why they are displayed on the Simplicity Studio console. But at least I can do some debugging although its not so convenient. This should be fixed as soon as possible.

 

Looking forward to your answer. And thanks for the reply.

 

mohalim

 

 

Posts: 34
Registered: ‎04-11-2017

Re: Thunderboard Sense: Printing output on Program Output Console (Debugging)

Hi every one im trying to use the console that you said in the adapter pack but it still doesn't print anything.

 

I got something like this during the application is turning on

consoleprint.PNG

and here i just try to print "lol" in the loop

int main( void )
{
   RETARGET_SerialInit();
   /**************************************************************************/
   /* Device errata init                                                     */
   /**************************************************************************/
   CHIP_Init();
   /**************************************************************************/
   /* Read tokens and store settings                                         */
   /**************************************************************************/
   readTokens();

   /**************************************************************************/
   /* Board init                                                             */
   /**************************************************************************/
   init( true );

   printf("\r\n\r\n#### Thunderboard Sense BLE application - %d.%d.%d build %d ####\r\n",
          APP_VERSION_MAJOR,
          APP_VERSION_MINOR,
          APP_VERSION_PATCH,
          APP_VERSION_BUILD
          );

   /**************************************************************************/
   /* Application loop                                                       */
   /**************************************************************************/
   while (1) {
	  printf("lol");
      struct gecko_cmd_packet* evt;
      /* Check for stack event. */
      evt = gecko_wait_event();
      /* Run application and event handler. */
      appHandleEvents(evt);
   }
}

did i forgot something ?

Posts: 3
Registered: ‎06-13-2017

Re: Thunderboard Sense: Printing output on Program Output Console (Debugging)

Hey Bybuu,

 

Did you make an progress with this? Looking to setup printf debug output myself.

 

Best Regards,

 

Ahmed Awale