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.

     

     

    Auduino Compiling error : stdio.h

    Spresense
    3
    6
    6061
    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.
    • P
      pnj42 last edited by pnj42

      I am trying to run some example code for an NXP sensor on spresense, it will compile for a Arduino board with out erros, but when I try for Sprensence I get the following error:

      *\AppData\Local\Arduino15\packages\SPRESENSE\tools\spresense-sdk\1.0.0/spresense/release/nuttx/include/stdio.h:93:22: error: expected unqualified-id before 'void'

      #define rewind(s) ((void)fseek((s),0,SEEK_SET))

                      ^
      

      Any comments please of this if is an error in my code or and issue with the stdio.h file?

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

        Hi @pnj

        It would help a lot if you could provide the code/sketch you are trying to build.
        Also, what sensor are you using? What libraries?

        BR
        Karl

        I tried the following code just to see if using the rewind macro would generate any error and it didn't:
        Using SDK 2.0.2

        void setup() {
          // put your setup code here, to run once:
        /* This code is just to test the build for errors. */
          FILE *fp = NULL;
          rewind(fp);
          
        }
        
        void loop() {
          // put your main code here, to run repeatedly:
        
        }
        
        ####################################
        ## Used memory size:  768 [KByte] ##
        ####################################
        Sketch uses 159444 bytes (20%) of program storage space. Maximum is 786432 bytes.
        Global variables use 159444 bytes (20%) of dynamic memory, leaving 626988 bytes for local variables. Maximum is 786432 bytes.
        

        @pnj said in Auduino Compiling error : stdio.h:

        some example

        P 1 Reply Last reply Reply Quote
        • P
          pnj42 @TE-KarlKomierowski last edited by

          @TE-KarlKomierowski Thank your reply. The senor is https://learn.adafruit.com/nxp-precision-9dof-breakout/overview, and I can run the basic application supplied for this board. However I am now trying to run the AHS code, and have start with the function "Adafruit_Sensor_Calibration.h". which is where I get this error.

          1 Reply Last reply Reply Quote
          • P
            pnj42 last edited by

            I am trying to get a compass heading, or at least the heading in degrees.

            K 1 Reply Last reply Reply Quote
            • K
              KamilTomaszewski DeveloperWorld @pnj42 last edited by

              @pnj Please comment line 25:

              // #include <stdio.h>
              

              in file: *\AppData\Local\Arduino15\packages\SPRESENSE\hardware\spresense<version>\cores\spresense\Print.h
              and add:

              #include <stdio.h>
              

              to file: *\AppData\Local\Arduino15\packages\SPRESENSE\hardware\spresense<version>\cores\spresense\main.cpp

              Let me know if it helped.

              1 Reply Last reply Reply Quote
              • P
                pnj42 last edited by

                Sorry, has taken me time to get back to this problem, once I make the suggested change the error I got previously no longer appears when I compile the code. I now get other issues but that appears to be due to board differences.

                Thank you

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