trabucayre / litexOnColorlightLab004

basic example of litex on colorLight 5A-75B based on fpga_101/lab004
29 stars 12 forks source link

Firmware does not build on Arch Linux #3

Closed roby2014 closed 1 year ago

roby2014 commented 1 year ago

Hi, I'm trying to build the firmware, however I'm getting these errors:

❯ make
 CC       main.o
main.c: In function 'led_test':
main.c:98:17: warning: implicit declaration of function 'leds_out_write' [-Wimplicit-function-declaration]
   98 |                 leds_out_write(i);
      |                 ^~~~~~~~~~~~~~
 CC       firmware.elf
/usr/lib/gcc/riscv64-linux-gnu/12.2.0/../../../../riscv64-linux-gnu/bin/ld:linker.ld:17: warning: memory region `main_ram' not declared
/usr/lib/gcc/riscv64-linux-gnu/12.2.0/../../../../riscv64-linux-gnu/bin/ld: cannot find ../../build/colorlight_5a_75e/software/libbase/crt0.o: No such file or directory
/usr/lib/gcc/riscv64-linux-gnu/12.2.0/../../../../riscv64-linux-gnu/bin/ld: cannot find -lbase-nofloat: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:18: firmware.elf] Error 1

Any idea? I've installed the RISC-V toolchain via this package: https://archlinux.org/packages/community/x86_64/riscv64-linux-gnu-gcc/

roby2014 commented 1 year ago

I found out that crt0.o can be found inside $(BUILD_DIR)/software/bios/crt0.o \ (bios folder instead of libbase). I've tried removing -lbase-nofloat to check if it compiles now, but I get even more errors: image

trabucayre commented 1 year ago

Hi, I have pushed a commit serie to update this repository: now firmware built fine. Thanks to have warn me about this failure