-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imxrt-multi: add support for console over RTT #514
base: master
Are you sure you want to change the base?
Conversation
CHange implements library for RTT (multichannel, bidirectional) communicaton over debug probe JTAG/SWD. JIRA: RTOS-754
multi/imxrt-multi/rttuart.c
Outdated
ret = (ret == 0) ? rtt_initChannel(1, chn, buf, RTT_TX_BUF_SIZE) : ret; | ||
ret = (ret == 0) ? rtt_initChannel(0, chn, buf + RTT_TX_BUF_SIZE, RTT_RX_BUF_SIZE) : ret; | ||
ret = (ret == 0) ? mutexCreate(&uart->lock) : ret; | ||
/* TODO: cacluate approx. baud rate based on buffer size and polling rate */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[codespell] reported by reviewdog 🐶
cacluate ==> calculate
c3b208b
to
03786ff
Compare
multi/imxrt-multi/rttuart.c
Outdated
ret = (ret == 0) ? rtt_initChannel(1, chn, buf, RTT_TX_BUF_SIZE) : ret; | ||
ret = (ret == 0) ? rtt_initChannel(0, chn, buf + RTT_TX_BUF_SIZE, RTT_RX_BUF_SIZE) : ret; | ||
ret = (ret == 0) ? mutexCreate(&uart->lock) : ret; | ||
/* TODO: calcuate approx. baud rate based on buffer size and polling rate */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[codespell] reported by reviewdog 🐶
calcuate ==> calculate
Unit Test Results7 723 tests +23 7 008 ✅ +23 37m 14s ⏱️ - 1m 48s Results for commit f5e6b4d. ± Comparison against base commit 10cca0a. This pull request removes 1 and adds 24 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
f2d1e7e
to
9dcc4ef
Compare
9dcc4ef
to
05e9866
Compare
Fix rtt structure read before initialization Add better argument validation Add volatile modifier where necessary Add option to use cached memory for buffers Renamed files and functions from "rtt" to "librtt" JIRA: RTOS-754
Add more utility functions to probe channel status. JIRA: RTOS-754
JIRA: RTOS-754
133fd0e
to
543908c
Compare
Remove hard-coded RTT address and get it from memory map. Change RTT initialization to keep existing buffer contents if buffers are valid. Allow more channels in the control block than defined at compile time (they will not be usable by the userspace driver). JIRA: RTOS-754
JIRA: RTOS-754
543908c
to
3af1373
Compare
JIRA: RTOS-754
Allows for UART-like devices to be created which transmit data over RTT.
Description
Console can be defined to use either UART (as before) or an RTT channel. For now it is not possible to have console through both UART and RTT.
Each RTT channel can be configured to work in non-blocking or blocking mode. In non-blocking mode data is discarded if there is no space left in the buffer. In blocking mode the code attempts to detect if there is a host receiving data over the RTT interface and if there is, the code waits a pre-defined period until there is space left in the buffer.
Motivation and Context
With this change it is possible to access console (e.g.
psh
) over RTT interface.Types of changes
How Has This Been Tested?
Checklist:
Special treatment