🌐
GitHub
github.com › qmk › qmk_firmware › issues › 901
avr/pgmspace.h: No such file or directory · Issue #901 · qmk/qmk_firmware
November 24, 2016 - Size before: text data bss dec hex filename 0 22852 0 22852 5944 s60-x_donkey.hex Compiling: ../../keyboards/s60-x/s60-x.c In file included from ../../keyboards/s60-x/s60-x.h:23:0, from ../../keyboards/s60-x/s60-x.c:1: ../../quantum/quantum.h:5:26: fatal error: avr/pgmspace.h: No such file or directory #include <avr/pgmspace.h> ^ compilation terminated.
Author   wyudong
🌐
GitHub
github.com › qmk › qmk_firmware › issues › 3151
avr/pgmspace.h not found in nix-shell · Issue #3151 · qmk/qmk_firmware
June 8, 2018 - Compiling: keyboards/launchpad/launchpad.c In file included from keyboards/launchpad/rev1/rev1.h:7:0, from keyboards/launchpad/launchpad.h:5, from keyboards/launchpad/launchpad.c:1: ./quantum/quantum.h:20:10: fatal error: avr/pgmspace.h: No such file or directory #include <avr/pgmspace.h>
Author   pletcher
Discussions

avr/pgmspace.h: No such file or directory
Issue description After avrgcc libc binutils was splitted I can't build qmk firmware. It hangs with following error: In file included from keyboards/atreus/atreus.h:4:0, from keyboards/atreus/a... More on github.com
🌐 github.com
4
October 9, 2017
DZ60 make error
Attempting to make dz60 firmware fails with the following error: :~/git/qmk_firmware>make dz60:default Compiling: keyboards/dz60/dz60.c In file included from keyboards/dz60/dz60.h:4, from keyboa... More on github.com
🌐 github.com
1
October 9, 2018
ESP32 boards: `#include <avr/pgmspace.h>` results in `fatal error: avr/pgmspace.h: No such file or directory -> candidates: []`
#include compiles on all supported processors and architectures except ESP32. It is probably related to location of this file within the esp32 toolchain. The toolchain for al... More on github.com
🌐 github.com
2
January 8, 2022
"Fatal Error: avr/pgmspace.h no such file or directory" error for ESP8266
Hi! I am using Arduino IDE to program my NodeMCU module. I am trying to interface seven segment display using MAX7219 IC. FOr that I am using LedControl library from here. I have seen people using LedControl library with their ESP8266 but my IDE is refusing to compile it. More on forum.arduino.cc
🌐 forum.arduino.cc
0
0
July 25, 2018
🌐
Reddit
reddit.com › r/olkb › unexpected build fail
r/olkb on Reddit: unexpected build fail
May 29, 2017 -

Trying to compile the planck default board/keymap. While in the qmk_firmware/keyboards/planck/keymaps/default directory I'm running 'make' but I'm getting the following error:

avr/pgmspace.h./quantum/quantum.h:20:26: fatal error: avr/pgmspace.h: No such file or directory
 #include <avr/pgmspace.h>

My first guess was that I must have upgraded the OS or something outdating my libs, so I went to brew (i'm a mac) and updated everything there. Relevant versions are:

>brew ls --versions | grep avr
avr-binutils 2.25 2.28
avr-gcc 4.9.3 6.2.0 6.3.0
avr-libc 2.0.0

So what am I doing wrong?

🌐
GitHub
github.com › NixOS › nixpkgs › issues › 30249
avr/pgmspace.h: No such file or directory · Issue #30249 · NixOS/nixpkgs
October 9, 2017 - After avrgcc libc binutils was splitted I can't build qmk firmware. It hangs with following error: In file included from keyboards/atreus/atreus.h:4:0, from keyboards/atreus/atreus.c:1: ./quantum/quantum.h:20:26: fatal error: avr/pgmspace.h: No such file or directory compilation terminated.
Author   abcdw
🌐
GitHub
github.com › qmk › qmk_firmware › issues › 4107
DZ60 make error · Issue #4107 · qmk/qmk_firmware
October 9, 2018 - :~/git/qmk_firmware>make dz60:default Compiling: keyboards/dz60/dz60.c In file included from keyboards/dz60/dz60.h:4, from keyboards/dz60/dz60.c:1: quantum/quantum.h:20:14: fatal error: avr/pgmspace.h: No such file or directory #include <avr/pgmspace.h>
Author   isolatedvirus
🌐
GitHub
github.com › arduino › Arduino › issues › 11736
ESP32 boards: `#include <avr/pgmspace.h>` results in `fatal error: avr/pgmspace.h: No such file or directory -> candidates: []` · Issue #11736 · arduino/Arduino
January 8, 2022 - #include compiles on all supported processors and architectures except ESP32. It is probably related to location of this file within the esp32 toolchain. The toolchain for all other processors and architectures (avr, arm...
Author   dmalenic
🌐
Arduino Forum
forum.arduino.cc › projects › programming
"Fatal Error: avr/pgmspace.h no such file or directory" error for ESP8266 - Programming - Arduino Forum
July 25, 2018 - Hi! I am using Arduino IDE to program my NodeMCU module. I am trying to interface seven segment display using MAX7219 IC. FOr that I am using LedControl library from here. I have seen people using LedControl library with their ESP8266 but my IDE is refusing to compile it.
🌐
GitHub
github.com › SodaqMoja › Sodaq_DS3231 › issues › 5
"avr/pgmspace.h: No such file or directory" on ESP8266. Patch inside. · Issue #5 · SodaqMoja/Sodaq_DS3231
April 6, 2016 - Hi! I am using this library together with my NodeMCU and other ESP8266-12 modules. But the library/compiler throws the following error: "fatal error: avr/pgmspace.h: No such file or directory". I found the following solution: In Sodaq_DS...
Author   ikarisan
Find elsewhere
🌐
GNU
issues.guix.gnu.org › issue › 39794
AVR-Toolchain-5 avr/io not found
ignoring nonexistent directory "/gnu/store/cwsiyrcm1c4c25dw0zrgajjnr9mf5k3g-avr-gcc-5.5.0/lib/gcc/avr/5.5.0/../../../../avr/include" ... End of search list. ... Navigate to qmk-firmware and clean previous build results.
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Fatal error: pgmspace.h: No such file or directory Help! - Programming - Arduino Forum
October 31, 2022 - Hi all, My library is currently using the Base64 library. There are several lines of code inside Base64 library: #include "Base64.h" #include <Arduino.h> #if (defined(__AVR__)) #include <avr/pgmspace.h> #else #include <…
🌐
The Things Network
thethingsnetwork.org › end devices (nodes)
Pgmspace.h: No such file or directory - End Devices (Nodes) - The Things Network
October 5, 2018 - Hi, i am trying the Arduino sketch DeviceInfo for LoRaExplorer. The comilation fails: TheThingsNetwork.h:12:22: fatal error: pgmspace.h: No such file or directory I follow all the instruction to install TheThingsNEtwo…
🌐
Particle
community.particle.io › firmware › libraries
<avr/pgmspace.h> no such file or directory running particle could on Raspberry pi3 - Libraries - Particle
May 1, 2017 - Hi, i’m trying to flash an arduino program to my raspberry pi3 through Particle cloud ide. The cloud has my pi device recognized. But when i tried to flash the program to the pi. I got an error saying: “Print.h” no such file or directory. So i googled to copy the Print.h and Print.cpp ...
🌐
GitHub
github.com › qmk › qmk_firmware › issues › 21685
qmk/qmk_firmware
August 3, 2023 - Size before: text data bss dec hex filename 0 25222 0 25222 6286 converter_usb_usb_pro_micro_k360_colemak_dh_with_mouse_layer.uf2 Compiling: keyboards/converter/usb_usb/custom_matrix.cpp cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ In file included from lib/usbhost/USB_Host_Shield_2.0/version_helper.h:24, from lib/usbhost/USB_Host_Shield_2.0/settings.h:81, from lib/usbhost/USB_Host_Shield_2.0/Usb.h:27, from keyboards/converter/usb_usb/custom_matrix.cpp:22: lib/usbhost/arduino-1.0.1/cores/arduino/Arduino.h:8:10: fatal error: avr/pgmspace.h: No
Author   AOrazaev
🌐
PlatformIO Community
community.platformio.org › t › in-included-file-avr-pgmspace-h-file-not-found › 21635
In included file 'avr/pgmspace.h' file not found - PlatformIO Community
May 26, 2021 - Hello there! I’m on Linux, using vim and I use clangd as my language server. The code compiles fine but it always gives me something missing, e.g. Use of undeclared identifyer ‘Serial’ and In included file ‘avr/pgmspace…
Top answer
1 of 4
8

Based on the responses to this issue, I added "c:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr\\avr\\**" to my include path in c_cpp_properties.json:

"includePath": [
    "c:\\Program Files (x86)\\Arduino\\tools\\**",
    "c:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\**",
    "c:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr\\avr\\**"
],
2 of 4
6

For anyone who stumbles here on a Mac, here is the config that works for me with the Uno:

{
    "env": {
        "arduino_path": "/Applications/Arduino.app/Contents/Java",
        "arduino_avr_include_path": "${env:arduino_path}/hardware/arduino/avr",
        "arduino_avr_include2_path": "${env:arduino_path}/hardware/tools/avr/avr/include",
        "arduino_avr_compiler_path": "${env:arduino_path}/hardware/tools/avr/bin/avr-g++"
    },
    "configurations": [
        {
            "name": "Mac",
            "defines": [
                "ARDUINO=10810",
                "__AVR_ATmega328P__",
                "UBRRH"
            ],
            "includePath": [
                "${workspaceRoot}",
                "${env:arduino_avr_include_path}/**",
                "${env:arduino_avr_include2_path}/**"
            ],
            "forcedInclude": [
                "/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/Arduino.h"
            ],
            "intelliSenseMode": "gcc-x64",
            "cStandard": "c11",
            "cppStandard": "c++11",
            "compilerPath": "${env:arduino_compiler_path} -std=gnu++11 -mmcu=atmega328p"
        }
    ],
    "version": 4
}

The key to finding <avr/pgmspace.h> was the adding the hardware/tools/avr/avr/include path.

Defining ARDUINO=10810 was identified from the output of running Arduino: Verify with the verbose flag.

Defining __AVR_ATmega328P__ was added to allow proper IntelliSense completion of the raw register macros (e.g. _BV(), OCR0A, TIMSK0, etc.); the correct macro to define was identified based on the chip being an ATMEGA328P-PU and by inspection of the file hardware/tools/avr/avr/include/avr/io.h.

🌐
NewAE Forum
forum.newae.com › embedded security › chipwhisperer software
Avr folder is missing in avrcryptolib folder - ChipWhisperer Software - NewAE Forum
September 27, 2023 - I am trying to implement des on my target and currently facing following issue: …/./crypto/avrcryptolib//des/des.c:30:10: fatal error: avr/pgmspace.h: No such file or directory 30 | #include | ^~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** […/./Makefile.inc:495: objdir-CWLITEARM/des.o] ...
🌐
Maker Forums
forum.makerforums.info › archive › fastled archive
Ever get the dreaded error: fatal error: avr/pgmspace.h: - FastLED Archive - Maker Forums
January 26, 2018 - Ever get the dreaded error: fatal error: avr/pgmspace.h: No such file or directory Well then replace #if FASTLED_INCLUDE_PGMSPACE == 1 #include <avr/pgmspace.h> #endif with #if (defined(AVR)) #include <avr\pgmspa…
🌐
Arduino Forum
forum.arduino.cc › projects › programming
arduino v1.0 compile error: avr\pgmspace.h: No such file or directory - Programming - Arduino Forum
January 10, 2012 - I am new to Arduino. I've installed the Arduino IDE 1.0 on a MacOSX platform and have been checking out Mikal Hart's TinyGPS package. http://arduiniana.org/libraries/tinygps/ http://arduiniana.org/TinyGPS/TinyGPS10.zip However I'm encountering a compile error with one of the example sketches ...
🌐
VisualMicro
visualmicro.com › forums › YaBB.pl
VS Arduino - fatal error: avr\pgmspace.h: No such file or directory
Help and assistance with Microsoft Visual Studio, cross-platform Arduino compatible development with GDB, WiFi and Serial Debugging. 100's of extensions such as team code sharing, unit testing. Multi-platform and multi-architecture build system. Firmware Disassembly Viewer, Memory Inspection, ...