11 years ago.

Exporting Mbed to Lpcxpresso Ide, debug build ->OK, release build ->Error

Hi there, since I'm trying to debug my mbed application I've tried the plug&play exportation procedure from Mbed to CodeRed Ide (LpcXpresso IDE). For my example here, I chose the mbed_blinky example embedding the mbed-src source library.

In LpcXpresso_IDE the "debug configuration" can be built without problems, whereas If I try to switch the "active" configuration from "Debug" to "Release" I get this error:

../mbed-src/targets/hal/TARGET_NXP/TARGET_LPC176X/analogin_api.c:16:26: fatal error: analogin_api.h: No such file or directory compilation terminated. make: * [mbed-src/targets/hal/TARGET_NXP/TARGET_LPC176X/analogin_api.o] Error 1

- As Kevin (from http://www.rescuerobot.org/drupal/content/transfering-mbed-projects-lpcxpresso#comment-7) made me notice, there is no include path for C compiler with "release" configuration, so I tried to paste the include path from the C++ to C Compiler... then I got these errors:

/usr/local/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/bin/ld: cannot find -lmbed /usr/local/lpcxpresso_6.1.2_177/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/bin/ld: cannot find -lcapi collect2: ld returned 1 exit status make: * [mbed_blinky.axf] Error 1

I would be grateful if anyone could help me solve this problem...

3 Answers

10 years, 2 months ago.

What I do in this situation is delete the release configuration in the project settings created by the mbed export. I then create a new configuration by copying the debug settings and renaming the new configuration as release. I then edit the Optimization and Debugging settings (and sometimes the Dialect settings) for each compiler to reflect a release build. They may be other setting you want to try.

Accepted Answer
10 years, 2 months ago.

I'm having the same problem, any idea?

10 years, 2 months ago.

I don't think the mbed library currently has a special debug/release build (although I do believe it is planned, so you can disable all the asserts in the current code), so a release build should be equal to a debug build.

It is always included in the regular mbed build. If you use the mbed-src build, either change this file: http://developer.mbed.org/users/mbed_official/code/mbed-src/file/098575c6d2c8/api/mbed_assert.h, or make sure NDEBUG is defined.

posted by Erik - 03 Oct 2014