Warnings from Processor Expert from ConsoleIO

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Warnings from Processor Expert from ConsoleIO

Jump to solution
1,659 Views
sryan
Contributor III

I used Processor Expert to add a ConsoleIO to my project for debugging and now when I build I get three warnings:

DescriptionResourcePathLocationType
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_ProgrammerC/C++ Problem
DescriptionResourcePathLocationType
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_ProgrammerC/C++ Problem
DescriptionResourcePathLocationType
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_ProgrammerC/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!

Labels (1)
1 Solution
1,175 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

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

View solution in original post

0 Kudos
8 Replies
1,175 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

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.

IO_Support.png

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".

ewl_library.png

Let us know if this helps to correct your issue.

Regards!

Jorge Gonzalez

1,175 Views
sryan
Contributor III

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:

CWSetup.jpg

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.

CodewarriorScreen.jpg

0 Kudos
1,176 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

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

0 Kudos
1,175 Views
jonathanscott
Contributor III

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

0 Kudos
1,175 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

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

0 Kudos
1,175 Views
jonathanscott
Contributor III

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


1,175 Views
sryan
Contributor III

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

0 Kudos
1,175 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hi Sam:

Good it works.

Yes, it is possible to update your projects. I am attaching a document with tips and tricks on how to do it.

Regards!

Jorge Gonzalez

0 Kudos