Sony's Developer World forum

    • Home
    • Forum guidelines

    Upcoming maintenance 

     

    Dear Customers and Partners.

    This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.

    This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.

    We apologize for any inconvenience.

     

     

    audio scope

    Spresense
    2
    2
    2861
    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.
    • J
      JCPStevens last edited by

      Always when i try to run the code of the Audio Scope sample project i get those weared error messages like this:

      In file included from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\libraries\TFT\src\utility\Adafruit_GFX.cpp:35:0:

      C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\libraries\TFT\src\utility\glcdfont.c:3:20: fatal error: avr/io.h: No such file or directory

      When i try to solve those problems by installing libraries, then the next error shows up.
      I tried to clean up the library folder by deleting it and reinstall the required libraries step for step but every time the same errors show up.
      I tried to install the libraries manually, semi-automatic and automatic with the sketch manager.
      I have installed the next libraries:

      Adafruit-ST7735-Library-master
      Adafruit-GFX-Library-master
      TFT-spresense-st7735

      But what i try it doesn't work.
      Every time I add a Library I get a new error message and when i delete it too.
      I did the git command, and then my computer says the folder is already installed and the files too.
      What am i doing wrong?
      Can you help me?

      A desperate Marc!

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

        Hi @JCPStevens ,

        Ok, let's sort this out once for all.

        I did the following on a Ubuntu machine to get this to work:

        git clone --recursive git@github.com:TE-KarlKomierowski/hackster_projects.git
        
        

        After that I opened Arduino IDE and from the Sketch menu I took Include library->Add .ZIP library
        In the file browser I selected the folder in the git repo as follows:

        ~/hackster_projects/spresense-audio-scope/arduino-lib
        I selected TFT folder and clicked OK

        I then opened arduino-scope-ino in the Arduino IDE and pressed the button Verify to build the sketch.

        This failed. It turns out that the TFT library defines a macro that is named swap and this is later being used in other libraries which confuses the build system.

        The quickes way to get around this for me was to simply add the following on line 7 to the arduino-scope.ino sketch:

        #undef swap
        

        The undef part must be between the include <TFT> and include <Audio.h>

        #include <TFT.h> /* Include TFT.h first, then Audio.h to avoid __SD_H__ being defined in the Audio.h. */
        #undef swap
        #include <Audio.h>
        

        After doing this I can build the sketch.
        I have been using a Ubuntu PC with Arduino IDE version 1.8.9.

        I have built for target Spresense.

        Hope that this will work for you too.
        If you run into problems, please past your errorlog into your post and I will try to help out.

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