2024-07-02 03:44 AM - last edited on 2024-09-13 02:32 AM by Amel NASRI
Hi All,
Need one help.
When I try write to file using fopen / fwrite functions in debug mode I receive like
Error: L6200E: Symbol __stdout multiply defined (by stdio_streams.o and my_lib.a)
not enough information to list the image map
while building the code. and how I can solve it.
2024-07-02 04:07 AM - edited 2024-07-02 07:48 AM
@shekharsulgiti wrote:Error: L6200E: Symbol __stdout multiply defined (by stdio_streams.o and my_lib.a)
You're using Keil, aren't you?
"multiply defined" is their clumsy way of saying that you have multiple definitions of __stdout
As this is specific to Keil - not really to do with STM32 - you'd be better asking them:
https://community.arm.com/support-forums/f/keil-forum
(BTW: it's not a Compiler error - it's a Linker error)
EDIT:
The message tells you where the multiple definitions are:
So you need to decide which one of them is the one you want, and get rid of the other one.
Presumably, a library with a name like "my_lib" is something you wrote yourself? If so, consider whether it should be defining __stdout ... ?
2024-07-02 07:07 AM
Hello @shekharsulgiti
If you need both libraries and they must contain the definition of __stdout, you may need to modify the linker script to resolve the symbol conflict. This can be complex and depends on your specific toolchain and build system.
2024-07-02 07:14 AM
There's not file system here, are you attempting semi-hosting, or what exactly?
2024-07-02 07:49 AM
Is this how Keil does UART output from printf?