Skip to content
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

Document and file target-side SWO transients woes, ETB usage #119

Closed
tmplt opened this issue Jan 15, 2022 · 0 comments
Closed

Document and file target-side SWO transients woes, ETB usage #119

tmplt opened this issue Jan 15, 2022 · 0 comments
Milestone

Comments

@tmplt
Copy link
Member

tmplt commented Jan 15, 2022

From a Teams chat:

Some notes from today's experimentation: on device start we configure PC27 to SWO. This yields effectively random noise on the pin which screws up the state of the ITM decoder. Hence why I've gotten a different trace each run. Breaking after this setup and then tracing have yielded the below three times in a row (for a single hardware task pended in init):

$ itm-decode /dev/tty
ExceptionTrace { exception: Interrupt { irqn: 12 }, action: Entered }
ExceptionTrace { exception: Interrupt { irqn: 12 }, action: Exited } 
ExceptionTrace { exception: ThreadMode, action: Returned }

Missing from this trace is the enter packet for ThreadMode, but these can be ignored because RTIC always executes in "handler" mode. The above means that tracing a program from device boot (what RTIC Scope has been designed for thus far) is practically impossible unless it is known how many trace bits we should drop (impossible). This is an effect of using the TPIU for trace exfiltration. The solution to this is to use the Embedded Trace Buffer (ETB) which is stored in memory: high-data throughput, but a smaller FIFO queue (dont know if the size is static yet). This will require a debugger to poll messages quickly enough so that we dont overflow the queue.


Sort the above into relevant issues.

@tmplt tmplt added this to the v0.3.1 milestone Jan 15, 2022
tmplt added a commit that referenced this issue Jan 17, 2022
Closes #119.
@tmplt tmplt closed this as completed in 5d0e381 Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant