It looks like you are using some old version of the library (from 2012).

The latest version, which does not contain the problematic "extern" block, can be found here: https://github.com/adafruit/DHT-sensor-library

(The default example works nicely with my Arduino Nano v3.0 and DHT22 sensor)

Answer from Viliam Simko on Stack Overflow
🌐
GitHub
github.com › espressif › arduino-esp32 › issues › 5649
FreeRTOSConfig.h:32:20: fatal error: avr/io.h: No such file or directory · Issue #5649 · espressif/arduino-esp32
September 8, 2021 - Dependency Graph |-- <Adafruit ADS1X15> 2.2.0 | |-- <Adafruit BusIO> 1.8.3 | | |-- <Wire> 1.0.1 | | |-- <SPI> 1.0 | |-- <Wire> 1.0.1 |-- <ArduinoJson> 6.18.3 |-- <SPI> 1.0 |-- <NTPClient> 3.2.0+sha.367254d |-- <SPIFFS> 1.0 | |-- <FS> 1.0 |-- <PubSubClient> 2.8 |-- <WiFi> 1.0 |-- <Update> 1.0 |-- <WebServer> 1.0 | |-- <WiFi> 1.0 | |-- <FS> 1.0 |-- <DallasTemperature> 3.9.1 | |-- <OneWire> 2.3.5 | | |-- <FreeRTOS> 10.4.4-2 |-- <OneWire> 2.3.5 | |-- <FreeRTOS> 10.4.4-2 Building in release mode Compiling .pio\build\esp32doit-devkit-v1\src\WaterFlowSensor.cpp.o Compiling .pio\build\esp32doit-devkit
Author   nocs85
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Trouble Compiling ESP32 Project in PlatformIO - Error with 'avr/io.h' Inclusion - Programming - Arduino Forum
November 22, 2023 - I'm encountering an issue while attempting to compile my ESP32 project in PlatformIO. The compilation fails due to an error involving the inclusion of 'avr/io.h', which is specific to AVR microcontrollers and is not compatible with ESP32 architecture. Error Details: 'avr/io.h' file not found In file included from .pio/libdeps/nodemcu-32s/FreeRTOS/src/FreeRTOSConfig.h:32:10: .pio/libdeps/nodemcu-32s/FreeRTOS/src/FreeRTOSConfig.h:32:10: fatal error: avr/io.h: No such file or directory #include
Discussions

sensors - fatal error: avr/io.h: No such file or directory arduino - Stack Overflow
Communities for your favorite technologies. Explore all Collectives · Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work More on stackoverflow.com
🌐 stackoverflow.com
Arduino R4
I know this is maybe a longshot but, im trying to port my code to the R4 because of memory issues on my regular uno R3. FreeRTOS worked super well on the R3, but i just need more features, more tas... More on github.com
🌐 github.com
5
October 20, 2023
FreeRTOS.h: No such file or directory
Won’t compile Example Error just below, 6 other errors saying this file is missing as well. …/src/config/sam_e51_cnano/osal/osal_freertos.h:56:10: fatal error: FreeRTOS.h: No such file or directory I apologize folks, not sure if here is the place to ask this. More on forums.freertos.org
🌐 forums.freertos.org
0
0
May 25, 2023
arduino due - fatal error: avr/io.h: No such file or directory - Arduino Stack Exchange
I'm compiling a project on Due that was working correclty using UNO. I get this error : 'avr/io.h: No such file or directory'. Searching across the web, it seams I'm not the only one to get that er... More on arduino.stackexchange.com
🌐 arduino.stackexchange.com
May 18, 2017
🌐
GitHub
github.com › espressif › arduino-esp32 › issues › 2855
avr/io.h not found · Issue #2855 · espressif/arduino-esp32
June 4, 2019 - C:\Users\chris\Documents\Arduino\libraries\FreeRTOS\src/FreeRTOSVariant.h:34:20: fatal error: avr/io.h: No such file or directory
Author   chrisaclark
🌐
FreeRTOS
freertos.org › FreeRTOS_Support_Forum_Archive › May_2015 › freertos_fatal_error_freeRTOS.h_No_such_file_or_directory_f4badc4aj.html
fatal error: freeRTOS.h: No such file or directory - FreeRTOS
fatal error: freeRTOS.h: No such file or directoryPosted by mahendra12345 on May 3, 2015Hello there I’m newbie at FreeRTOS, Before getting starts, I’d installed eclipse Kepler, and then gcc 4.9.2 MinGW along with latest version of free RTOS 8.2.1 then after I’ve import FreeRTOS Demo as explained on freertos sight. now when i building new …
🌐
GitHub
github.com › feilipu › Arduino_FreeRTOS_Library › issues › 122
Arduino R4 · Issue #122 · feilipu/Arduino_FreeRTOS_Library
October 20, 2023 - Compiling .pio/build/uno/lib195/FreeRTOS/port.c.o In file included from .pio/libdeps/uno/FreeRTOS/src/Arduino_FreeRTOS.h:64, from .pio/libdeps/uno/FreeRTOS/src/event_groups.c:38: .pio/libdeps/uno/FreeRTOS/src/FreeRTOSConfig.h:32:10: fatal error: avr/io.h: No such file or directory 32 | #include <avr/io.h> | ^~~~~~~~~~ compilation terminated.
Author   KenwoodFox
🌐
FreeRTOS Community
forums.freertos.org › partners & sponsors › microchip
FreeRTOS.h: No such file or directory - Microchip - FreeRTOS Community Forums
May 25, 2023 - Won’t compile Example Error just below, 6 other errors saying this file is missing as well. …/src/config/sam_e51_cnano/osal/osal_freertos.h:56:10: fatal error: FreeRTOS.h: No such file or directory I apologize folks, …
Find elsewhere
🌐
Everything ESP8266
esp8266.com › viewtopic.php
ESP8266 with the Arduion IDE and with RTOS possible? - Everything ESP8266
August 16, 2018 - For this I would like to be able to work with tasks, why I decided to go with a FreeRTOS. But after some research and errors like "avr/io.h not found" I discovered that the Arduino/ESP8266 Platform is not RTOS ready. This I started to realize, because my CPU is not a AVR, so there is nothing with "avr/io.h".
🌐
PlatformIO Community
community.platformio.org › t › freertos-library-problem › 22942
FreeRTOS library problem - atmelavr - PlatformIO Community
August 15, 2021 - Hi I am trying out a FreeRTOS demo and have done some basic prep in pio. the Freertos source files are in three separate folders, so I’ve placed them in the projects src folder as below, and placed the .h files in the pio include folder. I also renamed the .c files to .cpp In PIO libraries, ...
🌐
Arduino Forum
forum.arduino.cc › development tools › ide 1.x
fatal error: avr/io.h: No such file or directory - IDE 1.x - Arduino Forum
April 10, 2014 - I searched for an answer and found some older posts but not very helpful. I'm verifying the FadeUp sketch of the DmxMaster library and I get this error message. Where should this header file supposed to be? I guess it go…
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Arduino_FreeRTOS.h file not found - Programming - Arduino Forum
March 11, 2022 - there is lots of problem at the 2.0 ıde but this problem very fascinating there is also be at the Servo.h library
🌐
PlatformIO Community
community.platformio.org › t › include-freertos-freertosconfig-h-no-such-file-or-directory › 22531
Include freertos/FreeRTOSConfig.h : No such file or directory - PlatformIO Community
July 18, 2021 - Hi, I have a project, which depends a library (nxp), which depends on freertos. I want to define the FreeRTOSConfig in my project (preferably), or in my nxp library. I do not want to put the FreeRTOSConfig in my freertos library (obviously). Whatever I try, I keep ending up with a compilation ...
🌐
GitHub
github.com › MediaTek-Labs › Arduino-Add-On-for-LinkIt-SDK › issues › 104
avr/io.h lacked in FreeRTOS · Issue #104 · MediaTek-Labs/Arduino-Add-On-for-LinkIt-SDK
October 9, 2018 - C:\Users\Jack\Documents\Arduino\libraries\FreeRTOS\src/FreeRTOSConfig.h:32:20: fatal error: avr/io.h: No such file or directory
Published   Aug 15, 2018
🌐
STMicroelectronics Community
community.st.com › t5 › stm32cubeide-mcus › fatal-error-freertos-h-no-such-file-or-directory › td-p › 609097
fatal error: FreeRTOS.h: No such file or directory - STMicroelectronics Community
November 19, 2023 - I create a new stm32 project, check X-CUBE-FREEROS in Middleware. Then I could include FreeRTOS.h to main.c. But if I create a stm32 cmake project. Since no xxx.ioc, I cannot choose X-CUBE-FREEROS. When building my C source, the compiler will show "fatal error: FreeRTOS.h: No such file or directory"...
🌐
GitHub
github.com › espressif › arduino-esp32 › issues › 3627
avr/io.h in esp32-AI CAM · Issue #3627 · espressif/arduino-esp32
January 9, 2020 - In file included from C:\Users\CG-DTE\Documents\Arduino\libraries\Arduino_FreeRTOS\src/Arduino_FreeRTOS.h:104:0,
Author   ronitsrma16
🌐
GitHub
github.com › bdring › Grbl_Esp32 › issues › 1320
Missing FreeRTOS.h library · Issue #1320 · bdring/Grbl_Esp32
November 16, 2022 - When I am trying to compile the grbl for esp32, it shows me this error: Alternatives for FreeRTOS.h: [] ResolveLibrary(FreeRTOS.h) -> candidates: [] C:\Users\ewleg\Downloads\Grbl_Esp32-main\Grbl_Esp32-main\Grbl_Esp32\src\I2SOut.cpp:54:10: fatal error: FreeRTOS.h: No such file or directory #include <FreeRTOS.h> ^~~~~~~~~~~~ compilation terminated. I tried to install FreeRTOS library through library manager, but it is called Arduino_FreeRTOS.h, so it doesnt find it. When I try to rename it to FreeRTOS.h it shows error of avr/io.h missing.
Author   ItsOkeyPro
🌐
Stack Overflow
stackoverflow.com › questions › 49193961 › fatal-error-freertosconfig-h-no-such-file-or-directory
gcc - fatal error: FreeRTOSConfig.h: No such file or directory - Stack Overflow
I have all required header and source files and also defined all the Include Paths, but the compiler is still throwing the same error. But if I move FreeRTOSConfig.h to "/FreeRTOS_demo/freeRTOSv10/Source/include/" then the compiler builds without any error.
🌐
Arduino Forum
forum.arduino.cc › projects › libraries
freertos/FreeRTOS.h:no such file or directory - Libraries - Arduino Forum
January 12, 2023 - Today I was trying to use the library "Freenove_WS2812_Lib_for_ESP32' for my 4x4 led matrix and I keep getting the error"In file included from C:\Users\overb\Documents\Arduino\led matrix\led matrix.ino:1:0: C:\Users\overb\Documents\Arduino\libraries\Freenove_WS2812_Lib_for_ESP32\src/Freenove_WS2812_Lib_for_ESP32.h:18:10: fatal error: freertos/FreeRTOS.h: No such file or directory #include "freertos/FreeRTOS.h" ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. exit status 1 Compilation error: e...