11 years, 1 month ago.

Compiler problem when programming KL25Z

Hi;

I am trying to program my KL25Z board first time and i write a code for blinking the red led. I defined the led object like this. DigitalOut led(LED_RED); But compiler gives an error: "identifier "LED_GREEN" is undefined" in file "/main.cpp" What can be the reason of this error?what am i missing?

1 Answer

11 years, 1 month ago.

Hi Serhat,

The most probable cause for this is that you're trying to compile your KL25Z code with the target set to "mbed NXP LPC1768", if you look top right in the mbed Compiler you'll see a drop down box where you can select the target.

Why it's complaining about LED_GREEN when you're using LED_RED is bizarre, perhaps it's complaining about a different line.

Steve

Accepted Answer

Thanks for reply Stephen.

posted by Serhat AYSER 07 Mar 2013