3 Replies Latest reply on Oct 21, 2016 4:03 PM by VladimirAkopyan

    Use floating point in MCU- Intel Edison

    su_dev

      I'm trying to use a double variable in MCU code for intel edison.

      This works. The led blinks.

      #include "mcu_api.h"
      #include "mcu_errno.h"
      
      void mcu_main() {
          /* your configuration code starts here */
          //double res =0;
          gpio_setup(48, 1); /* set GPIO 48 as output */
          while (1) {
              gpio_write(48, 1);
              mcu_sleep(100); /* sleep 1 second */
              gpio_write(48, 0);
              mcu_sleep(100);
          }
      }
      
      

      but this does not.

      #include "mcu_api.h"
      #include "mcu_errno.h"
      
      void mcu_main() {
          /* your configuration code starts here */
          double res =0;
          gpio_setup(48, 1); /* set GPIO 48 as output */
          while (1) {
              gpio_write(48, 1);
              mcu_sleep(100); /* sleep 1 second */
              gpio_write(48, 0);
              mcu_sleep(100);
          }
      }
      
      

      it builds successfully. but does not run.

      what may be the reason?