Reply
Posts: 7
Registered: ‎07-11-2017
Accepted Solution

BGM111 starter kit printf

I've spent over a day following the scattered examples on this forum trying to get printf to work without any luck.

 

Has anyone been able to get printf to work on Simplicity Studio v4 with BLE SDK 2.4 running on a Mac system? Thanks.

Posts: 27
Registered: ‎06-26-2017

Re: BGM111 starter kit printf

Hi trungp,

 

Are you trying to use printf through SWO or UART?

 

I added link to Knowledge Base article which explains how to retarget stdio to UART. Data can easily be read from UART using terminal software (example Tera Term).

 

http://community.silabs.com/t5/Bluetooth-Wi-Fi-Knowledge-Base/Retarget-stdio-to-UART-in-BLE-SDK-2-0-...

Posts: 7
Registered: ‎07-11-2017

Re: BGM111 starter kit printf

I was able to get UART printf to work using the screen terminal on Mac. However, I’m getting a lot of noises and junk characters along of what I wanted to print out. Making printf somewhat useless since I can’t tell what is junk and the expected output. Does the Tera Term cleanly printf without any unwanted noise?
Posts: 2,672
Registered: ‎09-01-2015

Re: BGM111 starter kit printf

I'm using TeraTerm daily with BGMxxx and printf() is working just fine.

Posts: 7
Registered: ‎07-11-2017

Re: BGM111 starter kit printf

I switched to Windows using Tera Terminal and got everything to work properly now. Thanks.
Posts: 4
Registered: ‎07-26-2017

Re: BGM111 starter kit printf

Perhaps you YaakkoV can share the steps you usually go through to set it up....

 

I did a quick test using 4 different  solutions from the forum and no, none of them  did work clean.

At best one of the solutions did print "YZ" when I did printf( "XYZ");.....

The code in the SWO window did not build...I'm using the BGM111.

 

 -jma

Posts: 4
Registered: ‎07-26-2017

Re: BGM111 starter kit printf

I needed to add retargetio.c.  Worked only with this file in the project.

Got great help from the Finland office!

-jma