thelastoutpostworkshop / gpio_viewer

GPIOViewer Arduino Library to see live GPIO Pins on ESP32 boards
https://youtu.be/JJzRXcQrl3I
MIT License
1.05k stars 105 forks source link

Problem building with PlatformIO and ESP32 #58

Closed CharlesGodwin closed 9 months ago

CharlesGodwin commented 9 months ago

I just hit the same problem using VS Code and PlatformIO. I'm using this board and this is is my platformio.ini

[platformio]
default_envs = esp-wrover-kit

[env:esp-wrover-kit]
; https://thingpulse.com/product/epulse-low-power-esp32-development-board/
platform = espressif32
board = esp-wrover-kit
framework = arduino
lib_deps =
    https://github.com/dvarrel/AsyncTCP.git
    https://github.com/me-no-dev/ESPAsyncWebServer.git
    https://github.com/thelastoutpostworkshop/gpio_viewer.git

I get these compile errors

.pio\libdeps\esp-wrover-kit\GPIOViewer\src/gpio_viewer.h: In member function 'void GPIOViewer::begin()':
.pio\libdeps\esp-wrover-kit\GPIOViewer\src/gpio_viewer.h:94:70: error: 'ESP_ARDUINO_VERSION_MAJOR' was not declared in this scope
         Serial.printf("GPIOViewer >> ESP32 Core Version %d.%d.%d\n", ESP_ARDUINO_VERSION_MAJOR, ESP_ARDUINO_VERSION_MINOR, ESP_ARDUINO_VERSION_PATCH);   
                                                                      ^
.pio\libdeps\esp-wrover-kit\GPIOViewer\src/gpio_viewer.h:94:97: error: 'ESP_ARDUINO_VERSION_MINOR' was not declared in this scope
         Serial.printf("GPIOViewer >> ESP32 Core Version %d.%d.%d\n", ESP_ARDUINO_VERSION_MAJOR, ESP_ARDUINO_VERSION_MINOR, ESP_ARDUINO_VERSION_PATCH);   
                                                                                                 ^
.pio\libdeps\esp-wrover-kit\GPIOViewer\src/gpio_viewer.h:94:124: error: 'ESP_ARDUINO_VERSION_PATCH' was not declared in this scope
         Serial.printf("GPIOViewer >> ESP32 Core Version %d.%d.%d\n", ESP_ARDUINO_VERSION_MAJOR, ESP_ARDUINO_VERSION_MINOR, ESP_ARDUINO_VERSION_PATCH);   
                                                                                                                            ^
.pio\libdeps\esp-wrover-kit\GPIOViewer\src/gpio_viewer.h: In member function 'int GPIOViewer::readGPIO(int, uint32_t*, pinTypes*)':
.pio\libdeps\esp-wrover-kit\GPIOViewer\src/gpio_viewer.h:328:57: error: 'analogGetChannel' was not declared in this scope
         uint8_t analogChannel = analogGetChannel(gpioNum);
                                                         ^
thelastoutpostworkshop commented 9 months ago

@CharlesGodwin on what version of ESP32 boards are you ? You should use the latest version 2.0.14

CharlesGodwin commented 9 months ago

@CharlesGodwin on what version of ESP32 boards are you ? You should use the latest version 2.0.14

I'll let you know Sunday

rescalle83 commented 9 months ago

The ESP32 version from Espressif is 3.0.0a. The one below is 2.0.11

From: thelastoutpostworkshop @.> Sent: Saturday, January 6, 2024 4:34 PM To: thelastoutpostworkshop/gpio_viewer @.> Cc: rescalle83 @.>; Comment @.> Subject: Re: [thelastoutpostworkshop/gpio_viewer] Problem building with PlatformIO and ESP32 (Issue #58)

@CharlesGodwin https://github.com/CharlesGodwin on what version of ESP32 boards are you ? You should use the latest version 2.0.14

— Reply to this email directly, view it on GitHub https://github.com/thelastoutpostworkshop/gpio_viewer/issues/58#issuecomment-1879856085 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ALY7EJICLTV7LPNLU7OSRVDYNHGMPAVCNFSM6AAAAABBPUKP4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZZHA2TMMBYGU . You are receiving this because you commented. https://github.com/notifications/beacon/ALY7EJKQLCBTQURT3RLQL7TYNHGMPA5CNFSM6AAAAABBPUKP4SWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTQBRJ5K.gif Message ID: @. @.> >

KnappD commented 9 months ago

Same problem here using a D1 Mini.

if u put defines like following in .h File the frist errors are gone.

/* Major version number (X.x.x) /

define ESP_ARDUINO_VERSION_MAJOR 3

/* Minor version number (x.X.x) /

define ESP_ARDUINO_VERSION_MINOR 0

/* Patch version number (x.x.X) /

define ESP_ARDUINO_VERSION_PATCH 0

im Still struggling with the

.pio\libdeps\wemos_d1_mini32\GPIOViewer\src/gpio_viewer.h:336:57: error: 'analogGetChannel' was not declared in this scope

failure

CharlesGodwin commented 9 months ago

@thelastoutpostworkshop I'm not sure how tell ESP32 version. My board is about 3-4 years old.

I'm moving on from this problem as I have some deadlines to meet.

thelastoutpostworkshop commented 9 months ago

Same problem here using a D1 Mini.

if u put defines like following in .h File the frist errors are gone.

/* Major version number (X.x.x) _/ #define ESP_ARDUINO_VERSIONMAJOR 3 / Minor version number (x.X.x) _/ #define ESP_ARDUINO_VERSIONMINOR 0 / Patch version number (x.x.X) / #define ESP_ARDUINO_VERSION_PATCH 0

im Still struggling with the

.pio\libdeps\wemos_d1_mini32\GPIOViewer\src/gpio_viewer.h:336:57: error: 'analogGetChannel' was not declared in this scope

failure

Make sure you have the latest stable release of GPIOViewer. Make sure you have the latest ESP32 boards definition from Espressif, the latest currentky are 2.0.14

KnappD commented 9 months ago

Same problem here using a D1 Mini. if u put defines like following in .h File the frist errors are gone. /* Major version number (X.x.x) _/ #define ESP_ARDUINO_VERSIONMAJOR 3 / Minor version number (x.X.x) _/ #define ESP_ARDUINO_VERSIONMINOR 0 / Patch version number (x.x.X) / #define ESP_ARDUINO_VERSION_PATCH 0 im Still struggling with the .pio\libdeps\wemos_d1_mini32\GPIOViewer\src/gpio_viewer.h:336:57: error: 'analogGetChannel' was not declared in this scope failure

Make sure you have the latest stable release of GPIOViewer. Make sure you have the latest ESP32 boards definition from Espressif, the latest currentky are 2.0.14

i have latest release of GPIOViewer, since i have installed it today. i alo think i have current version of espressif.

The quesiton is where are the definition for major minor and patch level in ur code?

thelastoutpostworkshop commented 9 months ago

They are not in my code, they are defined in Espressif ESP32 Core code. If you are using PlatformIO, go to Platforms in PIOHome, and update the Espressif32 boards. If you are using Arduino IDE, go to the boards manager, and update to 2.0.14 for Espressif Systems

KnappD commented 9 months ago

I have 3.5.0...is this correct?

image

it might be a general problem with Plattform IO. Also there is no definition of the analogGetChannel() function. Is this also included in Espressif?

thelastoutpostworkshop commented 9 months ago

yes analogGetChannel() is in Espressif. The latest Espressif board is : image Click on the update tab to update all the Espressif boards : image

KnappD commented 9 months ago

Tanks a lot . The old Espressif32 Version was the problem. Updated it to 6.5.0 everything is working.

Thread can be closed

thelastoutpostworkshop commented 9 months ago

Glad it's working now

rescalle83 commented 9 months ago

My issue still remains. It is not a library issue. I am (have to) use the board library from Esperrif as I have a C6 dev board. I have tried different machines, loaded in different folders, etc.. with no luck getting GPIOViewer to compile. I can work with ESPAsyncWebSvr with other examples but it will simply not compile with GPIOViewer.

I assume it has something to do with the 3.0.14a board version from Esperrif as the 2.0.014 does not support C6. The only boards I have are the ESP32-C6-DevKitC-1 (board version 1.2).

I have tried everything and I get the same error. The libraries are there, the folders are correct, the paths are good. Simply will not compile.

Hopefully someone can try this with the C6 in the Arduino environment using the 3.0.14a board package from Esperrif.

Appreciate all the help

Bob

From: thelastoutpostworkshop @.> Sent: Sunday, January 7, 2024 8:47 AM To: thelastoutpostworkshop/gpio_viewer @.> Cc: rescalle83 @.>; Comment @.> Subject: Re: [thelastoutpostworkshop/gpio_viewer] Problem building with PlatformIO and ESP32 (Issue #58)

Glad it's working now

— Reply to this email directly, view it on GitHub https://github.com/thelastoutpostworkshop/gpio_viewer/issues/58#issuecomment-1880079660 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ALY7EJK462IKGZJGCOVV3HLYNKYN7AVCNFSM6AAAAABBPUKP4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGA3TSNRWGA . You are receiving this because you commented. https://github.com/notifications/beacon/ALY7EJIKEO6MGXRD4A24HU3YNKYN7A5CNFSM6AAAAABBPUKP4SWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTQB66SY.gif Message ID: @. @.> >

rescalle83 commented 9 months ago

Did you update from Arduino IDE?

From: DKnapp @.> Sent: Sunday, January 7, 2024 8:42 AM To: thelastoutpostworkshop/gpio_viewer @.> Cc: rescalle83 @.>; Comment @.> Subject: Re: [thelastoutpostworkshop/gpio_viewer] Problem building with PlatformIO and ESP32 (Issue #58)

Tanks a lot . The old Espressif32 Version was the problem. Updated it to 6.5.0 everything is working.

Thread can be closed

— Reply to this email directly, view it on GitHub https://github.com/thelastoutpostworkshop/gpio_viewer/issues/58#issuecomment-1880078295 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ALY7EJL7ABHVGTHODWGQ3TDYNKX3VAVCNFSM6AAAAABBPUKP4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGA3TQMRZGU . You are receiving this because you commented. https://github.com/notifications/beacon/ALY7EJPAHCYXDAC5RN4AYLLYNKX3VA5CNFSM6AAAAABBPUKP4SWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTQB635O.gif Message ID: @. @.> >

rescalle83 commented 9 months ago

Unfortunately 2.0.14 does not support the C6 iteration. They recommend to use the dev (not stable) version which is 3.0.14a and does support C6. I have even tried going to the 2.0.14 with still no luck on compile. Same error on 3 different machines using different folders and paths just to ensure something simple is caught.

Hopefully Espressif will move the C6 support into the stable board package at some point. Maybe there is something in the dev package that simply will not allow this to compile. All of my Blynk projects compile and work perfectly. I have compiled 9-10 different projects and all work with the dev package. I am sure I am missing something and will continue to try from time to time.

Really appreciate all the help and glad DKnapp was able to get things working!

From: thelastoutpostworkshop @.> Sent: Sunday, January 7, 2024 7:59 AM To: thelastoutpostworkshop/gpio_viewer @.> Cc: rescalle83 @.>; Comment @.> Subject: Re: [thelastoutpostworkshop/gpio_viewer] Problem building with PlatformIO and ESP32 (Issue #58)

They are not in my code, they are defined in Espressif ESP32 Core code. If you are using PlatformIO, go to Platforms in PIOHome, and update the Espressif32 boards. If you are using Arduino IDE, go to the boards manager, and update to 2.0.14 for Espressif Systems

— Reply to this email directly, view it on GitHub https://github.com/thelastoutpostworkshop/gpio_viewer/issues/58#issuecomment-1880067403 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ALY7EJPQDPQPMGQVEASFSZ3YNKSZDAVCNFSM6AAAAABBPUKP4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGA3DONBQGM . You are receiving this because you commented. https://github.com/notifications/beacon/ALY7EJMNIVCKETDIMZ76FJDYNKSZDA5CNFSM6AAAAABBPUKP4SWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTQB6GUW.gif Message ID: @. @.> >