Skip to content

pgmspace.h: No such file or directory for Raspberry Pi Pico #259

Closed
@ghost

Description

  • Arduino board: Raspberry Pi Pico
  • Arduino IDE version: 2.0.3
  • Using Arduino Mbed OS RP2040 Boards (installed from Arduino's board manager) to program the Pico

The error I get when trying to compile the example file "ssd1306_128x64_12c" is the following:

Adafruit_SSD1306.cpp:42:10: fatal error: pgmspace.h: No such file or directory

Lines 39-42 of such cpp file looks like this:
#ifdef AVR
#include <avr/pgmspace.h>
#elif defined(ESP8266) || defined(ESP32) || defined(ARDUINO_ARCH_RP2040)
#include <pgmspace.h>

If I modify line 42 like this:
#include <avr/pgmspace.h>
then the sketch compiles and works as expected.

So it seems that the Pico uses the avr pgmspace, maybe this can be modified in the cpp file
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions