This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C++ project with RTX for Cortex-M4

Hi,
I'm having a play with creating a project using C++ for the LPC4078 Cortex M4 using RTX.
I can happily create, compile and run a C++ project or a C RTX project; but not the combination.

My minimal project consists of:

main.cpp

#include <RTL.h>
int main()
{
    SCB->VTOR  = 0x00010000;
}

I get an SCB undefined error.
I can see that SCB is defined in core_cm3.h which I would have expected to be included automatically (somehow).

My project settings are fairly empty: I have Operating system: RTX Kernel, and C99 Mode selected which I presume affects only C files.

Where am I going wrong?
Thanks in advance.

Parents
  • core_cm3.h is not included by default. Since you are running on a Cortem-M4 you would not want that included anyway. You would want to include the proper cm4.h file. This file is usually included as part of you device a specific include file. You should be able to find the correct include file in your projects that work.

Reply
  • core_cm3.h is not included by default. Since you are running on a Cortem-M4 you would not want that included anyway. You would want to include the proper cm4.h file. This file is usually included as part of you device a specific include file. You should be able to find the correct include file in your projects that work.

Children