BrunoLevy / learn-fpga

Learning FPGA, yosys, nextpnr, and RISC-V
BSD 3-Clause "New" or "Revised" License
2.58k stars 245 forks source link

Build problem due to previous commit #70

Closed ethanrcampbell02 closed 1 year ago

ethanrcampbell02 commented 2 years ago

In commit 3ab7eaa to master branch of LiteX, a flag was removed which causes our build to fail. It works on commits prior to that one. This is the error that is given when we try to run make.

ecamp@CB459-EE11772:~/Projects/litex/learn-fpga/LiteX/software/LiteOS$ make
 CC       complete.o
 CC       helpers.o
 CC       readline.o
 CC       cmd_bios.o
 CC       builtins.o
 CC       isr.o
 CC       main.o
 CC       crt0.o
 CC       lite_oled.o
../Libs/lite_oled.c: In function 'oled_init':
../Libs/lite_oled.c:10:8: warning: unused variable 'trigger_warning' [-Wunused-variable]
    int trigger_warning; // LiteX synthesized without OLED support (graphics commands will be ignored)
        ^~~~~~~~~~~~~~~
 CC       lite_fb.o
../Libs/lite_fb.c: In function 'fb_line':
../Libs/lite_fb.c:212:111: warning: 'y' may be used uninitialized in this function [-Wmaybe-uninitialized]
 #define code(x,y) ((x) < fb_clip_x1) | (((x) > fb_clip_x2)<<1) | (((y) < fb_clip_y1)<<2) | (((y) > fb_clip_y2)<<3)
                                                                                                               ^~
../Libs/lite_fb.c:221:11: note: 'y' was declared here
     int x,y,dx,dy,sx,sy;
           ^
../Libs/lite_fb.c:221:9: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int x,y,dx,dy,sx,sy;
         ^
 CC       lite_elf.o
 CC       lite_stdio.o
 CX       imgui.o
 CX       imgui_demo.o
 CX       imgui_draw.o
 CX       imgui_tables.o
 CX       imgui_widgets.o
 CX       imgui_sw.o
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
 CC       boot.elf
/home/ecamp/Projects/litex/litex/build/digilent_nexys_video/software/libbase/libbase.a(memtest.o): In function `csr_write_simple':
/home/ecamp/Projects/litex/litex/litex/soc/software/include/hw/common.h:33: undefined reference to `__muldi3'
/home/ecamp/Projects/litex/litex/build/digilent_nexys_video/software/libbase/libbase.a(memtest.o): In function `print_speed':
/home/ecamp/Projects/litex/litex/litex/soc/software/libbase/memtest.c:181: undefined reference to `__muldi3'
collect2: error: ld returned 1 exit status
make: *** [Makefile:21: boot.elf] Error 1
BrunoLevy commented 1 year ago

Fixed (adapted makefile.inc to new LiteX)