You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing some caravel firmware project that had integer multiplication I got this error: undefined reference to '__mulsi3'
It seems that the default Makefile didn't include libgcc, where soft implementations of mult, mod, float, etc are located
Adding -lgcc at the end of the compilation command seems to solve the issue: $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=$(ARCH) -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c ../stub.c $< -lgcc
I'm not an expert on the subject so maybe there are some other implications to adding libgcc, but it seems to me that making this change could help others that may run into this issue
The text was updated successfully, but these errors were encountered:
Testing some caravel firmware project that had integer multiplication I got this error:
undefined reference to '__mulsi3'
It seems that the default Makefile didn't include libgcc, where soft implementations of mult, mod, float, etc are located
Adding
-lgcc
at the end of the compilation command seems to solve the issue:$(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-gcc -I../ -I../generated/ -O0 -mabi=ilp32 -march=$(ARCH) -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o $@ ../crt0_vex.S ../isr.c ../stub.c $< -lgcc
I'm not an expert on the subject so maybe there are some other implications to adding libgcc, but it seems to me that making this change could help others that may run into this issue
The text was updated successfully, but these errors were encountered: