7 years, 1 month ago.

Linking error(s) when exporting to IAR

Hi, I am new to this, but when I export a simple sample project from mbed to IAR I get the following linking errors. Any ideas on how to fix this, I thought that the offline export process is seamless? Many thanks for your help.

Building configuration: Nucleo_read_button - Debug Updating build tree...

2 file(s) deleted. Updating build tree... main.cpp Linking Error[Li005]: no definition for "gpio_init" [referenced from D:\embedded_programming\Nucleo_read_button\Debug\Obj\main.o] Error[Li005]: no definition for "wait" [referenced from D:\embedded_programming\Nucleo_read_button\Debug\Obj\main.o] Error while running Linker

Total number of errors: 2 Total number of warnings: 0

Question relating to:

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

PLease share what library revision, a link to an example and your target.

posted by Martin Kojtal 25 Nov 2014

Martin, Target:ST Nucleo F103RB Example is importred from Programs name: Nucleo_read_button Author:Team ST This works fine using mbed but the problem occurs when I export this to IAR (ver 7.20.2) Please let me know if you need any more info, Thanks

posted by Ali Al-Safi 25 Nov 2014

1 Answer

7 years, 1 month ago.


You have this error because you do not have folder mbed\TARGET_NUCLEO_F103RB\TOOLCHAIN_IAR

In this folder, there are object and libraries files. You do not have this and linker can not fined these functions.

you need to update mbed library in online compiler and it will work

right click on mbed -> update -> export

Regards Milan