ble_traceprintf available in SDK1.x but not in SDK2.x

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MiTo_1583836
Level 5
Level 5
50 likes received 25 likes received 10 likes received

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
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

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
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

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.

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

Thanks,

0 Likes

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