[Solved] System_printf() on CC2640R2F

Here is how to implement System_printf() to write to the console on T.I. CC2640R2F, this is the solution to the unsolved closed issue “CCS/CC2640R2F: Implementation of System_printf()” asked on TIs forum: https://e2e.ti.com/support/tools/ccs/f/81/t/670719.

Chang the .cfg file to include SysMin, include the preprocessor XDC references, add the bufSize, remove all references to SysCallback:

var SysMin = xdc.useModule('xdc.runtime.SysMin');
SysMin.bufSize = 32;
System.SupportProxy = SysMin;
//var SysCallback = xdc.useModule('xdc.runtime.SysCallback');
//System.SupportProxy = SysCallback;
//SysCallback.abortFxn = "&myUserAbort";
//SysCallback.exitFxn = "&myUserExit";
//SysCallback.flushFxn = "&myUserFlush";
//SysCallback.putchFxn = "&myUserPutch";
//SysCallback.readyFxn = "&myUserReady";

Where desired in your code, use System_printf(“Hello World”) and add the System_flush();

System_printf("Hello World");


After changing the .cfg, you absolutely need to rebuild the project, or CCS will not take the change in account!

Menu Project > Clean…

Rebuild, Load, Run.

Open the Console view, select “Display Selected Console” and choose the “:CIO” view.

You should now see “Hello World” printed via System_printf.

Note: The flushing can be quite slow.

Hi there! I'm Jérôme from France, currently a UK based freelance engineer and a globe trotter. My main experience is Embedded Software with Electronics Engineering. In fact, I love experiencing much broader things, learning new skills on the go, that's certainly why I like IoT.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.