-
Notifications
You must be signed in to change notification settings - Fork 574
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
issues with the picolibc switch?: Use this issue to share issues/get information/help #1045
Comments
FYI: picolibc was introduced with #976, maybe there's some helpful information there |
Ok reading the issue, and then looking in the litex_setup.py, it looks like the real location is at https://github.com/antmicro/pythondata-software-picolibc I've changed the issue title to reflect the problem, which is that the help message put out by the build system is incorrect. It indicates that I should find the library in litex-hub, but in fact, it is on antmicro. |
Thanks @bunnie, @david-sawatzke for the feedback, the repo is still here: https://github.com/enjoy-digital/litex/blob/master/litex_setup.py#L26 and will work with the |
@bunnie: This should be good now: |
@bunnie: I just pinned the issue since you'll probably won't be the only one to have troubles with this change. To get this new dependency, users using It's also possible to install it with Since picolibc use Meson for the build, you also have to install meson: |
I'll work on getting |
thanks, adding that to our build fixes the problem in CI now. Issue is resolved for me, but I don't know if closing it causes trouble for the pin, so I'll leave it open. Feel free to close it anytime that's convenient for you. |
There's a related issue -- pythondata-software-picolibc has a
|
@bunnie: Thanks, we can keep it open to discuss/track other eventual issues. If I remember correctly you are not compiling the BIOS and just using the Rust generated headers, can you tell me at which point of your CI the regression happened? It should be possible to avoid the dependency for your project. @tcal-x: Thanks, I'll look at this tomorrow. |
You're correct, we don't use the C bios at all. This is the transcript of the run as I have it in my logs:
The failure was picked up by our "bleeding edge" CI where we run all our gateware modules against the latest Litex, so our top-level script is named |
The picolibc migration broke Rocket
After some debugging (using the simulator), I can confirm that keyboard input triggers a UART interrupt which makes it all the way here: https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/bios/isr.c#L54 with the correct PLIC claim number (corresponding to No idea currently why further calling |
The
|
I see a slight change in maximum UART speed. We had been using 3686400 with Arty A7-35t (which has an "HQ" FTDI chip). After bumping everything including the picolibc change, that speed does allow a stable terminal connection, but serialboot upload gives a CRC error.
It's OK if we reduce the speed to half that, 1843200. The issue seems to be on the gateware side, not on the lxterm side (checked by cross-testing with different versions). |
@tcal-x: Thanks for the feedback. I'll do some tests tomorrow and will see if I can implement an automatic calibration of the upload parameters in litex_term to avoid future similar issues. |
Thanks @enjoy-digital , that might help with #773 too :) |
Indeed @tcal-x, that's also for this one that I want to implement this :) |
@tcal-x is the baud related to picolibc? Maybe it's worth running serial load in simulation? |
@kgugala I have not narrowed it down to a specific commit or even to a specific repository included in my bump. So yes, it may be completely unrelated. It would be worth testing on a pure LiteX Arty build to see if I see the same change. |
@kgugala: The issue could be that the CPU takes more time to process/copy the payload with picolibc than with previous libbase and that litex_term parameters need to be updated. That's why I want to avoid manual tweaking of the parameters. |
CPU runs way faster than UART it should be able to process this |
I do see the same CRC error at 3686400 with a pure LiteX build. In litex_boards/targets/:
|
I think a simple acknowledgement type protocol would be super helpful. Thinks like running in a VM and the USB stack can also affect the achievable bandwidth even with the same gateware + firmware. As well, if something got slower with picolibc we should also fix that! |
Yep, working fine now, thanks! |
@kgugala: In fact the frame CRC and memcpy are done between each frame, which constraints things a lot more. Ideally, we should do the CRC during reception of frame N and memcpy of frame N during reception of the frame N+1; or increase the FIFO RX size/limit payload length. For now I allowed the serial boot frame reception to time out (80cb53f) and added an auto-calibration in litex_term (5661480). This also adds a @tcal-x: The example you were providing now works correctly on my side, can you try it? @mithro: It's indeed however possible that picolibc is slower on this than the previous libbase. It should be easier to improve this with the auto-calibration. |
@enjoy-digital yes it fixes it for me. I'm also eager to test that it fixed the serialboot issue on Fomu, especially in conjunction with litex-hub/litex-boards@5addd7f -- it's a good day for Fomu! |
Hi, after update to latest litex by using litex_setup.py update. make: 「/opt/litex/litex-boards/litex_boards/targets/build/qmtech_wukong/software/libc」 Found ninja-1.10.2.git.kitware.jobserver-1 at /usr/local/bin/ninja ERROR: Neither directory contains a build file meson.build. ==================================================================== If I copy the meson.build file from /opt/litex/pythondata-software-picolibc/pythondata_software_picolibc/data/newlib/libc/machine/riscv to /opt/litex/litex-boards/litex_boards/targets/build/qmtech_wukong/software/libc the error message will change to ERROR: Both directories contain a build file meson.build. I had already install meson, ninja by using pip3. where did I miss? BR, Akio |
@akioolin , I think I saw a similar issue in CFU Playground; the solution there was: make sure that the new picolibc submodule gets a recursive update, so that it loads its submodules. I think this should happen if you run |
Hi, @tcal-x : many thanks. CODE_OF_CONDUCT.md COPYING.picolibc find-copyright meson.build picolibc.ld.in semihost it is not empty. BTW, I do did "git submodule update --recursive" in /opt/litex/pythondata-software-picolibc/pythondata_software_picolibc/data. It is very strange. BR, Akio |
Hi, after some try and test, I found if change the command from "meson compile" to But it will appear new error. such like the followings, /usr/local/toolchains/riscv64-unknown-elf-gcc-10.1.0/bin/../lib/gcc/riscv64-unknown-elf/10.1.0/../../../../riscv64-unknown-elf/bin/ld: ../libc/libc.a(csinhf.c.o): ABI is incompatible with that of the selected emulation: It seems the target setting error. where could I change the target type? Many Thanks. BR, Akio |
Anybody seen an issue like this where the linker complains about: Here's how my driver code gets compiled:
|
@syed-ahmed I've seen this when updating some legacy code too. The issue is calling |
We can probably close this issue now. |
My CI just broke on the latest litex, and there's a new note that this library seems to be required:
However, at least in my view of litex-hub, I don't see a pythondata-software-picolibc:
(In the image above, I'm only finding software-compiler-rt in litex-hub, and that is the only search result)
I have a feeling I'm missing something really obvious -- could someone please give me a clue on where to find this new dependency?
The text was updated successfully, but these errors were encountered: