Printf takes time and that time we've found has been correlated with some jitter in high-speed signals while we were running printfs in separate RTOS Tasks. This was particularly confusing as we had even tried using alternative RTOS functions such as taskDelayUntil()
rather than just taskDelay()
. To get around this we use the Real Time Transfer techology created by SEGGER which J-Link Debuggers we use.
Within the Utilities Folder there are the relevant files needed to be included in the project. We are using the V754b version to run this protocol. If you download a newer version of the J-Link software, it may come with a newer version which asks you if you would like to upgrade to the newer firmware. From minimal testing, we concluded that it's easier to use the same version as there is no unexpected behaviour which would occur when using different firmware versions. One occurence included being unable to connect to the board. If this happens, reflash the V754b firmware version onto the J-Link Debugger and do not upgrade to the newer version when asked. Alternatively, just keep this version on your computer.
- Open the RTT-Viewer App that was installed with your J-Link installation. For MacOS the location is as below.
/Applications/SEGGER/JLink_V754b
On Linux it was found to be the following:
/opt/SEGGER/JLink
On Windows, it was found at:
Program Files (x86)\SEGGER\JLink\
In this folder, there is the RTT-Viewer Application:
With a started debug session, connect to an Existing Session and press OK.
After Connecting with a running debug session you will see your messages appear.
With the current revision, the DAQ board is sending basic test messages to the RTT Terminal. See what it's sending in the RTT Viewer window. You can also send commands to the DAQ Board via RTT Viewer, where you can verify the board recieves it by printing it to the existing debug session console in MCUXpresso.
- Replace your desired
printf
with the SEGGER command, as found in the examples in the above Utilities location. You now have access to RTT to Debug your program without printf delays.
Contact Davin for any further questions or if something is not covered in this document