9 Replies Latest reply on May 12, 2016 11:04 AM by Intel Corporation

    Problem getting MCU app to work

    norm2782

      Hi all,

       

      I'm trying to get started with programming my MCU, but I seem to be unable to get even the following very simple program to work:

       

      #include "mcu_api.h"
      #include "mcu_errno.h"
      
      void mcu_main()
      {
          while (1)
          {
          int p = 0;
          double a = 0.0;
          double t = 0.0;
          debug_print(DBG_DEBUG, "Pressure = %i ; Altitude = %f ; Temperature = %f \n", p, a, t);
          mcu_sleep(10);
          }
      }
      

       

      To test whether this program works, I connect to the Edison using screen:

       

      ~ ❯❯❯ screen -L /dev/cu.usbserial-DA01LN4S 115200 –L

       

      On the Edison, I switch on debug-level logging:

       

      echo debug > /sys/devices/platform/intel_mcu/log_level

       

      Then I read the ttymcu1:

       

      cat /dev/ttymcu1

       

      However, I only get the following message:

       

      (50158000,DEBUG): ipc process succeed

       

      What I would expect is a long list of

       

      Pressure = 0 ; Altitude = 0.000000 ; Temperature = 0.000000

      Pressure = 0 ; Altitude = 0.000000 ; Temperature = 0.000000

      Pressure = 0 ; Altitude = 0.000000 ; Temperature = 0.000000

      Pressure = 0 ; Altitude = 0.000000 ; Temperature = 0.000000

      ...

       

      I'm running Poky (Yocto Project Reference Distro) 1.7.3 from the 3.0 board release with the 1.0.10 MCU SDK.

       

      What am I doing wrong?