11 years, 7 months ago.

Compiling the mbed libraries offline: where's capi.ar?

I succeeded in building the mbed libraries offline for Keil uVision 4.70 (eval version) and have a shiny new mbed.ar in my build directory.

However when I remove the mbed directory of the project that I exported from the online compiler and copy my newly built one in its place, linking of my project fails within uVision with the error "error: L6002U: Could not open file mbed/LPC11U24/ARM/capi.ar: No such file or directory".

Looking within the directory it's correct that there is no capi.ar. Does anybody know how I build this, it doesn't seem to be created when I run build.py?

Thanks,

Steve

EDIT: Here's my build log /media/uploads/scsims/mbed_build.log

1 Answer

11 years, 7 months ago.

Very likely, you are exporting a project that was using an old version of the mbed library that was splitting the C API from the C++ API.

You should update the mbed library in the online IDE before exporting it to uVision.

Additionally, you cannot use the microlib distributed with uVision to build your project: it does not support C++.

I had to patch microlib to add C++ support, the latest releases of microlib include this patch, but uVision is still using an old version.

Build the mbed library with the "ARM" toolchain, instead of "uARM".

HTH, Emilio

Accepted Answer

Thanks Emilio...I just realised that my laziness in using an old export had caught up with me (again) and came to apologise for wasting everybody's time - sorry I was too late!

The reason I've been trying to build the toolchain from source is that I noticed the exported project had the ARM as opposed to the uARM directory inside mbed and the uVision project doesn't have "Use MicroLIB" checked. Your comment about the uVision microlib version not supporting C++ explains why! Just out of interest, will the upcoming uVision 5 contain your updates?

Thank you very much,

Steve

posted by Steve Sims 17 Apr 2013

Yes, actually uVision 5 uses ARM C/C++ Compiler, 5.03 [Build 24] that contains the new version of microlib supporting C++. Currently, the mbed SDK is still using our old patched version of microlib and we have still to integrate the new mainline microlib.

Cheers, Emilio

posted by Emilio Monti 18 Apr 2013

Emilio,

The current Keil MDK 4.71a includes ARMCC 5.03 [Build 69]

C:\Projects>armcc -vsn

ARM C/C++ Compiler, 5.03 [Build 69] [MDK-ARM Standard]

Software supplied by: ARM Limited

Would the microlib in that ARMCC build include those patches? That version builds simple mbed applications with microlib and they appear to execute correctly, although I have not done extensive testing.

Thanks, Jesus Alvarez

posted by J Alvarez 01 Jul 2013

Yes, the microlib released with ARMCC 5.03 contains the majority of the patches I developed for our mbed version, there is only one feature missing (proper stdio stream names) and before updating to the new library we have to think about a small workaround for it.

Cheers, Emilio

posted by Emilio Monti 01 Jul 2013