Disabling BLE trace in patches

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

cross mob
legic_1490776
Level 5
Level 5
25 likes received 10 likes received First like received

On the 20732, there is a lot of code in the patches to the ROM that implements various debugging / trace messages.

Is there any way analogous to defining BLE_TRACE_DISABLE, to prevent those messages from existing in the patches?

1 Solution
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

Patches in 20732 (and 20736/20737) don't have any traces built into them. All traces come out of the ROM (so these cannot be removed, only disabled at runtime) or the application (you have full control of when trace code is included and when it is not). We decided to remove tracing completely from patches because it wastes RAM for the function calls (parameters and the calls themselves) and the string constants.

View solution in original post

6 Replies
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

Patches in 20732 (and 20736/20737) don't have any traces built into them. All traces come out of the ROM (so these cannot be removed, only disabled at runtime) or the application (you have full control of when trace code is included and when it is not). We decided to remove tracing completely from patches because it wastes RAM for the function calls (parameters and the calls themselves) and the string constants.

Thanks, Arvind,

I am not sure all traces have been removed from the patches though.

The reason I am asking is when I run 'strings' on my OTA binary, I get the following strings that don't appear in my application code:

Pairing failed

delete duplicated and write bonded info idx

get pairing request

Bond Request

BLEAPP CFA debug

permission check retCode = %02x

I was assuming that if it is in the OTA binary that it was taking up space?

0 Likes

Hmmm.... I hadn't noticed these. Yes, these do take up space. However, with SDK 1.1, patches are all pre-compiled and pre-linked. So there is no way to remove these unless we make another release of the SDK.

0 Likes

OK, thanks.  I thought that was probably the case.  Is there any way to disable specific patches?  It looks like many of these messages are related to pairing / bonding which we happen not to use.

0 Likes

Not on the 20732 and SDK 1.x because it uses a legacy patching mechanism. We added the ability to pick and choose patches starting SDK 2.x and 20736/20737 where patches are linked in on-demand.

0 Likes

Thank you - Yes, I noticed this capability in SDK 2 and just wondered if there was something similar in 1.0

0 Likes