cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Bluetooth

MiTo_1583836
Contributor II

This question is for the BT stack developer(s) at Broadcom.

I have noticed the following in bleapp.h SDK2.x

extern void ble_trace0 (const char *p_str);

extern void ble_trace1 (const char *fmt_str, UINT32 p1);

extern void ble_trace2 (const char *fmt_str, UINT32 p1, UINT32 p2);

extern void ble_trace3 (const char *fmt_str, UINT32 p1, UINT32 p2, UINT32 p3);

extern void ble_trace4 (const char *fmt_str, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4);

extern void ble_trace5 (const char *fmt_str, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4, UINT32 p5);

extern void ble_trace6 (const char *fmt_str, UINT32 p1, UINT32 p2, UINT32 p3, UINT32 p4, UINT32 p5, UINT32 p6);

extern void ble_tracen (char *p_str, UINT16 len);

// extern void ble_traceprintf(const char* fmt_str, ...);

I am not clear why the ble_traceprintf has been commented out moving to SDK2.x. This is braking the backward compatibility between the two versions of the APIs. This requires rework of the code being ported from SDK1.x to SDK2.x

Comments on this are welcome,

Thanks

0 Likes
1 Solution
ArvindS_76
Employee

ble_traceprintf required some library functions to be brought into the ROM and this did not fit in the available space. So we decided to remove this from 20736/7.

View solution in original post

3 Replies
ArvindS_76
Employee

ble_traceprintf required some library functions to be brought into the ROM and this did not fit in the available space. So we decided to remove this from 20736/7.

View solution in original post

MiTo_1583836
Contributor II

Ok understood, do you know other functions that are not part of SDK2.0 for space reason?

Thanks,

0 Likes
StBa_721356
Contributor

If someone is interested, here is a quick-and-dirty implementation of ble_traceprintf():

#include "stdarg.h"

#define TRACE_TEXT_MAX 256

void ble_traceprintf(const char *fmt_str, ...)

{

     char  s[TRACE_TEXT_MAX+1];

     va_list arg;

     va_start( arg, fmt_str );

     vsnprintf(s, TRACE_TEXT_MAX, fmt_str, arg);

     ble_trace0(s);

     va_end( arg );

}

0 Likes