I used Processor Expert to add a ConsoleIO to my project for debugging and now when I build I get three warnings:
Description | Resource | Path | Location | Type |
Symbol __close_console multiply defined in CsIO1_c.obj() and librt_Thumb_LE_v7M.a(semihosted_cons) Ignoring the definition in librt_Thumb_LE_v7M.a(semihosted_cons) | External_Memory_Programmer | C/C++ Problem |
Description | Resource | Path | Location | Type |
Symbol __read_console multiply defined in CsIO1_c.obj() and librt_Thumb_LE_v7M.a(semihosted_cons) Ignoring the definition in librt_Thumb_LE_v7M.a(semihosted_cons) | External_Memory_Programmer | C/C++ Problem |
Description | Resource | Path | Location | Type |
Symbol __write_console multiply defined in CsIO1_c.obj() and librt_Thumb_LE_v7M.a(semihosted_cons) Ignoring the definition in librt_Thumb_LE_v7M.a(semihosted_cons) | External_Memory_Programmer | C/C++ Problem |
I can't find "librt_Thumb_LE_v7M.a" in my project and I'm not sure what it is or why it would have those methods defined. Does anyone know where that file is located or how to fix this? I am using CodeWarrior v 10.5 and I'm developing for a TWRK60d100M dev board. Thanks!
Solved! Go to Solution.
Hello Sam:
Sorry, I jumped the gun and thought you were using GCC. In that case the warnings are due to multiple definitions, but according to these warnings the functions ignored are those of the libraries, and your functions included with the ConsoleIO component are the valid ones, then you should have no problem. Have you tried to use prints? They should be directed to your selected UART channel.
As for your other question, it is recommended to use GCC build tools instead of Freescale tools. GCC produces smaller and more efficient code. Besides Freescale tools are no longer developed and the default option is to use GCC.
Hope my reply is useful!
Jorge Gonzalez
Hello Sam:
Seems you have conflict with low level IO support.
I assume you want to direct your console functions (printf, ...) to a UART channel, is that correct?
In that case, from the New Project wizard , you should have selected UART, not Debugger Console.
To correct this, go to Project -> Properties -> C/C++ Build -> Settings -> Librarian, and make sure you have the "ewl" library selected, instead of "ewl_hosted".
Let us know if this helps to correct your issue.
Regards!
Jorge Gonzalez
Hi Jorge, thanks for the answer!
You are correct that I am trying to redirect the console output to the UART.
When I started the project I chose "Freescale" under Arm Build Tools, so it looked like this:
If I select GCC instead of Freescale at that screen I do see the UART radio button, but with Freescale selected I don't see it. Should I use GCC instead of Freescale? I'm not really clear on the differences to be honest.
I checked under Project -> Properties -> C/C++ Build -> Settings -> Librarian and it looks like I do have ewl selected, I included a screenshot.
Hello Sam:
Sorry, I jumped the gun and thought you were using GCC. In that case the warnings are due to multiple definitions, but according to these warnings the functions ignored are those of the libraries, and your functions included with the ConsoleIO component are the valid ones, then you should have no problem. Have you tried to use prints? They should be directed to your selected UART channel.
As for your other question, it is recommended to use GCC build tools instead of Freescale tools. GCC produces smaller and more efficient code. Besides Freescale tools are no longer developed and the default option is to use GCC.
Hope my reply is useful!
Jorge Gonzalez
Hello Jorge,
After integrating a large batch of code from a new include path, I am having a similar issue, and i'm wondering if you could help? I am getting:
'Invoking: ARM Ltd Windows GCC C Linker'
...
c:/freescale/cw mcu v10.5/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -lrt
c:/freescale/cw mcu v10.5/cross_tools/arm-none-eabi-gcc-4_7_3/bin/../lib/gcc/arm-none-eabi/4.7.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -luart
These are the only two errors I have, and I don't know of any duplicate definitions. I thought perhaps it had something to do with duplicate include paths in the project settings, but I can't seem to make it go away... I am using CW 10.3 with the ARM Ltd. GCC toolchain, and i'm not using the UART for any console I/O that I'm aware of. Any idea how to pinpoint the problem?
Thanks,
Jonathan
Hello Jonathan:
Sorry, I have not seen those errors before. Please create a new thread about this and if possible share your project to recreate it. I will download it and give it a check when I find some time.
Regards!
Jorge Gonzalez
Jorge,
Thanks for your reply. I did figure it out, and it did indeed have to do with the librarian model setting. It was incorrectly set to EWL instead of EWL hosted.
Jonathan
Hi Jorge,
That's correct, the "printf"s were working. I was just worried about what the warnings meant and I like to keep my projects warning free when possible because it makes it easier to spot when new ones pop up. I started a new project using the GCC build tools and it looks like I can use the console without warnings now, thanks for the help!
I do have one quick follow up question: Is there a way to change my existing project (which currently uses the Freescale build tools) to use the GCC build tools, or will I need to create a new project and import my old files?
Thanks again!
Sam