Skip to content

Conversation

@thejpster
Copy link
Contributor

There are targets for ARMv4T and ARMv5TE that default to Thumb mode and not Arm mode.

Support is relatively easy - all the assembly routines should use a .arm directive to indicate that they should be assembled to A32 machine code rather than T32 machine code. Some functions contain inline assembly that isn't possible in older Thumb variants, and those are expressly marked as being in Arm mode.

I also took the chance to clean up the interrupt disable/enable routines, splitting the atomic fences from the actual inline assembly.

@thejpster thejpster force-pushed the support-thumbv4t-thumbv5te branch from 729c1c5 to 45dc402 Compare October 29, 2025 12:39
@robamu
Copy link
Contributor

robamu commented Oct 29, 2025

Oh, these targets are not documented in the rustc docs? Might be a good idea to update https://doc.rust-lang.org/rustc/platform-support/arm-none-eabi.html . Should i look into that? We could update the maintainer list for https://doc.rust-lang.org/rustc/platform-support/armv5te-none-eabi.html and/or https://doc.rust-lang.org/rustc/platform-support/armv4t-none-eabi.html while we're at it.

@thejpster
Copy link
Contributor Author

They are on https://doc.rust-lang.org/rustc/platform-support/arm-none-eabi.html as Tier 3 targets.

I don’t think I’m ready to volunteer to maintain the targets, but I will ping the maintainers on Zulip to all about atomics.

@thejpster
Copy link
Contributor Author

@QuinnPainter, I see you’re the maintainer of ARMv5TE bare metal support. We’ve added the target to our little aarch32 library here, which might be of interest. I also wanted to ask about atomics on this platform. I have a Zulip thread at https://rust-lang.zulipchat.com/#narrow/channel/242906-t-compiler.2Farm/topic/__sync_lock_test_and_set_4.20on.20Armv5TE if you have thoughts on that.

@jonathanpallant jonathanpallant added this pull request to the merge queue Oct 30, 2025
Merged via the queue into rust-embedded:main with commit f277c1e Oct 30, 2025
57 checks passed
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

Successfully merging this pull request may close these issues.

3 participants