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.

     

     

    Arduino IDE Compilation Error

    Spresense
    2
    4
    444
    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.
    • U
      UoGTFranklin 0 1 1 1 last edited by

      Hello,

      I have an example code from Adafruit for an OLED display which is originally intended for Arduino UNO. When I compile in the Arduino IDE for the UNO, the code compiles correctly. However when I compile the same code for the Spresense I get a compilation error:

      *Arduino: 1.8.16 (Windows 10), Board: "Spresense, MainCore, 768 KB (Default), Disabled, 115200"

      In file included from C:\Users\TOMFRA~1\AppData\Local\Temp\arduino_modified_sketch_537912\BreakoutSSD1331.ino:12:

      C:\Users\tomfranklin\Documents\Arduino\libraries\SdFat_-_Adafruit_Fork\src/SdFat.h:59:32: error: 'SS' was not declared in this scope

      59 | bool begin(SdCsPin_t csPin = SS) {

      exit status 1*

      Is anyone aware of a reason why the Spresense compiler error would throw an error like this if the code compiles correctly for the UNO?

      Thanks

      D 1 Reply Last reply Reply Quote
      • D
        dshilov 1 1 @UoGTFranklin 0 1 1 1 last edited by

        @UoGTFranklin-0-1-1-1 said in Arduino IDE Compilation Error:

        BreakoutSSD1331

        Looking at the sketch you used as it is posted on GitHub, it utilizes Adafruit libraries for a lot of hardware setup. While compatible with Arduino Uno, Adafruit libraries likely aren't compatible with Spresense Arduino development.

        U 1 Reply Last reply Reply Quote
        • U
          UoGTFranklin 0 1 1 1 @dshilov 1 1 last edited by

          @dshilov-1-1 Hi, thanks for your feedback. Are you able to advise specifically which parts of the libraries aren't compatible and if there is a way that I can handle this?

          Thanks

          D 1 Reply Last reply Reply Quote
          • D
            dshilov 1 1 @UoGTFranklin 0 1 1 1 last edited by

            @UoGTFranklin-0-1-1-1 You can define the SS pin before including the SdFat library. You can define the SS pin as a constant, for example:

            const uint8_t SS = 46;
            

            The SS pin number to the chip select pin of the SD card on the Spresence board is pin 46.

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