Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'GPIO' was not declared in this scope ESP32 #255

Open
4516N41 opened this issue Jun 11, 2024 · 6 comments
Open

'GPIO' was not declared in this scope ESP32 #255

4516N41 opened this issue Jun 11, 2024 · 6 comments

Comments

@4516N41
Copy link

4516N41 commented Jun 11, 2024

`In file included from c:\Users\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:38:
c:\Users\Documents\Arduino\libraries\MCUFRIEND_kbv\utility/mcufriend_shield.h: In function 'void write_8(uint16_t)':
c:\Users\Documents\Arduino\libraries\MCUFRIEND_kbv\utility/mcufriend_shield.h:1084:5: error: 'GPIO' was not declared in this scope
1084 | GPIO.out_w1tc = map_8(0xFF); //could define once as DMASK
| ^~~~
c:\Users\Documents\Arduino\libraries\MCUFRIEND_kbv\utility/mcufriend_shield.h: In function 'uint8_t read_8()':
c:\Users\Documents\Arduino\libraries\MCUFRIEND_kbv\utility/mcufriend_shield.h:1090:19: error: 'GPIO' was not declared in this scope
1090 | return map_32(GPIO.in);
| ^~~~

exit status 1`

I get this error after the "Arduino Release v3.0.1 based on ESP-IDF v5.1.4" update

@walid-76
Copy link

Hello.
iam facing also the same problem and i have the newest version of arduino, were u able to solve the problem ??

@cor053
Copy link

cor053 commented Jun 30, 2024

I have got exactly the same problem as well. GPIO doesn't seem to be defined.

In file included from /Users/Documents/Arduino/libraries/MCUFRIEND_kbv/MCUFRIEND_kbv.cpp:38:
/Users/Documents/Arduino/libraries/MCUFRIEND_kbv/utility/mcufriend_shield.h: In function 'void write_8(uint16_t)':
/Users/Documents/Arduino/libraries/MCUFRIEND_kbv/utility/mcufriend_shield.h:1084:5: error: 'GPIO' was not declared in this scope
1084 | GPIO.out_w1tc = map_8(0xFF); //could define once as DMASK
| ^~~~
/Users/Documents/Arduino/libraries/MCUFRIEND_kbv/utility/mcufriend_shield.h: In function 'uint8_t read_8()':
/Users/Documents/Arduino/libraries/MCUFRIEND_kbv/utility/mcufriend_shield.h:1090:19: error: 'GPIO' was not declared in this scope
1090 | return map_32(GPIO.in);
| ^~~~

exit status 1

Compilation error: exit status 1

@cor053
Copy link

cor053 commented Jun 30, 2024

I found this thread.
Bodmer/TFT_eSPI#2628
It claims to have solved the problem recently. But what I understand is that is not in any official release yet.
But read it for yourself.

Sorry my mistake, It has got nothing to do with MCUFRIEND_kbv.

@ErrorxF00F
Copy link

Followed the link @cor053 posted and implemented the addition of the include for hal/gpio_ll.h and it fixed my issue. In utility/mcufriend_shield.h after line 1025 I added the include, like as follows:

1024	//################################### ESP32 ##############################
1025	#elif defined(ESP32)       //regular UNO shield on TTGO D1 R32 (ESP32)
1026
1027	#include "hal/gpio_ll.h" // GPIO register functions
1028
1029	#define LCD_RD  2  //LED
1030	#define LCD_WR  4

@kekanath
Copy link

kekanath commented Aug 8, 2024

This above really worked. thanks for the FIX

@mediaMicha
Copy link

Hello, I have the same Problem. I use the WEMOS D1 R32 Bord with the ILI9486 Touch Display. I have two Errors, and the include of "#include "hal/gpio_ll.h" does not work.
The two error massages:
In file included from /Users/michaelhammel/Documents/Arduino/libraries/Riscduino_MCUFRIEND_kbv/Riscduino_MCUFRIEND_kbv.cpp:38:
/Users/michaelhammel/Documents/Arduino/libraries/Riscduino_MCUFRIEND_kbv/utility/mcufriend_shield.h: In function 'void write_8(uint16_t)':
/Users/michaelhammel/Documents/Arduino/libraries/Riscduino_MCUFRIEND_kbv/utility/mcufriend_shield.h:1089:5: error: 'GPIO' was not declared in this scope
1089 | GPIO.out_w1tc = map_8(0xFF); //could define once as DMASK
| ^~~~
/Users/michaelhammel/Documents/Arduino/libraries/Riscduino_MCUFRIEND_kbv/utility/mcufriend_shield.h: In function 'uint8_t read_8()':
/Users/michaelhammel/Documents/Arduino/libraries/Riscduino_MCUFRIEND_kbv/utility/mcufriend_shield.h:1095:19: error: 'GPIO' was not declared in this scope
1095 | return map_32(GPIO.in);

I will be very happy, when it's work again, with the new environment. With the old Version 1.x.x it's works fine. With Arduino V 2.3.2. it not work any longer.

Wish you all the best, and hop someone find a solution :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants