-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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
Change to arduino friendly include #18880
Change to arduino friendly include #18880
Conversation
By |
Arduino IDE. But also the arduino cli. I have automated builds for the ramps, rambo and mini rambo that also include using arduino to check that build. I have also checked with arduino 1.8.13 in linux. The error is that it can't find cstddev, and there is also an error where arduino is trying to find the library named cstddev. From some googling, it looks like cstddev has never been available (in Arduino). |
But this new code is supposed to work only on STM32. |
Well. I don't know how it is included. Is there something I can provide to help figure it out? https://github.com/jeffeb3/MarlinBuilder/actions/runs/189986919 Those are my automated builds for ramps. I have a seperate Marlin checked out on my computer from bugfix-2.0.x, I configured it for rambo and opened the arduino IDE. It fails in the same spot with the same error. If I jist change it to stddev.h, it compiles fine. |
If you are using platformio, those files would be removed from build. The better fix would be: surround all this new tft code with the #define it may need enabled for work. |
Well, FWIW, this one line change has made it build for me. At least in my desktop case. I assume the other consequence of having it build might be a larger binary, right? So that will trickle into problems for things like melzi boards. I am sure this question comes up frequently. Is arduino still a target build environment for platforms that support it? I have another issue open related to arduino builds. I'm not actually sure if it is still desired. I'm not sure where I would look for any official announcement of something like that. |
Binary may not get any larger because GCC is clever and discard unused symbols. But the compile time will be higher. I don't know if your correct breaks or not the original code. My, in my option, its better to keep the original untouched and do what I suggested. I can create a PR with what I'm suggesting. |
That makes sense to me. I think this PR also makes sense though. stddef.h is included 15 times already, and this is the first time cstddef is included. |
Let's @thinkyhead decide |
The pointy |
I am attempting to set flash Marlin onto Mega2560 with Aduino 1.8.13 IDE. I am still getting fatal error: csddef: I downloaded the bugfix of Marlin 2.0x Yesterday morning @ 9am Chicago time. What would I do to get Aduido IDE to stop giving me this error? |
Download a fresh copy of - #include "cstddef"
+ #include <stddef.h> |
YES. I wondered the same when I saw when thinkyhead had updated it. It is working now. All is good in the Nado verse now. ;) I appreciate this site and the information was easy to find. I am new to the site. Just getting use to where the times are listed. I must have downloaded my version just before he updated it. Oh well, Live and learn. |
This reverts commit d4c3b35.
Requirements
Description
The current bugfix branch doesn't build in arduino. The issue is some new tft code uses NULL, and to get the define, they included cstddef, which isn't available with arduino. The header stddef.h is available, and also works in platformio
Benefits
The builds once again will build in arduino, not just platformio.