-
Notifications
You must be signed in to change notification settings - Fork 7.6k
strange errors about void function and other error messages when upgrading to 2.04, 2.0.5 (ver 1.0.6 is fine though)! #7340
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
Comments
hmm... where did all the comments go? Did you |
|
Update:
|
Update 2: having added
|
that is a very different error now. Could be caused by the use of vectors in your code, or something else eating RAM. Your original issue is solved though. Maybe try to not use vectors? |
Update 3: still again that compile error from #7340 (comment) persisting |
no, I urgently need vectors because I have to read directories of unknown entry sizes recursively, allocate memory dynamically for either new entries, display it, and finally free memory |
Your dram is overallocated. Let me google that for you.... |
What makes you think that? How can that happen exactly suddenly (e.g., by which command) whilst it does not happen with 1.0.6.? |
suddenly you are on a totally different IDF version, with totally different toolchain version. Overall everything underneath is different :) If you MUST use vectors, why not stay at 1.0.6 for this project? |
OTOH, in 1.0.6 there are SD issues, e.g. SD.exists() is working faulty - so I was adviced to upgrade to 2.0.3++: |
@VojtechBartoska : |
Arduino API is the same. That is why you are able to switch between versions and have your project compile. If you were to use ESP-IDF APIs, that would not be the case. |
ok, but when it's the same, why can't it be compiled then anymore? I don't even understand the error messages, if there are any at all... |
Hi @dsyleixa, seems it's really in your code/sketch. Keeping the label "questions". Thanks @me-no-dev for advices. |
All my versions compile fine since 1.0.6. and even earlier. |
I'm not sure if I'm some kind of masochist, but I tried to get the code to build and it's a complete mess, I finally gave up when I encountered an include that is not available through any dependency. Having had a look though, I see that you are allocating many, many large static objects e.g. fonts. Perhaps that is the problem? Did you read the page that @lbernstone linked? Under the hood many things have changed from the 1x to 2x versions. Things even change between 2x versions (as I found out when my code stopped working) and yet we have these generous folks working hard to bring us this amazing functionality for free! You have 2 options: stay on the 1x branch or fix your code to work on the 2x branch. I would start by moving to VS Code and cleaning it up. (for clarity, I am a consumer of this awesomeness, just as you are). |
thanks for your interest! for 1.0.6 it compiles completely clean, debug output states:
|
I am no expert, but I remember reading about how memory allocated for framework purposes has changed between versions. So perhaps where a large block or set of large blocks would fit in DRAM in the 1x framework, they no longer do. As for the include issue, it is possible that this was moved from a framework header between versions. You used to get this 'for free' but now need to explicitly include it. A better practice would be to include the headers for the functionality you require. In terms of moving to VS code: I meant converting your project from a .ino based Arduino project into a VS Code / PlatformIO project with proper dependencies setup and something that is easier to work with. e.g. When I tried to build your code Edit: I have no idea how this compiles for 1.0.6. I assume you are using this with the Arduino IDE. Ain't nobody got time for that. |
yes, of course I am using the Arduino IDE for esp32-arduino, I stated that already at the TOP, and I would never use anything else (still no idea what VS Code / PlatformIO is supposed to be). |
OK fair enough I missed that you were using the Arduino IDE. You should really check out VS Code. It will change your life. "As to the font there is an easy workaround for you": it isn't any easy workaround as I'm not going to expend any more effort on this. It seems there is a variable that is statically allocated in your code that is causing the overflow on 2x. You don't seem to want to solve this, but as a final hint, perhaps compile this on 1x, generate a map file and analyse it for large variables, see if you can remove / cut that down and then try and compile on 2x, that might help you track down the issue. |
+1 for switching from Arduino IDE to VSCode with PIO. https://docs.platformio.org/en/latest/integration/ide/vscode.html#ide-vscode |
no, I need the Arduino IDE with all the Arduino API libs also for my cross-compatible code for other MCUs and all my GPIO, i2c, and SPI devices, which also use those specific Arduino libs. |
as to |
I'm closing this issue as won't fix as there are any action items. Thanks for understanding. |
@VojtechBartoska |
Board
Adafruit ESP32
Device Description
Adafruit Feather ESP32
Hardware Configuration
different i2c devices (ADS1115, MPU6050) at standard i2c pins
Version
v2.0.5
IDE Name
Arduino IDE
Operating System
Windows 11
Flash frequency
80 MHz
PSRAM enabled
no
Upload speed
115000
Description
using now 2.0.4 or 2.0.5 board cores for my void function
void ls(std::vector list)
{
}
I get strange error messages:
yes, it is void, and that's how it should be!
and in the debug window:
Objection! IT IS!!
see: std::vector
https://en.cppreference.com/w/cpp/container/vector
And with former board core 1.0.6 all and everything compiles fine though!
the void function above that is fine:
And with board core 1.0.6 all and everything compiles fine though!
note:
I have no idea what "PSRAM enabled" means, I did not check that arbitrarily, just standard setting.
Sketch
Debug Message
Other Steps to Reproduce
I tried both core 2.0.4 and 2.0.5, same error, for 1.0.6 no errors!
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: