printf with openocd on makefile project
Hello, I want to compile a project which uses printf() through openocd on my linux machine by using a makefile. I am working with a STM32F031C6 (STEVAL-PTOOL1V1). I have follow some tutorials to do that but I’m getting linking errors. I followed what is described in ((https://www.openstm32.org/forumthread164#threadId798|this comment)) and my code looks like this.
I also added the liker flags as described in the post as follows:
{CODE}
LDFLAGS = $(MCU) -specs=nosys.specs -specs=nano.specs -specs=rdimon.specs -T$(LDSCRIPT) $(LIBDIR) $(LIBS) -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,cref -Wl,gc-sections -lc -lrdimon
{CODE}
And I’m getting this error:
{CODE}
in function `_lseek’:
syscalls.c:(.text._lseek+0x0): multiple definition of `_lseek’
{CODE}
I have read that I need to remove the file syscalls.c from my project but I don’t have any file called like this. Any idea of how can I solve this? Thank you !!