-
Notifications
You must be signed in to change notification settings - Fork 153
arch: Add support for RX GCC build #857
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
base: main
Are you sure you want to change the base?
arch: Add support for RX GCC build #857
Conversation
d4ae9b0
to
dcac855
Compare
hi @stephanosio , on this PR, I added build configuration to support GCC rx-zephyr-elf build target, can you help to review. |
@kartben may you help to assign the suitable person as assignee ? |
I'd be happy to help get the picolibc changes merged upstream and then into the Zephyr picolibc fork. For that, I would prefer to have the picolibc CI tests work on this target. That requires crt0 and semihost support sufficient to run tests under qemu. |
ok, I spent probably too much time having fun with this tonight. I've got a toolchain building, binutils, gcc, qemu and picolibc and lots of picolibc tests are passing. Floating point is a problem area still, which is not unexpected given the non-standard floating point support in this chip. The first thing that needs to happen for that to be usable is to tell GCC about the hardware limitations and expose them in the relevant pre-defined preprocessor symbols would at least tell picolibc to skip tests expecting conformance. Something in the string instruction handling is quite broken; I don't know if it's the compiler or qemu, but I've had to skip these instructions in testing. I have no idea what 'PID' support means; I assume it relates to position-independence? Is there a description of the RX ABI we can use to help sort this out? gcc: (based off 14.2.0) https://github.com/keith-packard/gcc/tree/add_support_rx_gcc_build_zephyr The GCC patches were just rebased, so no real changes there. I was hoping the string instructions would work better, but alas no. QEMU has a couple of small changes:
Once we're reasonably happy with things, I'll plan on upstreaming the QEMU and GCC patches. Oh, please plan on submitting picolibc PRs to the picolibc upstream repo instead of the Zephyr-fork. |
7236933
to
7b966fd
Compare
This doesn't appear to include the RX fixes from picolibc? Or am I just looking in the wrong place? |
de207c5
to
56dc716
Compare
@keith-packard , sorry, maybe I misunderstood you, I thought we are going to update the picolibC after the 1.8.9 get merged to the sdk-ng |
56dc716
to
ae34c24
Compare
hello @stephanosio , @tejlmand , Can you help me on the CI job for RX target on this PR, I've added the rx-zephyr-elf target build on this but it seem that the github workflow does not run the new update. |
b9b9a3a
to
b1afaa2
Compare
.gitmodules
Outdated
[submodule "gdb"] | ||
path = gdb | ||
url = https://github.com/zephyrproject-rtos/binutils-gdb.git | ||
[submodule "picolibc"] | ||
path = picolibc | ||
url = https://github.com/zephyrproject-rtos/picolibc.git | ||
url = https://github.com/renesas/picolibc.git |
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.
What changes do you need that aren't present in picolibc 1.8.9? You should be able to use the picolibc 1.8.9 bits in the zephyr repo already.
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.
@keith-packard , the RX changes seem hasn't been included in the 1.8.9 in the Zephyr, or do I need to do something?
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.
Oh, I hadn't posted a PR for 1.8.9. Oops. It's now #872.
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.
right, the key RX fixes landed just after 1.8.9. I can do a 1.8.10 release to include that; that would do a bunch of testing beyond the usual CI so it might be better than just pulling Zephyr to some random commit.
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.
Hello @keith-packard , is it mean that you will pull in the RX support into main branch of Zephyr fork picolibC?
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.
Yes. I'll plan on doing a picolibc release and then pulling that over to the SDK and Zephyr main. Do you have any particular schedule requirements beyond hitting the next Zephyr release target?
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.
@keith-packard when will you be able to release a 1.8.10? Planning to do a 0.17.1 soon, ideally with RX and openrisc, new picolibc and the new host tools with newer poky.
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.
Yes. I'll plan on doing a picolibc release and then pulling that over to the SDK and Zephyr main. Do you have any particular schedule requirements beyond hitting the next Zephyr release target?
@keith-packard , no, my main target is trying to get the RX architecture support available on Zephyr 4.2
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.
@keith-packard when will you be able to release a 1.8.10? Planning to do a 0.17.1 soon, ideally with RX and openrisc, new picolibc and the new host tools with newer poky.
awesome. I'm happy to do a release to suit your schedule; I'm currently merging in some header cleanups and testing those against Zephyr (and other picolibc consumers) will improve that a bunch. I'll get a topic branch started in the SDK before I do the 1.8.10 release so I can make sure 1.8.10 actually does what we want.
9ab03ec
to
bc6a921
Compare
We need to use a released version of picolibc with RX support, not an intermediate tag -- released versions get a lot more testing and validation than I can do in regular CI. That means waiting for picolibc 1.8.10. Picolibc 1.8.10 release is blocked on zephyrproject-rtos/zephyr#87657 as I want to land the -Os/-O2 multilib bits in the SDK with that. If we get really stuck, we could skip that and just finish up the 1.8.10 release and merge that so that RX support can be included. |
This commit only add minimal require part to enable Renesas RX architecture gcc toolchain build on Zephyr SDK Signed-off-by: Duy Nguyen <[email protected]>
Signed-off-by: Duy Nguyen <[email protected]>
Signed-off-by: Duy Nguyen <[email protected]>
bc6a921
to
7359bf6
Compare
All of these changes should now be included in the picolibc-1.8.10 PR; please verify that and close this PR when you're happy. |
hello @keith-packard , Thank you very much for helping us, I've checkout to the topic-picolibc-1.8.10 but cannot get the build to be success on my local, I see that the CI run on that branch pass, do I need to update something in the build system for it to pass
|
You need the crosstool-ng patches for picolibc-1.8.10 which are in the topic-picolibc-1.8.10 PR for sdk-ng. |
In fact, the topic-picolibc-1.8.10 branch should have everything the SDK needs to build the toolchain, and the only reason the build failed is because the tests, using Zephyr without RX patches, all failed. |
@keith-packard , Sorry it's my mistake, I used the sdk-ng topic-picolibc-1.8.10 but the crosstool-ng and build output folder was not clean properly. |
topic-picolibc-1.8.10 is where that work is happening -- it's on a topic- branch because that makes CI build all of the toolchains instead of just the linux-x86 ones. |
Enable build for rx-zephyr-elf in Zephyr SDK to support the RX architecture port on ZephyrRTOS