Sony's Developer World forum

    • Home
    • Forum guidelines

    Unable to compile with Arduino FastLED library

    Spresense
    2
    3
    2041
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      thedubdude last edited by

      I'm attempting to use the FastLED library with the Spresense. I added the #include "FastLED.h" to the
      "File → Examples → MultiCore MP → Boot → Main" program as follows:


      #include <MP.h>
      #include "FastLED.h"

      void setup()
      {
      int ret = 0;
      int subid;

      Serial.begin(115200);
      while (!Serial);

      /* Boot SubCore */
      for (subid = 1; subid <= 4; subid++) {
      ret = MP.begin(subid);
      if (ret < 0) {
      MPLog("MP.begin(%d) error = %d\n", subid, ret);
      }
      }
      }

      void loop()
      {
      MPLog("loop\n");
      delay(1000);
      }


      The FastLED.h library is installed and compiles on my Arduino Uno. When I try and compile with the Spresense I get the following fatal error which I don't know how to resolve :


      In file included from C:\Users\Don Wile\Documents\Arduino\libraries\arduino_624712/led_sysdefs.h:34:0,

                   from C:\Users\Don Wile\Documents\Arduino\libraries\arduino_624712/FastLED.h:41,
      
                   from C:\Users\DONWIL~1\AppData\Local\Temp\arduino_modified_sketch_625659\Main.ino:21:
      

      C:\Users\Don Wile\Documents\Arduino\libraries\arduino_624712/platforms/avr/led_sysdefs_avr.h:12:20: fatal error: avr/io.h: No such file or directory

      compilation terminated.

      exit status 1
      Error compiling for board Spresense.


      Your help is most appreciated. Thanks.

      1 Reply Last reply Reply Quote
      • TE-KarlKomierowski
        TE-KarlKomierowski DeveloperWorld last edited by

        Hi @thedubdude

        I installed the FastLED library from through the Arduino IDE . The FastLED lib seem to have very architecture and environment dependent code that has not been ported to Spresense/Nuttx.

        So you, or somebody, will have to port it before it will build for Spresense.

        Br Karl

        T 1 Reply Last reply Reply Quote
        • T
          thedubdude @TE-KarlKomierowski last edited by

          @TE-KarlKomierowski

          That's too bad. The FastLED library is used by many Arduino users, including myself. That it doesn't work with the Spresense is a show stopper for me. I'm not skilled enough to try and port it to the Spresense. Thanks for your help.

          1 Reply Last reply Reply Quote
          • First post
            Last post
          Developer World
          Copyright © 2021 Sony Group Corporation. All rights reserved.
          • Contact us
          • Legal