I was assuming that it was a really simple task but I did not find anything relevant or my mistake. So putting my problem here i.e. I have some project for MSP430 which is actually in code composer studio. I have to run this whole code into IAR embedded workbench now. There are some library files(*.lib) that are also provided with the project and that should have to be linked to build the project. After little modifications code is compiling fine but I am unable to link the libraries and getting linker errors. I worked on IAR with avr but very very little just to test some sample codes. I did not find the option where to mention these library names and their respective paths. I checked out the linker tab but I am not getting any clue to link these .lib files with project.
Asked
Active
Viewed 2,589 times
2
-
I'm not at all surprised by this, even though I've never used IAR. Every IDE I've seen since ~2000 has a hugely confusing screen with multiple toolbars and dockable panes that do all sorts of clever things except make it easy to build projects, ie. compile, link, download to target, run. Your problem is just typical - can't easily see how to link with library files - an essential that is not obvious – Martin James Mar 23 '12 at 11:38
-
I think you can add libraries in the same way you would add source files. "Project menu->Add Files...". There is a filter in the selection dialog, so I'm guessing you can do it that way. Never tried though. – tinman Mar 24 '12 at 15:57
-
I already tried this way but then it is issuing error message like the file is not in ubrof format – jahmed Mar 26 '12 at 05:13
1 Answers
2
I believe that you are asking
How do I include a function that is in a binary library file supplied by one compiler vendor (Texas Instruments) into a project that is being compiled and built using a toolchain that is supplied by another vendor (IAR)
I would be very surprised if this is possible as the binary formats and calling conventions used by the two toolchains are probably different. The fact that you are getting an error message sayng that the library is not in UBROF format points to this fact. You need to do one of the following:
- Compile the source for the old library module using the IAR toolchain (Even if you have the source for this file, it may well contravene the licence that allows you to use the function in your first toolchain)
- You will have to find an equivalent function in the IAR toolchain libraries
- Write your own clean function that performs the same purpose as the original library routine.

uɐɪ
- 2,540
- 1
- 20
- 23
-
Hi Ian, thanks for your reply, but I don't have the code for provided lib to compile it using IAR toolchain, I have only the binary object file in the form of .lib. I tried it with code composer studio and crossworks and the project is compiling well for these two IDE's but not for IAR. – jahmed Mar 26 '12 at 18:57
-
-
No these are not from the TI library but a third party library, which are actually providing their library for their embedded peripheral which is using MSP430. – jahmed Mar 27 '12 at 16:58
-
Go back to the third party supplier and ask for the library compiled under IAR. As IAR has always been the primary tool vendor for the MSP family I would be very surprised if they do not provide such a library. – uɐɪ Mar 28 '12 at 06:56