SD support compilation errors

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mackowiakp
Normal user
Posts: 220
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

SD support compilation errors

#1 Post by mackowiakp » 16 Nov 2019, 12:04

mega-20191116 - Which one library have to be added for proper support of SD card? I try #ID: 868 but I got only log list of errors during compiling.

Code: Select all

[maciek@Piotr source]$ platformio lib search "header:SD.h"
Found 5 libraries:

SD
==
#ID: 161
This library aims to expose a subset of SD card functionality in the form of a higher level 'wrapper' object

Keywords: sd, card, file, system
Compatible frameworks: Arduino
Compatible platforms: Atmel AVR
Authors: Adafruit Industries

SD
==
#ID: 868
Enables reading and writing on SD cards.

Keywords: storage, data
Compatible frameworks: Arduino
Compatible platforms: Atmel AVR, Atmel SAM, Espressif 32, Espressif 8266, GigaDevice GD32V, Infineon XMC, Intel ARC32, Kendryte K210, Microchip PIC32, Nordic nRF51, Nordic nRF52, ST STM32, ST STM8, Teensy, TI MSP430
Authors: Arduino, SparkFun

SD
==
#ID: 79
This library aims to expose a subset of SD card functionality in the form of a higher level 'wrapper' object (adaptation for LaunchPad LM4F120 / TM4C123)

Keywords: sd, card, file, system
Compatible frameworks: Energia
Compatible platforms: TI MSP430, TI TIVA
Authors: Rei Vilo, William Greiman, SparkFun Electronics

SD
==
#ID: 5210
SD

Keywords: sd
Compatible frameworks: mbed
Compatible platforms: Atmel SAM, Freescale Kinetis, Maxim Integrated MAX32, Nordic nRF51, Nordic nRF52, NXP LPC, Silicon Labs EFM32, ST STM32, Teensy, WIZNet W7500
Authors: Jackson Lv

DstikeUpdater
=============
#ID: 6584
ESP32 OLED SD Updater Library for DSTIKE Boards

Keywords: esp32, dstike, update, sd, oled
Compatible frameworks: Arduino
Compatible platforms: Espressif 32
Authors: Stefan Kremser,  Spacehuhn

TD-er
Core team member
Posts: 1922
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SD support compilation errors

#2 Post by TD-er » 16 Nov 2019, 13:17


mackowiakp
Normal user
Posts: 220
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: SD support compilation errors

#3 Post by mackowiakp » 25 Nov 2019, 07:18

Still can not compile (mega-20191123, Custom.h). Error during linking:

Code: Select all

Linking .pio/build/custom_sdk3_ESP8266_4M1M/firmware.elf
/home/maciek/back/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: address 0x3fffc448 of .pio/build/custom_sdk3_ESP8266_4M1M/firmware.elf section `.bss' is not within region `dram0_0_seg'
/home/maciek/back/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: address 0x3fffc448 of .pio/build/custom_sdk3_ESP8266_4M1M/firmware.elf section `.bss' is not within region `dram0_0_seg'
collect2: error: ld returned 1 exit status
*** [.pio/build/custom_sdk3_ESP8266_4M1M/firmware.elf] Error 1
Any idea?

TD-er
Core team member
Posts: 1922
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SD support compilation errors

#4 Post by TD-er » 25 Nov 2019, 08:26

Do you compile using the beta core? (stage branch of esp8266/Arduino)

mackowiakp
Normal user
Posts: 220
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: SD support compilation errors

#5 Post by mackowiakp » 25 Nov 2019, 10:15

Now I just take all files from git source "as is". No Custom.h, normal, default SDK. No my changes except uncomment "#define FEATURE_SD: in default "define_plugin_sets.h" file.

Then from VS terminal run:

Code: Select all

[maciek@Piotr ESPEasy-mega-20191123]$ pio lib install "SD"
Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/custom_ESP8266_4M1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/custom_sdk3_ESP8266_4M1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/custom_beta_ESP8266_4M1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/custom_ESP8266_4M2M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/normal_ESP8266_1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/normal_sdk3_ESP8266_1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/normal_ESP8266_1M_VCC
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/normal_ESP8285_1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/normal_WROOM02_2M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/normal_WROOM02_2M256
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/normal_ESP8266_4M1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/normal_ESP8266_16M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/minimal_core_242_ESP8266_1M_OTA
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/minimal_core_242_ESP8285_1M_OTA
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/minimal_core_261_ESP8266_1M_OTA
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/minimal_core_261_ESP8285_1M_OTA
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/minimal_core_261_sdk3_ESP8266_1M_OTA
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/minimal_core_261_sdk3_ESP8285_1M_OTA
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/minimal_IRext_ESP8266_1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/minimal_IRext_ESP8266_4M1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/minimal_IRext_ESP8266_4M2M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/normal_IRext_no_rx_ESP8266_4M2M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/test_ESP8266_4M_VCC
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/test_beta_ESP8266_4M1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/test_beta_ESP8266_16M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/dev_ESP8266_4M1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/hard_SONOFF_POW_4M1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/hard_other_POW_ESP8285_1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/hard_Shelly_1_2M256
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/hard_Ventus_W266
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/custom_ESP32_4M316k
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/test_ESP32_4M316k
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/test_ESP32-wrover-kit_4M316k
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/spec_debug_custom_ESP8266_4M1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/spec_debug_beta_custom_ESP8266_4M1M
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/spec_debug_custom_ESP32_4M316k
LibraryManager: Installing id=161
SD @ 041f788250 is already installed

Library Storage: /home/maciek/TMP/ESPEasy-mega-20191123/.pio/libdeps/spec_memanalyze_ESP8266
LibraryManager: Installing id=161
SD @ 041f788250 is already installed
And this is result of compilation. Only SD lib errors.

Code: Select all

> Executing task: platformio run --environment normal_ESP8266_4M1M <

Processing normal_ESP8266_4M1M (platform: https://github.com/Jason2866/platform-espressif8266.git#core_2_6_1; board: esp12e; framework: arduino)
---------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CPPDEFINES: [['BUILD_GIT', '""'], 'NDEBUG', 'VTABLES_IN_FLASH', 'PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH', ['PUYA_SUPPORT', '1'], 'CORE_POST_2_5_0', 'BEARSSL_SSL_BASIC', 'CORE_POST_2_6_0', 'PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703', ['MQTT_MAX_PACKET_SIZE', '1024'], ['HTTPCLIENT_1_1_COMPATIBLE', '0'], 'USE_CUSTOM_H']
LINKFLAGS: -Wl,-Tesp8266.flash.4m1m.ld
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 2.2.4 #043f5fd > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 80MHz, 80KB RAM, 1019.98KB Flash
PACKAGES: toolchain-xtensa 2.50400.170719 (5.4.0), framework-arduinoespressif8266 2.20601.0 (2.6.1), tool-esptool 1.413.0 (4.13), tool-esptoolpy 1.20800.0 (2.8.0)
Converting ESPEasy.ino
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 59 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESPeasySerial> 1.0.13 #7ddbf6c
|-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <I2Cdevlib-Core>
|   |-- <Wire> 1.0
|-- <SD>
|   |-- <SPI> 1.0
|-- <SPI> 1.0
|-- <Servo(esp8266)> 1.0.2
|-- <Wire> 1.0
|-- <AS_BH1750>
|   |-- <Wire> 1.0
|-- <Adafruit SGP30 Sensor> 1.0.2
|   |-- <Wire> 1.0
|-- <Adafruit TCS34725> 1.0.1
|   |-- <Wire> 1.0
|-- <Adafruit TSL2591 Library> 1.0.2
|   |-- <Adafruit Unified Sensor> 1.0.2
|   |-- <Wire> 1.0
|-- <ESP8266_SSD1306> 3.2.7
|   |-- <Wire> 1.0
|   |-- <SPI> 1.0
|-- <ccronexpr>
|-- <AM2320>
|   |-- <Wire> 1.0
|-- <Adafruit MPR121> 1.0.0
|   |-- <Wire> 1.0
|-- <Adafruit Motor Shield V2 Library> 1.0.4
|   |-- <Wire> 1.0
|-- <Adafruit NeoPixel> 1.0.6
|-- <Adafruit Unified Sensor> 1.0.2
|-- <ArduinoJson> 6.11.0
|-- <Blynk> 0.6.1
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266HTTPClient> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <HLW8012> 1.1.1
|-- <CHT16K33 LED Matrix Library> 0.0.1
|   |-- <Wire> 1.0
|-- <LiquidCrystal_I2C>
|   |-- <Wire> 1.0
|-- <NewPingESP8266>
|-- <MechInputs> 0.0.1
|-- <SDM> 2.0.0
|   |-- <ESPeasySerial> 1.0.13 #7ddbf6c
|-- <SparkFun APDS9960 RGB and Gesture Sensor> 1.4.2
|   |-- <Wire> 1.0
|-- <TinyGPSPlus> 1.0.2
|-- <SerialSensors> 0.0.1
|   |-- <ESPeasySerial> 1.0.13 #7ddbf6c
|-- <RN2xx3 Arduino Library> 1.0.1
|-- <ESP8266WebServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <PubSubClient> 2.7
|-- <ArduinoOTA> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266mDNS> 1.2
|   |   |-- <ESP8266WiFi> 1.0
|-- <ESP8266HTTPUpdateServer> 1.0
|   |-- <ESP8266WebServer> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WiFi> 1.0
Building in release mode
Compiling .pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/File.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/SD.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/utility/Sd2Card.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/utility/SdFile.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/utility/SdVolume.cpp.o
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:26:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp:20:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
 #error Architecture or board not supported.
  ^
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:26:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdVolume.cpp:20:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
 #error Architecture or board not supported.
  ^
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:26:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/SD.h:25,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/File.cpp:15:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
 #error Architecture or board not supported.
  ^
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdVolume.cpp:20:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
 uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
 uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
 uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
 uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:26:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/SD.h:25,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/SD.cpp:53:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
 #error Architecture or board not supported.
  ^
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:26:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:26:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
 #error Architecture or board not supported.
  ^
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp:20:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
 uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
 uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
 uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
 uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
Compiling .pio/build/normal_ESP8266_4M1M/libe03/esp8266-oled-ssd1306/OLEDDisplayUi.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libaf8/ccronexpr/ccronexpr.c.o
Compiling .pio/build/normal_ESP8266_4M1M/lib241/AM2320/AM2320.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb08/Adafruit_MPR121/Adafruit_MPR121.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/lib317/Adafruit_Motor_Shield_V2/Adafruit_MotorShield.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/lib317/Adafruit_Motor_Shield_V2/utility/Adafruit_MS_PWMServoDriver.cpp.o
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/SD.h:25,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/SD.cpp:53:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
 uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
 uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
 uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
 uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
Compiling .pio/build/normal_ESP8266_4M1M/libf92/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp.o
*** [.pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/utility/SdVolume.cpp.o] Error 1
*** [.pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/SD.cpp.o] Error 1
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:26:0:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
 uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
 uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
 uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
 uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp: In member function 'uint8_t Sd2Card::init(uint8_t, uint8_t, int8_t, int8_t, int8_t)':
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:302:17: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
     clkport     = portOutputRegister(digitalPinToPort(clockPin_));
                 ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:304:17: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
     mosiport    = portOutputRegister(digitalPinToPort(mosiPin_));
                 ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:306:17: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
     misoport    = portInputRegister(digitalPinToPort(misoPin_));
                 ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp: In member function 'uint8_t Sd2Card::readData(uint32_t, uint16_t, uint16_t, uint8_t*)':
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:438:12: warning: unused variable 'n' [-Wunused-variable]
   uint16_t n;
            ^
*** [.pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/utility/Sd2Card.cpp.o] Error 1
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/SD.h:25,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/File.cpp:15:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
 uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
 uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
 uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
 uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
*** [.pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/File.cpp.o] Error 1
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp: In static member function 'static uint8_t SdFile::make83Name(const char*, uint8_t*)':
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp:261:15: warning: unused variable 'b' [-Wunused-variable]
       uint8_t b;
               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp: In member function 'uint8_t SdFile::rmRfStar()':
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp:907:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (curPosition_ != (32*(index + 1))) {
                                        ^
*** [.pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/utility/SdFile.cpp.o] Error 1
============================================ [FAILED] Took 2.90 seconds ============================================

Environment                           Status    Duration
------------------------------------  --------  ------------
custom_ESP8266_4M1M                   IGNORED
custom_sdk3_ESP8266_4M1M              IGNORED
custom_beta_ESP8266_4M1M              IGNORED
custom_ESP8266_4M2M                   IGNORED
normal_ESP8266_1M                     IGNORED
normal_sdk3_ESP8266_1M                IGNORED
normal_ESP8266_1M_VCC                 IGNORED
normal_ESP8285_1M                     IGNORED
normal_WROOM02_2M                     IGNORED
normal_WROOM02_2M256                  IGNORED
normal_ESP8266_4M1M                   FAILED    00:00:02.904
normal_ESP8266_16M                    IGNORED
minimal_core_242_ESP8266_1M_OTA       IGNORED
minimal_core_242_ESP8285_1M_OTA       IGNORED
minimal_core_261_ESP8266_1M_OTA       IGNORED
minimal_core_261_ESP8285_1M_OTA       IGNORED
minimal_core_261_sdk3_ESP8266_1M_OTA  IGNORED
minimal_core_261_sdk3_ESP8285_1M_OTA  IGNORED
minimal_IRext_ESP8266_1M              IGNORED
minimal_IRext_ESP8266_4M1M            IGNORED
minimal_IRext_ESP8266_4M2M            IGNORED
normal_IRext_no_rx_ESP8266_4M2M       IGNORED
test_ESP8266_4M_VCC                   IGNORED
test_beta_ESP8266_4M1M                IGNORED
test_beta_ESP8266_16M                 IGNORED
dev_ESP8266_4M1M                      IGNORED
hard_SONOFF_POW_4M1M                  IGNORED
hard_other_POW_ESP8285_1M             IGNORED
hard_Shelly_1_2M256                   IGNORED
hard_Ventus_W266                      IGNORED
custom_ESP32_4M316k                   IGNORED
test_ESP32_4M316k                     IGNORED
test_ESP32-wrover-kit_4M316k          IGNORED
spec_debug_custom_ESP8266_4M1M        IGNORED
spec_debug_beta_custom_ESP8266_4M1M   IGNORED
spec_debug_custom_ESP32_4M316k        IGNORED
spec_memanalyze_ESP8266               IGNORED
======================================= 1 failed, 0 succeeded in 00:00:02.904 =======================================
The terminal process terminated with exit code: 1

TD-er
Core team member
Posts: 1922
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SD support compilation errors

#6 Post by TD-er » 25 Nov 2019, 10:37

Ah yeah that's right.
In almost all PIO environments I have added SDFS and similar libraries to the lib_ignore list.
They were included at build, even when not used, so they added 20+ k to the binary size.

See this line in [esp82xx_common]
lib_ignore = ESP32_ping, ESP32WebServer, IRremoteESP8266, HeatpumpIR, SD(esp8266), SDFS

The last 2 ones are needed for SD stuff.

In the [custom_ESP8266_4M1M] this is overridden for this:
lib_ignore = ESP32_ping, ESP32WebServer

So on the custom build you should be able to build it, or at least those libs will be included.

Like I said before, I have not yet tested it further after the fix in the core lib to no longer mess with the flash string support which prevented it from building anyway if the file SD.h was included.

mackowiakp
Normal user
Posts: 220
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: SD support compilation errors

#7 Post by mackowiakp » 25 Nov 2019, 11:05

Still the same:

entry in platformio_esp82xx_base.ini:

Code: Select all

[esp82xx_common]
extends                   = common
board_build.f_cpu         = 80000000L
build_flags               = ${debug_flags.build_flags} ${mqtt_flags.build_flags} -DHTTPCLIENT_1_1_COMPATIBLE=0
build_unflags             = -DDEBUG_ESP_PORT
lib_deps                  = https://github.com/TD-er/ESPEasySerial.git
lib_ignore                = ESP32_ping, ESP32WebServer //, IRremoteESP8266, HeatpumpIR , SD(esp8266), SDFS
board                     = esp12e
Compilation:

Code: Select all

> Executing task: platformio run --environment custom_ESP8266_4M1M <

Processing custom_ESP8266_4M1M (platform: https://github.com/Jason2866/platform-espressif8266.git#core_2_6_1; board: esp12e; framework: arduino)
---------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
['CONTROLLER_SET_ALL', 'NOTIFIER_SET_NONE', 'PLUGIN_SET_ONLY_SWITCH', 'USES_P001', 'USES_P002', 'USES_P004', 'USES_P028', 'USES_P036', 'USES_P049', 'USES_P052', 'USES_P056', 'USES_P059', 'USES_P082', 'USES_P085', 'USES_P087', 'USES_C016', 'USES_C018', 'USE_SETTINGS_ARCHIVE']
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 2.2.4 #043f5fd > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 80MHz, 80KB RAM, 1019.98KB Flash
PACKAGES: toolchain-xtensa 2.50400.170719 (5.4.0), framework-arduinoespressif8266 2.20601.0 (2.6.1), tool-esptool 1.413.0 (4.13), tool-esptoolpy 1.20800.0 (2.8.0)
Converting ESPEasy.ino
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 63 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESPeasySerial> 1.0.13 #7ddbf6c
|-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <I2Cdevlib-Core>
|   |-- <Wire> 1.0
|-- <SD>
|   |-- <SPI> 1.0
|-- <SPI> 1.0
|-- <Servo(esp8266)> 1.0.2
|-- <Wire> 1.0
|-- <AS_BH1750>
|   |-- <Wire> 1.0
|-- <Adafruit SGP30 Sensor> 1.0.2
|   |-- <Wire> 1.0
|-- <Adafruit TCS34725> 1.0.1
|   |-- <Wire> 1.0
|-- <Adafruit TSL2591 Library> 1.0.2
|   |-- <Adafruit Unified Sensor> 1.0.2
|   |-- <Wire> 1.0
|-- <ESP8266_SSD1306> 3.2.7
|   |-- <Wire> 1.0
|   |-- <SPI> 1.0
|-- <ccronexpr>
|-- <AM2320>
|   |-- <Wire> 1.0
|-- <HeatpumpIR>
|   |-- <IRremoteESP8266> 2.7.0
|-- <Adafruit MPR121> 1.0.0
|   |-- <Wire> 1.0
|-- <Adafruit Motor Shield V2 Library> 1.0.4
|   |-- <Wire> 1.0
|-- <Adafruit NeoPixel> 1.0.6
|-- <Adafruit Unified Sensor> 1.0.2
|-- <ArduinoJson> 6.11.0
|-- <Blynk> 0.6.1
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266HTTPClient> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <HLW8012> 1.1.1
|-- <CHT16K33 LED Matrix Library> 0.0.1
|   |-- <Wire> 1.0
|-- <IRremoteESP8266> 2.7.0
|-- <LiquidCrystal_I2C>
|   |-- <Wire> 1.0
|-- <NewPingESP8266>
|-- <MechInputs> 0.0.1
|-- <SDM> 2.0.0
|   |-- <ESPeasySerial> 1.0.13 #7ddbf6c
|-- <SparkFun APDS9960 RGB and Gesture Sensor> 1.4.2
|   |-- <Wire> 1.0
|-- <TinyGPSPlus> 1.0.2
|-- <SerialSensors> 0.0.1
|   |-- <ESPeasySerial> 1.0.13 #7ddbf6c
|-- <RN2xx3 Arduino Library> 1.0.1
|-- <ESP8266WebServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <PubSubClient> 2.7
|-- <ArduinoOTA> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266mDNS> 1.2
|   |   |-- <ESP8266WiFi> 1.0
|-- <ESP8266HTTPUpdateServer> 1.0
|   |-- <ESP8266WebServer> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WiFi> 1.0
Building in release mode
Compiling .pio/build/custom_ESP8266_4M1M/libdf0/ESPeasySerial/ESPEasySerial_ESP32.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libdf0/ESPeasySerial/ESPEasySerial_ESP8266_noSWserial.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libdf0/ESPeasySerial/ESPEasySoftwareSerial.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libdf0/ESPeasySerial/ESPeasySerial_ESP8266.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/BearSSLHelpers.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/CertStoreBearSSL.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/ESP8266WiFi.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/ESP8266WiFiAP.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/ESP8266WiFiGeneric.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/ESP8266WiFiMulti.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/ESP8266WiFiSTA-WPS.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/ESP8266WiFiSTA.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/ESP8266WiFiScan.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/WiFiClient.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/WiFiClientSecureAxTLS.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/WiFiClientSecureBearSSL.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/WiFiServer.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/WiFiServerSecureAxTLS.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/WiFiServerSecureBearSSL.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libb61/ESP8266WiFi/WiFiUdp.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib9a0/DNSServer/DNSServer.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libac1/ESP8266mDNS/ESP8266mDNS.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libac1/ESP8266mDNS/ESP8266mDNS_Legacy.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libac1/ESP8266mDNS/LEAmDNS.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libac1/ESP8266mDNS/LEAmDNS_Control.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libac1/ESP8266mDNS/LEAmDNS_Helpers.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libac1/ESP8266mDNS/LEAmDNS_Structs.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libac1/ESP8266mDNS/LEAmDNS_Transfer.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libba2/Wire/Wire.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib51e/I2Cdevlib/I2Cdev.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/lib9a4/SPI/SPI.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libc59/SD_ID161/File.cpp.o
In file included from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:26:0,
                 from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29,
                 from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/SD.h:25,
                 from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/File.cpp:15:
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
 #error Architecture or board not supported.
  ^
Compiling .pio/build/custom_ESP8266_4M1M/libc59/SD_ID161/SD.cpp.o
In file included from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:26:0,
                 from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29,
                 from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/SD.h:25,
                 from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/SD.cpp:53:
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
 #error Architecture or board not supported.
  ^
Compiling .pio/build/custom_ESP8266_4M1M/libc59/SD_ID161/utility/Sd2Card.cpp.o
Compiling .pio/build/custom_ESP8266_4M1M/libc59/SD_ID161/utility/SdFile.cpp.o
In file included from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:26:0,
                 from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:26:
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
 #error Architecture or board not supported.
  ^
In file included from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29:0,
                 from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/SD.h:25,
                 from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/File.cpp:15:
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
 uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
 uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
 uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
 uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
*** [.pio/build/custom_ESP8266_4M1M/libc59/SD_ID161/File.cpp.o] Error 1
In file included from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:26:0,
                 from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29,
                 from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp:20:
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
 #error Architecture or board not supported.
  ^
In file included from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29:0,
                 from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp:20:
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
 uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
 uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
 uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
 uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
In file included from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29:0,
                 from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/SD.h:25,
                 from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/SD.cpp:53:
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
 uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
 uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
 uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
 uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
*** [.pio/build/custom_ESP8266_4M1M/libc59/SD_ID161/SD.cpp.o] Error 1
In file included from .pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:26:0:
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
 uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
 uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
 uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
 uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp: In member function 'uint8_t Sd2Card::init(uint8_t, uint8_t, int8_t, int8_t, int8_t)':
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:302:17: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
     clkport     = portOutputRegister(digitalPinToPort(clockPin_));
                 ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:304:17: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
     mosiport    = portOutputRegister(digitalPinToPort(mosiPin_));
                 ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:306:17: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
     misoport    = portInputRegister(digitalPinToPort(misoPin_));
                 ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp: In member function 'uint8_t Sd2Card::readData(uint32_t, uint16_t, uint16_t, uint8_t*)':
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:438:12: warning: unused variable 'n' [-Wunused-variable]
   uint16_t n;
            ^
*** [.pio/build/custom_ESP8266_4M1M/libc59/SD_ID161/utility/Sd2Card.cpp.o] Error 1
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp: In static member function 'static uint8_t SdFile::make83Name(const char*, uint8_t*)':
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp:261:15: warning: unused variable 'b' [-Wunused-variable]
       uint8_t b;
               ^
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp: In member function 'uint8_t SdFile::rmRfStar()':
.pio/libdeps/custom_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp:907:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (curPosition_ != (32*(index + 1))) {
                                        ^
*** [.pio/build/custom_ESP8266_4M1M/libc59/SD_ID161/utility/SdFile.cpp.o] Error 1
============================================ [FAILED] Took 4.62 seconds ============================================

Environment                           Status    Duration
------------------------------------  --------  ------------
custom_ESP8266_4M1M                   FAILED    00:00:04.623
custom_sdk3_ESP8266_4M1M              IGNORED
custom_beta_ESP8266_4M1M              IGNORED
custom_ESP8266_4M2M                   IGNORED
normal_ESP8266_1M                     IGNORED
normal_sdk3_ESP8266_1M                IGNORED
normal_ESP8266_1M_VCC                 IGNORED
normal_ESP8285_1M                     IGNORED
normal_WROOM02_2M                     IGNORED
normal_WROOM02_2M256                  IGNORED
normal_ESP8266_4M1M                   IGNORED
normal_ESP8266_16M                    IGNORED
minimal_core_242_ESP8266_1M_OTA       IGNORED
minimal_core_242_ESP8285_1M_OTA       IGNORED
minimal_core_261_ESP8266_1M_OTA       IGNORED
minimal_core_261_ESP8285_1M_OTA       IGNORED
minimal_core_261_sdk3_ESP8266_1M_OTA  IGNORED
minimal_core_261_sdk3_ESP8285_1M_OTA  IGNORED
minimal_IRext_ESP8266_1M              IGNORED
minimal_IRext_ESP8266_4M1M            IGNORED
minimal_IRext_ESP8266_4M2M            IGNORED
normal_IRext_no_rx_ESP8266_4M2M       IGNORED
test_ESP8266_4M_VCC                   IGNORED
test_beta_ESP8266_4M1M                IGNORED
test_beta_ESP8266_16M                 IGNORED
dev_ESP8266_4M1M                      IGNORED
hard_SONOFF_POW_4M1M                  IGNORED
hard_other_POW_ESP8285_1M             IGNORED
hard_Shelly_1_2M256                   IGNORED
hard_Ventus_W266                      IGNORED
custom_ESP32_4M316k                   IGNORED
test_ESP32_4M316k                     IGNORED
test_ESP32-wrover-kit_4M316k          IGNORED
spec_debug_custom_ESP8266_4M1M        IGNORED
spec_debug_beta_custom_ESP8266_4M1M   IGNORED
spec_debug_custom_ESP32_4M316k        IGNORED
spec_memanalyze_ESP8266               IGNORED
======================================= 1 failed, 0 succeeded in 00:00:04.623 =======================================
The terminal process terminated with exit code: 1

TD-er
Core team member
Posts: 1922
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SD support compilation errors

#8 Post by TD-er » 25 Nov 2019, 12:42

Well those compile issues will not disappear, but the linker errors you had this morning will be gone when using a config which hasn't SDFS etc. in the lib_ignore list.

The other issues, I have to look into later.
Right now I am occupied with some other (ESPEasy related) stuff, so I cannot look into this right now.

mackowiakp
Normal user
Posts: 220
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: SD support compilation errors

#9 Post by mackowiakp » 25 Nov 2019, 17:37

OK. But I want to inform, that after revering changes in "platformio_esp82xx_base.ini" and in "define_plugin_sets.h" files, that is disabling SD card support, it is not possible to compile any firmware. As I wote. In this case no Custom.h, own plugins and any other my changes, all taken "as is" from Source (zip) file.
Still SD library is somewhere call:

Code: Select all

> Executing task: platformio run --environment normal_ESP8266_4M1M <

Processing normal_ESP8266_4M1M (platform: https://github.com/Jason2866/platform-espressif8266.git#core_2_6_1; board: esp12e; framework: arduino)
---------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CPPDEFINES: [['BUILD_GIT', '""'], 'NDEBUG', 'VTABLES_IN_FLASH', 'PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH', ['PUYA_SUPPORT', '1'], 'CORE_POST_2_5_0', 'BEARSSL_SSL_BASIC', 'CORE_POST_2_6_0', 'PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703', ['MQTT_MAX_PACKET_SIZE', '1024'], ['HTTPCLIENT_1_1_COMPATIBLE', '0'], 'USE_CUSTOM_H']
LINKFLAGS: -Wl,-Tesp8266.flash.4m1m.ld
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 2.2.4 #043f5fd > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 80MHz, 80KB RAM, 1019.98KB Flash
PACKAGES: toolchain-xtensa 2.50400.170719 (5.4.0), framework-arduinoespressif8266 2.20601.0 (2.6.1), tool-esptool 1.413.0 (4.13), tool-esptoolpy 1.20800.0 (2.8.0)
Converting ESPEasy.ino
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 59 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESPeasySerial> 1.0.13 #7ddbf6c
|-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <I2Cdevlib-Core>
|   |-- <Wire> 1.0
|-- <SD>
|   |-- <SPI> 1.0
|-- <SPI> 1.0
|-- <Servo(esp8266)> 1.0.2
|-- <Wire> 1.0
|-- <AS_BH1750>
|   |-- <Wire> 1.0
|-- <Adafruit SGP30 Sensor> 1.0.2
|   |-- <Wire> 1.0
|-- <Adafruit TCS34725> 1.0.1
|   |-- <Wire> 1.0
|-- <Adafruit TSL2591 Library> 1.0.2
|   |-- <Adafruit Unified Sensor> 1.0.2
|   |-- <Wire> 1.0
|-- <ESP8266_SSD1306> 3.2.7
|   |-- <Wire> 1.0
|   |-- <SPI> 1.0
|-- <ccronexpr>
|-- <AM2320>
|   |-- <Wire> 1.0
|-- <Adafruit MPR121> 1.0.0
|   |-- <Wire> 1.0
|-- <Adafruit Motor Shield V2 Library> 1.0.4
|   |-- <Wire> 1.0
|-- <Adafruit NeoPixel> 1.0.6
|-- <Adafruit Unified Sensor> 1.0.2
|-- <ArduinoJson> 6.11.0
|-- <Blynk> 0.6.1
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266HTTPClient> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <HLW8012> 1.1.1
|-- <CHT16K33 LED Matrix Library> 0.0.1
|   |-- <Wire> 1.0
|-- <LiquidCrystal_I2C>
|   |-- <Wire> 1.0
|-- <NewPingESP8266>
|-- <MechInputs> 0.0.1
|-- <SDM> 2.0.0
|   |-- <ESPeasySerial> 1.0.13 #7ddbf6c
|-- <SparkFun APDS9960 RGB and Gesture Sensor> 1.4.2
|   |-- <Wire> 1.0
|-- <TinyGPSPlus> 1.0.2
|-- <SerialSensors> 0.0.1
|   |-- <ESPeasySerial> 1.0.13 #7ddbf6c
|-- <RN2xx3 Arduino Library> 1.0.1
|-- <ESP8266WebServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <PubSubClient> 2.7
|-- <ArduinoOTA> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266mDNS> 1.2
|   |   |-- <ESP8266WiFi> 1.0
|-- <ESP8266HTTPUpdateServer> 1.0
|   |-- <ESP8266WebServer> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WiFi> 1.0
Building in release mode
Compiling .pio/build/normal_ESP8266_4M1M/lib553/ESPeasySerial/ESPEasySerial_ESP32.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/lib553/ESPeasySerial/ESPEasySerial_ESP8266_noSWserial.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/lib553/ESPeasySerial/ESPEasySoftwareSerial.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/lib553/ESPeasySerial/ESPeasySerial_ESP8266.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/BearSSLHelpers.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/CertStoreBearSSL.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/ESP8266WiFi.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/ESP8266WiFiAP.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/ESP8266WiFiGeneric.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/ESP8266WiFiMulti.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/ESP8266WiFiSTA-WPS.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/ESP8266WiFiSTA.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/ESP8266WiFiScan.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/WiFiClient.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/WiFiClientSecureAxTLS.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/WiFiClientSecureBearSSL.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/WiFiServer.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/WiFiServerSecureAxTLS.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/WiFiServerSecureBearSSL.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb61/ESP8266WiFi/WiFiUdp.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/lib9a0/DNSServer/DNSServer.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libac1/ESP8266mDNS/ESP8266mDNS.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libac1/ESP8266mDNS/ESP8266mDNS_Legacy.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libac1/ESP8266mDNS/LEAmDNS.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libac1/ESP8266mDNS/LEAmDNS_Control.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libac1/ESP8266mDNS/LEAmDNS_Helpers.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libac1/ESP8266mDNS/LEAmDNS_Structs.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libac1/ESP8266mDNS/LEAmDNS_Transfer.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libba2/Wire/Wire.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/lib51e/I2Cdevlib/I2Cdev.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/lib9a4/SPI/SPI.cpp.o
Compiling .pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/File.cpp.o
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:26:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/SD.h:25,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/File.cpp:15:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
 #error Architecture or board not supported.
  ^
Compiling .pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/SD.cpp.o
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:26:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/SD.h:25,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/SD.cpp:53:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
 #error Architecture or board not supported.
  ^
Compiling .pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/utility/Sd2Card.cpp.o
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/SD.h:25,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/File.cpp:15:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
 uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
 uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
 uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
 uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:26:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:26:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
 #error Architecture or board not supported.
  ^
Compiling .pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/utility/SdFile.cpp.o
*** [.pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/File.cpp.o] Error 1
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:26:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp:20:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2PinMap.h:371:2: error: #error Architecture or board not supported.
 #error Architecture or board not supported.
  ^
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp:20:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
 uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
 uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
 uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
 uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFat.h:29:0,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/SD.h:25,
                 from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/SD.cpp:53:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
 uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
 uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
 uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
 uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
*** [.pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/SD.cpp.o] Error 1
In file included from .pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:26:0:
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:65:37: error: 'SS_PIN' was not declared in this scope
 uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
                                     ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:68:31: error: 'MOSI_PIN' was not declared in this scope
 uint8_t const  SPI_MOSI_PIN = MOSI_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:70:31: error: 'MISO_PIN' was not declared in this scope
 uint8_t const  SPI_MISO_PIN = MISO_PIN;
                               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.h:72:30: error: 'SCK_PIN' was not declared in this scope
 uint8_t const  SPI_SCK_PIN = SCK_PIN;
                              ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp: In member function 'uint8_t Sd2Card::init(uint8_t, uint8_t, int8_t, int8_t, int8_t)':
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:302:17: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
     clkport     = portOutputRegister(digitalPinToPort(clockPin_));
                 ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:304:17: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
     mosiport    = portOutputRegister(digitalPinToPort(mosiPin_));
                 ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:306:17: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
     misoport    = portInputRegister(digitalPinToPort(misoPin_));
                 ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp: In member function 'uint8_t Sd2Card::readData(uint32_t, uint16_t, uint16_t, uint8_t*)':
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/Sd2Card.cpp:438:12: warning: unused variable 'n' [-Wunused-variable]
   uint16_t n;
            ^
*** [.pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/utility/Sd2Card.cpp.o] Error 1
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp: In static member function 'static uint8_t SdFile::make83Name(const char*, uint8_t*)':
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp:261:15: warning: unused variable 'b' [-Wunused-variable]
       uint8_t b;
               ^
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp: In member function 'uint8_t SdFile::rmRfStar()':
.pio/libdeps/normal_ESP8266_4M1M/SD_ID161/utility/SdFile.cpp:907:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (curPosition_ != (32*(index + 1))) {
                                        ^
*** [.pio/build/normal_ESP8266_4M1M/libb59/SD_ID161/utility/SdFile.cpp.o] Error 1
============================================ [FAILED] Took 6.30 seconds ============================================

Environment                           Status    Duration
------------------------------------  --------  ------------
custom_ESP8266_4M1M                   IGNORED
custom_sdk3_ESP8266_4M1M              IGNORED
custom_beta_ESP8266_4M1M              IGNORED
custom_ESP8266_4M2M                   IGNORED
normal_ESP8266_1M                     IGNORED
normal_sdk3_ESP8266_1M                IGNORED
normal_ESP8266_1M_VCC                 IGNORED
normal_ESP8285_1M                     IGNORED
normal_WROOM02_2M                     IGNORED
normal_WROOM02_2M256                  IGNORED
normal_ESP8266_4M1M                   FAILED    00:00:06.305
normal_ESP8266_16M                    IGNORED
minimal_core_242_ESP8266_1M_OTA       IGNORED
minimal_core_242_ESP8285_1M_OTA       IGNORED
minimal_core_261_ESP8266_1M_OTA       IGNORED
minimal_core_261_ESP8285_1M_OTA       IGNORED
minimal_core_261_sdk3_ESP8266_1M_OTA  IGNORED
minimal_core_261_sdk3_ESP8285_1M_OTA  IGNORED
minimal_IRext_ESP8266_1M              IGNORED
minimal_IRext_ESP8266_4M1M            IGNORED
minimal_IRext_ESP8266_4M2M            IGNORED
normal_IRext_no_rx_ESP8266_4M2M       IGNORED
test_ESP8266_4M_VCC                   IGNORED
test_beta_ESP8266_4M1M                IGNORED
test_beta_ESP8266_16M                 IGNORED
dev_ESP8266_4M1M                      IGNORED
hard_SONOFF_POW_4M1M                  IGNORED
hard_other_POW_ESP8285_1M             IGNORED
hard_Shelly_1_2M256                   IGNORED
hard_Ventus_W266                      IGNORED
custom_ESP32_4M316k                   IGNORED
test_ESP32_4M316k                     IGNORED
test_ESP32-wrover-kit_4M316k          IGNORED
spec_debug_custom_ESP8266_4M1M        IGNORED
spec_debug_beta_custom_ESP8266_4M1M   IGNORED
spec_debug_custom_ESP32_4M316k        IGNORED
spec_memanalyze_ESP8266               IGNORED
======================================= 1 failed, 0 succeeded in 00:00:06.305 =======================================
The terminal process terminated with exit code: 1

TD-er
Core team member
Posts: 1922
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: SD support compilation errors

#10 Post by TD-er » 25 Nov 2019, 17:51

Have you removed the define for SD_FEATURE (or how it is called) and also performed a clean build?

Code: Select all

pio run --target clean
(this does clean all environments, or the defined "default" environments)

mackowiakp
Normal user
Posts: 220
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: SD support compilation errors

#11 Post by mackowiakp » 25 Nov 2019, 18:03

Yes, both from VS menu and from VS terminal.

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests