AnsweredAssumed Answered

How to use C++ in SDK 2.0 Project

Question asked by Ivan Antunović on Mar 19, 2017
Latest reply on Mar 22, 2017 by Ivan Antunović

Hello guys, I've just started using Kinetis SDK.

I downloaded SDK_2.1_FRDM-KL25Z folder from kex.nxp.com

 

I created a new project using

File -> Kinetis SDK 2.x Project

 

However while creating project I was never asked what compiler should be used nor is it  C or C++ project.

 

In the source folder there is a following code:

[code]

#include <string.h>

 

#include "board.h"
#include "pin_mux.h"
#include "clock_config.h"
/*#include "fsl_debug_console.h"*/

 

/* FreeRTOS kernel includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "timers.h"

 


/* Task priorities. */
#define hello_task_PRIORITY (configMAX_PRIORITIES - 1)

 

/*!
 * @brief Task responsible for printing of "Hello world." message.
 */
static void hello_task(void *pvParameters) {
  for (;;) {
    /*PRINTF("Hello world.\r\n");*/
    /* Add your code here */
    vTaskSuspend(NULL);
  }
}

 

/*!
 * @brief Application entry point.
 */
int main(void) {
  /* Init board hardware. */
  BOARD_InitPins();
  BOARD_BootClockRUN();
  BOARD_InitDebugConsole();

 

  /* Add your code here */

 

  /* Create RTOS task */
  xTaskCreate(hello_task, "Hello_task", configMINIMAL_STACK_SIZE, NULL, hello_task_PRIORITY, NULL);
  vTaskStartScheduler();

 

  for(;;) { /* Infinite loop to avoid leaving the main function */
    __asm("NOP"); /* something to use as a breakpoint stop while looping */
  }
}

 

[/code]

 

After trying the build the project from

Project -> Build all I get the following error (in the picture attached)

Also If I try to run the program it says that 'Binary could not be found'

 

I am really not familiar with eclipse so if someone could help me I am stuck with googleing whole day this problem.

 

Big thanks!

Outcomes