This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC2650: What should be used ? Log_info0(" message\r\n"); OR Display_printf(display, 0, 0, "Count = %d and it's address is 0x%x\n", count, &count); ?

Part Number: LAUNCHXL-CC2650


Hello,

I am using LAUNCHXL-CC2650.

BLE SDK 2_02_07_06

CCS7.4

Compiler TI v5.2.6.

I have used "Project zero" and I can see log messages printed on UART terminal as shown in Image.

eg. Log_info0(" BIOS_Starting\r\n");

Implemented the same thing in Simple BLE peripheral example.

But flash memory uses in increased from 74% to 84%.

In the link mentioned below, All the printf types are compared for memory footprint.

https://dev.ti.com/tirex/explore/node?node=ACAmHpRsYbFcPWGPpQxoUA__krol.2c__LATEST.

I am using Log_info0(" message\r\n");

But as in the link above, Display_printf uses less space in memory.

Display_printf(display, 0, 0, "Count = %d and it's address is 0x%x\n", count, &count);

What should i choose between 

But I am not able decide what should I use?

 Log_info0(" message\r\n"); or Display_printf(display, 00"Count = %d and it's address is 0x%x\n", count, &count); ?

  • Hi,

    The answer really depends on your goal.

    If the log is for debug purposes only, then I would recommend to leverage Log_info0(" message\r\n");, as this option is more flexible and provides a lot of information. In all the cases, I recommend this is kept for debug only and not exposed to your customers.

    However, if the log is meant to be seen by your customers, then I definitely recommend Display_printf(). Display_printf() can easily be reconfigured to drive an actual screen.

    I hope this will help,

    Best regards,