AnsweredAssumed Answered

invalid character '#' when compiling

Question asked by Johannes Heupel on Feb 25, 2018
Latest reply on Feb 28, 2018 by Fall Guy

When trying to compile this simple code:

 

#include "mbed.h"

DigitalOut myled(LED1);
nt main() {
while(1) {
myled = 1;
wait(0.2);
myled = 0;
wait(0.2);
}
}

 

I get the following error:

d:/nxp/mcuxpressoide_10.1.1_606/ide/tools/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe:C:\Users\Johannes\Documents\MCUXpressoIDE_10.1.1_606\workspace\JCBTest1\mbed\TARGET_LPC1768\TOOLCHAIN_GCC_ARM\LPC1768.ld:2: ignoring invalid character `#' in expression
d:/nxp/mcuxpressoide_10.1.1_606/ide/tools/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe:C:\Users\Johannes\Documents\MCUXpressoIDE_10.1.1_606\workspace\JCBTest1\mbed\TARGET_LPC1768\TOOLCHAIN_GCC_ARM\LPC1768.ld:2: syntax error
collect2.exe: error: ld returned 1 exit status

 

Any ideas on why?

Outcomes