This example is compiled with the C++ compiler options. It does driver and board initialization and prints the string, Hello World! on UART console.
Parameter | Value |
---|---|
CPU + OS | r5fss0-0 nortos |
r5fss0-0 freertos | |
Toolchain | ti-arm-clang |
Boards | am263x-cc, am263x-lp |
Example folder | examples/hello_world_cpp |
Shown below is a sample output when the application is run,
In this example the "hello_world.cpp" and "main.cpp" files are built with the c++ compiler flags. The example will link with the prebuilt mcu sdk libs.
Below are the flags used for the files to build with c++ flags along with the other flags used for c files.
The pre built libs provided in mcu sdk are built with the C flags. However the application can re build the libs using the C++ flags. The application needs to pass the below additional flag for the make commands used for building libs
note: Before re building the libs you need to clean all the pre built libs.
Hello world cpp example is provided as referance to building application using c++ flags. If you want to build the application using the c++ flags please refer the makefile In the makefile the files with extn .cpp are compiled with the c++ flags and files with .c extn are compiled with c flags.