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

Support non 32-bit targets #48

Open
timdyer opened this issue May 7, 2024 · 1 comment
Open

Support non 32-bit targets #48

timdyer opened this issue May 7, 2024 · 1 comment

Comments

@timdyer
Copy link

timdyer commented May 7, 2024

The rtt-target crate assumes it is running on a 32-bit target. The use of pointers and usize in the header and channel structs prevent the crate from working on non 32-bit targets.

I hacked together a branch switching the pointers and usizes with u32s along with many try_into().unwrap()s sprinkled in to prove out it can work for a 64-bit target.

Is this a direction the crate would want to go? Ideally the pointer conversion checks would happen at compile time and we could prove some of the usize to u32 conversions would be infallible.

At a minimum the 32-bit limitation currently undocumented and could be called out in the README and docs.

@Yatekii
Copy link
Member

Yatekii commented May 8, 2024

Yeah, I definitely want 64 bit support.
That might be inherently limited a bit though because you need to halt the core to read memory fast afaik, which kind of defies the purpose of RTT because it destroys any real-time guarantees it should give.
But I have not played with 64 bit targets, so I cannot tell how it's actually impacted.

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

2 participants