-
Notifications
You must be signed in to change notification settings - Fork 130
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
[fiber] Add support for ARM64 targets #1113
Conversation
0d0a37d
to
b9c09e3
Compare
b9c09e3
to
23235c8
Compare
7555fc8
to
3a1c70b
Compare
I'll merge this tonight, we can check and fix the RPi ARM64 later. It's not our primary target anyways, but I'd like to have the unit tests pass on my machine again ;-P |
It does not work 😢, because the x86_64 context switching (
I'll investigate further later this day... |
What is the purpose of this "rpi" target? I don't see any difference, except that it includes the wiringpi GPIO module, which is deprected since 2019 and also broken on Debian bookworm-based Rpi Linux distibutions. I would suggest simply removing the |
Because I'm stupid and I copied the x86_64 file without modifications. 🙈🙈🙈 OMG, I'm getting old… 👴
Yeah, that make sense. We only had GPIO support anyways, so with that gone, there's no difference to |
18ebef2
to
a895cd1
Compare
Could you try it again now? @rleh |
Now it works on a Aarch64 linux system (Raspberry Pi 4 8GB running Raspbian OS 64-bit)! @salkinium Could you check if it still works on ARM-based MacOS? 😆 |
Will do. I also read that GitHub has ARM64 macOS runners, I'll check that out tonight. |
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.
Thank you a lot for the work @salkinium!
-Os is not properly supported by LLVM for ARM64
3d0462d
to
4cce264
Compare
Ok, so. GCC on macOS ignores The macOS linker seems to require leading underscores. 🙄 This is also done in the boost asm files. I've added a template switch. Could you test again on Linux? |
Yes, and it works fine!
GCC has a switch Because there is a better option: extern "C" void modm_context_entry() asm("_modm_context_entry"); I reverted the template file back to a normal C++ file and implemented the ASM labels instead (see 1e36434), works (still) on arm64 linux. |
Yup, that works! Thanks! I'll squash and merge it after the CI passes. |
Co-authored-by: Raphael Lehmann <raphael@rleh.de>
1e36434
to
623a13b
Compare
Removing the underscores also works this way! |
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.
Nice, thanks!
I've added a new key to the hosted device files:
arch
witharm64
andx86_64
. Maybe it should beaarch64
?-arm64
suffix,-x86_64
is implicit for backwards compatibility:hosted-linux-arm64
hosted-darwin-arm64
hosted-rpi
target, as wiringPi is deprecated and thus the target lost its only peripheral.