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
Struggling to make LiteOS #99
Comments
I'm very keen to hear any advice on how to proceed with debugging this as it is blocking my progress on an important project! Or any other promising projects that will allow me to run C programs from an SD card. |
I'll take a look asap. Seems that smthg was changed in LiteX that breaks LiteOS compilation. |
Do you remember an old version of LiteX which you know it works for? Maybe I could revert to that version for the time being if you have the commit SHA? |
I think that LiteX commit f8863bb works. Please tell me whether it works for you. |
Thanks! I checked out that commit of LiteX and the Makefile in the LiteOs directory completed successfully! |
Although I have to revert to the newest version of LiteX if I want commands like this: |
Yes, using an old version of LiteX is just a temporary fix, I'm trying to fix everything for the newest version (for now I have a couple of things to do with the version for the ULX3S that has a few add-ons that no longer work with the newest LiteX, in particular the ability to switch the SDCard between the ECP5 and the ESP32 dynamically, which is useful to send files to the SDCard through WIFI directly...) |
Thanks for your help with this! So far I have got the LiteOs binary that I managed to compile running on an orangecrab 85-F by copying boot.bin to the SD card (I am waiting to get my hands on a ULX3S unfortunately) but it appears to hang before I get the LiteOs prompt:
The output unfortunately stops there. |
Different things you can try:
|
(I have a 45F orange crab at home, I'll try with it as soon as I have time) |
I tried with electron after recompiling boot.bin and copying it the the SDcard but I had the same problem:
I'll try vexriscv with the demobudle next. |
I have been deleting this line from the main.c files as it causes this error: |
I'm having trouble compiling demobundle for vexriscv_smp so I'll try FemtoRV again:
|
Are you using LiteX version f8863bb ? |
I am able to make LiteOs by just running I'll see if I can make demobundle after running |
It seems to produce the same error:
|
It seems to be happy to run the litex demo.bin file:
|
I can't really explain what is happening here because I can only see one demo.bin on the SD card and it does not contain the code that prints out those statements! |
The messages that you see come from the BIOS, that is bundled with the bitstream sent to the FPGA.
When you invoke reboot, it restarts the code that downloads |
Is there any way to debug my SD card setup? It is a brand new SanDisk SD card that is FAT32 formatted and has nothing but the demo.bin binary on there. I gave the SD card a name on my computer but that is all I have changed. |
Should mem_list show the SD card?
|
It seems that others have had trouble with the SD card on the Orangecrab: litex-hub/linux-on-litex-vexriscv#123 |
Hi,
Update: I just checked, |
Do not give up ! I have a little bit of time this week, and I understood compilation problems with latest LiteX, |
To compile LiteOS with latest LiteX: |
Pushed a new
|
On my ULX3S, with the new |
Note: some C++ programs do not link (something remains to be fixed in |
On the ULX3S, a small modification in one of LiteX files needs to be done to let the FPGA access the SDCard, I have filed a LiteX issue (all details given there if you want to try it) |
I confirm that LiteOS works on my OrangeCrab. Synthesize and program:
Build software:
Copy
This should load LiteOS from the SDCard
|
Awesome! It also works on my 85F Orangecrab! Thanks so much for your help with this! I will close the issue now! |
When I run
make
for LiteOS (after fixing some errors I got from unescaped "" in a printf statement) I get this error:ar cq libliteos.a lite_oled.o lite_fb.o lite_elf.o lite_stdio.o imgui.o imgui_demo.o imgui_draw.o imgui_tables.o imgui_widgets.o imgui_sw.o ranlib libliteos.a warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: libliteos.a the table of contents is empty (no object file members in the library define global symbols) CC boot.elf /usr/local/Cellar/riscv-gnu-toolchain/main/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: warning: boot.elf has a LOAD segment with RWX permissions /usr/local/Cellar/riscv-gnu-toolchain/main/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: /Users/jamesmeech/Desktop/Casino/learn-fpga/LiteX/build/digilent_arty/software/liblitedram/liblitedram.a(sdram.o): in function
sdram_init':/Users/jamesmeech/Desktop/Casino/Enjoy_Digital/litex/litex/soc/software/liblitedram/sdram.c:1179: undefined reference to
memtest' /usr/local/Cellar/riscv-gnu-toolchain/main/lib/gcc/riscv64-unknown-elf/12.2.0/../../../../riscv64-unknown-elf/bin/ld: /Users/jamesmeech/Desktop/Casino/learn-fpga/LiteX/build/digilent_arty/software/liblitedram/liblitedram.a(sdram.o): in function
csr_write_simple':/Users/jamesmeech/Desktop/Casino/Enjoy_Digital/litex/litex/soc/software/include/hw/common.h:33: undefined reference to
memspeed' collect2: error: ld returned 1 exit status make: *** [boot.elf] Error 1
How can I fix this?
The text was updated successfully, but these errors were encountered: