10 years, 4 months ago.

mbed-RTOS export to LPCXpresso - Release Build Error

When I export the basic mbed-rtos example to LPCXpresso (LPCXpresso v7.2.0 [Build 153] [2014-05-19], LPC1768), and try to compile and run, Debug-build runs fine, however, Release-Build produces following error message :

In file included from ../mbed-rtos/rtx/RTX_Conf_CM.c:262:0: ../mbed-rtos/rtx/RTX_CM_lib.h:34:19: fatal error: error.h: No such file or directory

  1. include "error.h" ^ compilation terminated. make: * [mbed-rtos/rtx/RTX_Conf_CM.o] Error 1

Here is my code:

rtos_basic

#include "mbed.h"
#include "rtos.h"
 
DigitalOut led1(LED1);
DigitalOut led2(LED2);
 
void led2_thread(void const *args) {
    while (true) {
        led2 = !led2;
        Thread::wait(1000);
    }
}
 
int main() 
{
    Thread thread(led2_thread);
    
    while (true) 
    {
        led1 = !led1;
        Thread::wait(300);
    }
} 

Anybody any idea what might cause this? Thanks a lot!

What are versions of libraries? mbed and RTOS? Please always share revision with us.

posted by Martin Kojtal 24 Jul 2014

mbed revision: 86:04dd9b1680ae mbed-rtos revision: 38:ff95651f53c7

posted by Martin Heine 24 Jul 2014

See answer

posted by Martin Kojtal 25 Jul 2014

1 Answer

10 years, 4 months ago.

Hello,

same version as reported above in the comment, built in LPCXpresso for LPC1768. I just added new example, checked versions if they are the newest and exported.

I can't reproduce the problem.. You can publish the example so we will just add it to the compiler, export and build.

Regards,
0xc0170

Weird. I just tried it again. In Debug-Build, everything runs fine:

Performing post-build steps arm-none-eabi-size "rtos_basic.axf"; arm-none-eabi-objcopy -O binary "rtos_basic.axf" "rtos_basic.bin" ; # checksum -p LPC1768 -d "rtos_basic.bin"; text data bss dec hex filename 40820 2348 3568 46736 b690 rtos_basic.axf 12:44:55 Build Finished (took 262ms)

Then I choose 'Release-Build' and get the error:

12:49:00 Incremental Build of configuration Release for project rtos_basic make all Building file: ../mbed-rtos/rtx/RTX_Conf_CM.c Invoking: MCU C Compiler arm-none-eabi-gcc -DNEWLIB -DCODE_RED -DCPP_USE_HEAP -DTARGET_LPC1768 -DTARGET_M3 -DTARGET_NXP -DTARGET_LPC176X -DTARGET_MBED_LPC1768 -DTOOLCHAIN_GCC_CR -DTOOLCHAIN_GCC -DCORTEX_M3 -DARM_MATH_CM3 -DMBED_BUILD_TIMESTAMP=1406284806.47 -DMBED=1 -Os -Os -g -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -fno-exceptions -mcpu=cortex-m3 -mthumb -DNEWLIB -MMD -MP -MF"mbed-rtos/rtx/RTX_Conf_CM.d" -MT"mbed-rtos/rtx/RTX_Conf_CM.d" -o "mbed-rtos/rtx/RTX_Conf_CM.o" "../mbed-rtos/rtx/RTX_Conf_CM.c" In file included from ../mbed-rtos/rtx/RTX_Conf_CM.c:268:0: ../mbed-rtos/rtx/RTX_CM_lib.h:34:19: fatal error: error.h: No such file or directory

  1. include "error.h" ^ compilation terminated. make: * [mbed-rtos/rtx/RTX_Conf_CM.o] Error 1

12:49:00 Build Finished (took 58ms)

I found another post in the Eclipse Community, reporting the same problem: http://www.eclipse.org/forums/index.php/t/781430/

posted by Martin Heine 25 Jul 2014

I forgot to swtich to Release ! I can reproduce it here,

Release target is not defined as Debug is. Compare include paths (Debug/Release).

This is a bug which you can report on github for example and we will fix it ;) Thanks for reporting !

posted by Martin Kojtal 25 Jul 2014