Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 6 months ago.
Does anyone been able to compile mbed-rtos in Code_Red Suite IDE?
Hi all,
I made a simple project "Hello World" with the mbed and mbed-rtos library which triggers two threads. On each one a LED is turn on and off after a few seconds. I exported the project to code_red suite and import it to LPCXpresso v5.2.2. Everything went well until I tried to compile the code, which gives me "../mbed-rtos/rtx/RTX_CM_lib.h:121:1: error: 'WORDS_STACK_SIZE' undeclared here (not in a function)" error. I already tried to define it locally but then it starts to give the following list of errors:
../mbed-rtos/rtx/rt_CMSIS.c:46:4: error: #error "Missing CORTEX_Mx definition" In file included from ../mbed-rtos/rtx/rt_CMSIS.c:60:0: ../mbed-rtos/rtx/rt_HAL_CM.h: In function 'rt_inc_qi': ../mbed-rtos/rtx/rt_HAL_CM.h:212:3: warning: implicit declaration of function 'disable_irq' [-Wimplicit-function-declaration] ../mbed-rtos/rtx/rt_HAL_CM.h:219:3: warning: implicit declaration of function 'enable_irq' [-Wimplicit-function-declaration] ../mbed-rtos/rtx/rt_CMSIS.c: In function 'svcKernelStart': ../mbed-rtos/rtx/rt_CMSIS.c:490:3: warning: implicit declaration of function 'set_PSP' [-Wimplicit-function-declaration] ../mbed-rtos/rtx/rt_CMSIS.c: In function 'osKernelInitialize': ../mbed-rtos/rtx/rt_CMSIS.c:509:3: warning: implicit declaration of function 'get_IPSR' [-Wimplicit-function-declaration] ../mbed-rtos/rtx/rt_CMSIS.c:510:3: warning: implicit declaration of function 'get_CONTROL' [-Wimplicit-function-declaration] ../mbed-rtos/rtx/rt_CMSIS.c: In function 'osKernelStart': ../mbed-rtos/rtx/rt_CMSIS.c:526:9: warning: implicit declaration of function 'set_CONTROL' [-Wimplicit-function-declaration] ../mbed-rtos/rtx/rt_CMSIS.c:530:7: warning: implicit declaration of function 'DSB' [-Wimplicit-function-declaration] ../mbed-rtos/rtx/rt_CMSIS.c:531:7: warning: implicit declaration of function 'ISB' [-Wimplicit-function-declaration] ../mbed-rtos/rtx/rt_CMSIS.c: At top level: ../mbed-rtos/rtx/rt_CMSIS.c:1000:1: error: unknown type name 'INLINE' ../mbed-rtos/rtx/rt_CMSIS.c:1000:26: error: expected '=', ',', ';', 'asm' or 'attribute' before 'isrMessagePut' ../mbed-rtos/rtx/rt_CMSIS.c: In function 'sysTimerTick': ../mbed-rtos/rtx/rt_CMSIS.c:1014:5: warning: implicit declaration of function 'isrMessagePut' [-Wimplicit-function-declaration] ../mbed-rtos/rtx/rt_CMSIS.c: At top level: ../mbed-rtos/rtx/rt_CMSIS.c:1164:1: error: unknown type name 'INLINE' ../mbed-rtos/rtx/rt_CMSIS.c:1164:25: error: expected '=', ',', ';', 'asm' or 'attribute' before 'isrSignalSet' ../mbed-rtos/rtx/rt_CMSIS.c: In function 'osSignalSet': ../mbed-rtos/rtx/rt_CMSIS.c:1186:5: warning: implicit declaration of function 'isrSignalSet' [-Wimplicit-function-declaration] ../mbed-rtos/rtx/rt_CMSIS.c: At top level: ../mbed-rtos/rtx/rt_CMSIS.c:1425:1: error: unknown type name 'INLINE' ../mbed-rtos/rtx/rt_CMSIS.c:1425:26: error: expected '=', ',', ';', 'asm' or 'attribute' before 'isrSemaphoreRelease' ../mbed-rtos/rtx/rt_CMSIS.c: In function 'osSemaphoreRelease': ../mbed-rtos/rtx/rt_CMSIS.c:1463:5: warning: implicit declaration of function 'isrSemaphoreRelease' [-Wimplicit-function-declaration] ../mbed-rtos/rtx/rt_CMSIS.c: At top level: ../mbed-rtos/rtx/rt_CMSIS.c:1663:1: error: unknown type name 'INLINE' ../mbed-rtos/rtx/rt_CMSIS.c:1663:26: error: expected '=', ',', ';', 'asm' or 'attribute' before 'isrMessagePut' ../mbed-rtos/rtx/rt_CMSIS.c:1681:1: error: unknown type name 'INLINE' ../mbed-rtos/rtx/rt_CMSIS.c:1681:35: error: expected '=', ',', ';', 'asm' or 'attribute' before 'isrMessageGet' ../mbed-rtos/rtx/rt_CMSIS.c: In function 'osMessageGet': ../mbed-rtos/rtx/rt_CMSIS.c:1733:5: warning: implicit declaration of function 'isrMessageGet' [-Wimplicit-function-declaration] ../mbed-rtos/rtx/rt_CMSIS.c:1733:5: error: incompatible types when returning type 'int' but 'osEvent' was expected ../mbed-rtos/rtx/rt_CMSIS.c:1737:1: warning: control reaches end of non-void function [-Wreturn-type] make: * [mbed-rtos/rtx/rt_CMSIS.o] Error 1
Do I need to configure something else in order to be able to compile the mbed-rtos library or it is a bug on the export to "Code_Red Suite" feature?
Best Regards, Hugo Rodrigues
I also tried to export the project to code_red suite and import it to LPCXpresso v4.3.0 and I get the following errors:
../mbed-rtos/rtos/Thread.h:42:32: error: 'WORDS_STACK_SIZE' was not declared in this scope ../main.cpp: In function 'int main()': ../main.cpp:139:22: error: the default argument for parameter 3 of 'rtos::Thread::Thread(void (*)(const void*), void*, osPriority, uint32_t, unsigned char*)' has not yet been parsed ../main.cpp:142:22: error: the default argument for parameter 3 of 'rtos::Thread::Thread(void (*)(const void*), void*, osPriority, uint32_t, unsigned char*)' has not yet been parsed make: * [main.o] Error 1
if I define WORDS_STACK_SIZE locally I get the same errors as before with LPCXpresso v5.2.2.
posted by Hugo Rodrigues 14 May 2013Same problem here while importing the demo. Compiles and runs in online editor.
posted by Gerald Poppinga 19 May 2013I'm getting the same 'WORDS_STACK_SIZE' error. How did you solve this in the end?
posted by Colin Harris 11 Feb 2015