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.
10 years, 1 month ago.
Comilation error MBED-RTOS LPC1768 with IAR
Hi,
I try to compile RTOS library for LPC1768 with IAR and I have next error:
[Error] RTX_CM_lib.h@120: [Pe020]: identifier "WORDS_STACK_SIZE" is undefined [Error] RTX_CM_lib.h@120: [Pe028]: expression must have a constant value [Error] RTX_CM_lib.h@277: [Pe020]: identifier "HEAP_START" is undefined
I type next command from cmd line: python.exe workspace_tools/build.py -m LPC1768 -t IAR -r -o debug-info
How to fix this error?
Best regards Milan Stevanovic
Question relating to:
1 Answer
10 years, 1 month ago.
Hello,
RTOS in mbed does not support IAR. only ARM GCC and ARMCC is supported currently. you can add IAR support, use github https://github.com/mbedmicro/mbed
Regards,
0xc0170
Hi,
I am using githhub https://github.com/mbedmicro/mbed and I try with next command to build mbed with rtos and IAR: python.exe workspace_tools/build.py -m LPC1768 -t IAR -r -o debug-info
but, I have these errors because WORDS_STACK_SIZE and HEAP_START is not defined.
I can add these defines but I am not sure aboute values.
Thanks a lot Best regards Mila Stevanovic
posted by 08 Oct 2014Each core has own HAL and SVC Table. This 2 assembly files should be added for IAR. look at rtos/rtx/TARGET_M0/
posted by 08 Oct 2014Hi Martin,
Thanks a lot for your answer. I added these two files to support RTOS with IAR. But, my main problem is to find HEAP_START. There is GNUC example (different for other compiler): extern unsigned char end[];
- define HEAP_START (end)
But how to do this with IAR? Can you provide me some help?
Thanks a lot Best regards Milan
posted by 10 Oct 2014You can find those 2 files (for IAR) as part of RTX . I assume it might be available online through KEIL webpages.
I found them in Keil for example, downloaded through Package manager (in Keil v5)
posted by 10 Oct 2014Hi Martin,
Yes your are right. I used these two files and this is not a problem. I found the solution for this in IAR documentation. I need to update code with next for HEAP_START:
- pragma section = "HEAP"
section_begin("HEAP"); thsi command return value for HEAP_START
Also, I need to add set_main_stack(); in section for ICCARM
After that everythings works fine
Thnaks a lot
posted by 10 Oct 2014