We see artefacts in the output when debugging via UART when the Build Configuration is set to Release. This can also be seen in the sample code of ble_android_asha.
With the following configuration of ble_android_asha the artefacts can be seen.
- Set RSL10_DEBUG to DBG_UART (in file app_trace.h, line 38).
- Set Build Configuration to Release (in context menu of project > Build Configurations > Set Active).
Then the startup code produces the following output. Note that non-printable characters are displayed within
<> as their C Escape Sequence equivalent.
<\0><\r><\n> ==============================================<\0><\r><\n> ===== Initializing ble_android_asha LEFT =====<\0><\r><\n> ==============================================<\r><\0><\r><\n> sending GAPM_LEPSM_REG_CMD..<\0><\r><\n> GAPM_LEPSM_REG: LEPSM registered successfull
Here is the same output with the Build Configuration set to Debug (for comparison).
<\r><\n> ==============================================<\n><\r><\n> ===== Initializing ble_android_asha LEFT =====<\n><\r><\n> ==============================================<\r><\n> <\r><\n> sending GAPM_LEPSM_REG_CMD...<\r><\n> GAPM_LEPSM_REG: LEPSM registered successfully
Going through the code I would expect the output as produced with the Build Configuration set to Debug.
In the startup code of ble_android_asha the output is still quite readable, but in our code the output gets jumbled in ways that make debugging harder than it already is. Can you think of something causing the artefacts in the Release configuration?
P. S.: In our custom application the UART output got jumbled only when the RTE_BLE_L2CC_ENABLE flag was set, before we did not see any artefacts. This flag is also set in ble_android_asha. There seems to be some kind of connection between the artefacts and this flag.