8 years, 3 months ago.

mbed does not work after exporting to desktop

Hi all, I am doing development mbed code online for my NUCLEO-F446RE. The code is working great. But I am thinking to export everything to my desktop so I can modify and compile the code locally. I find any example (e.g. mbed_blinky) and export it with " Export to desktop IDE" as uVision4. I open the exported project and paste all my code there. I compile without any problem, but when I run it, it doesn't run as expected. I am not sure if it is because I am using uVision5 but the exported one is in uVision4?

Anyway, here is the code I am trying to verify.

#include "mbed.h"
 
 DigitalOut myled(LED1);
int main() 
{ 
  while (1) 
  {
	myled = !myled;
        wait(1);
  };
}

It is working great if I compile it online. But wait function doesn't work at all if I compile it locally.

1 Answer

8 years, 3 months ago.

Can you debug the code? It should work. I suspected some problems with floating point support, but you are using wait(1) which should not cause any trouble. If you find out more, please share.

Yes, I try all my best to find the reason but I still don't have idea what's wrong. I need to delay it with a nested loop instead.

posted by kim jone 03 Feb 2016