6 years, 10 months ago.

Export mbed project to IAR

Hi, I am trying to export sample project to IAR Workbench. Here is list of build error messages:

Linking Error[Li060]: module "retarget.o" contains C++ code built for use with the (E)C++98 library. This code is not link compatible with the new (C++14) library. Error[Li009]: runtime model conflict: Module retarget.o specifies that 'CPP_Exceptions' must be 'Disabled', but module main.o has the value 'Used' Error[Li009]: runtime model conflict: Module retarget.o specifies that 'CPP_Language' must be 'C++', but module main.o has the value 'C++14'. Modules compiled with C++14 are not link-compatible with modules that are compiled with older C++. Error[Li060]: module "Stream.o(mbed.a)" contains C++ code built for use with the (E)C++98 library. This code is not link compatible with the new (C++14) library. Error[Li060]: module "FileSystemLike.o(mbed.a)" contains C++ code built for use with the (E)C++98 library. This code is not link compatible with the new (C++14) library. Error[Li060]: module "FilePath.o(mbed.a)" contains C++ code built for use with the (E)C++98 library. This code is not link compatible with the new (C++14) library. Error[Li060]: module "FileLike.o(mbed.a)" contains C++ code built for use with the (E)C++98 library. This code is not link compatible with the new (C++14) library. Error[Li060]: module "FileBase.o(mbed.a)" contains C++ code built for use with the (E)C++98 library. This code is not link compatible with the new (C++14) library. Warning[Lt009]: Inconsistent wchar_t size analogin_api.o and 33 other objects have wchar_t size 16 bits main.o and 95 other objects have wchar_t size 32 bits Error while running Linker

How to configure Workbench IDE to successfully bulid the project? Tahanks, I am begginer...

what target, what example, what is mbed library version? how do you export? please provide more details

posted by Martin Kojtal 08 Jun 2017

I have ran into the same. Did you resolve this?

posted by Michael Nygaard 28 Sep 2017

3 Answers

5 years, 8 months ago.

Hi,

I'm using IAR Workbench 8.30.1 to Build and Debug the code for mbed NXP LPC 1768.

I have installed only the IAR for ARM and exported the mbed-blinky from online compiler.

I'm trying to build with default options of IAR. I am getting the following errors during Make. Please help.

Build Errors

Building configuration: mbed_blinky - mbed_blinky 
Updating build tree... 
main.cpp  
Linking 
Error[Li060]: module "mbed_retarget.o" contains C++ code built for use with the (E)C++98 library. This code is not link compatible with the new (C++14) library. 
Error[Li009]: runtime model conflict: Module mbed_retarget.o specifies that '__CPP_Language' must be 'C++', but module main.o has the value 'C++14'. Modules compiled with C++14 are not link-compatible with modules that are compiled  
with older C++. 
Error[Li060]: module "mbed_poll.o(mbed.a)" contains C++ code built for use with the (E)C++98 library. This code is not link compatible with the new (C++14) library. 
Error[Li060]: module "FilePath.o(mbed.a)" contains C++ code built for use with the (E)C++98 library. This code is not link compatible with the new (C++14) library. 
Error[Li060]: module "FileHandle.o(mbed.a)" contains C++ code built for use with the (E)C++98 library. This code is not link compatible with the new (C++14) library. 
Error[Li060]: module "Timer.o(mbed.a)" contains C++ code built for use with the (E)C++98 library. This code is not link compatible with the new (C++14) library. 
Error[Li060]: module "FileBase.o(mbed.a)" contains C++ code built for use with the (E)C++98 library. This code is not link compatible with the new (C++14) library. 
Error[Li005]: no definition for "__aeabi_read_tp" [referenced from errno.o(dl7M_tlf.a)] 
Error while running Linker 
 
Total number of errors: 8 
Total number of warnings: 1 

Hi Sohaib,

Try downloading a 7.x version of IAR. I believe the 8.x versions are not supported by mbed.

-Karen, team Mbed

posted by Karen Yen 08 Aug 2018

Hi Karen, I have not found it yet, if you have some download links for 7.x versions, please post.

Thanks a ton.

posted by sohaib qamar 09 Aug 2018
5 years, 6 months ago.

This is not good for mbed. I will not revert to using an older version of IAR. I will now move forward with using FreeRTOS.

Please fix this as mbed seems to be a good product.

Hi Wheatly, I was not able to resolve the problem using IAR 8. I then moved to Keil & it's work like charm. Please use Keil or try to find IAR 7, i got no luck in finding IAR 7.

Thanks.

posted by sohaib qamar 05 Oct 2018
6 years, 8 months ago.

I'm having the same problem