Hi, i encountered an error while compiling a basic...
# mpw-6plus-silicon
a
Hi, i encountered an error while compiling a basic multiplication c code during make clean flash,
__mulsi3
,
memcpy
,
printf
functions are not linked due to unavailable of standard c libraries. I also tried with providing the LDFLAGS=
-lc -lgcc -lm
. Still the issues are not solved. I hereby attaching my error file and make file. Could anyone tell me how to get rid off error and compile. Expecting quick responses. Thanks inadvance
t
printf
will always be an issue because there is no concept of stdio on a simple microcontroller; the functions
print
and
print_hex
and others have been defined (they make use of the UART) and you can find them defined in various places like the
caravel_board
repository
firmware/chipignite/stub.c
. Just include that file into your program to access
print()
and
print_hex()
. For the others, note that this is a very simple and direct compiler call to
gcc
in the makefile; if
LDFLAGS
is not used in the makefile recipe, then setting
LDFLAGS
isn't going to do anything useful.
-lc -lgcc -lm
are the right flags to pass to
gcc
but you need to add them directly to the call in the makefile.