Closed mh-alinaghipour closed 3 months ago
Your configs & code snippets are all from 2.1.2.2
.
Please download bugfix-2.1.x
to test with the latest code and let us know if you're still having this issue.
I just downloaded the latest bugfix-2.1.x version and tested defining additional axes as rotational. New compiling errors occur:
\Marlin-bugfix-2.1.x\Marlin\src\lcd\HD44780\marlinui_HD44780.cpp: In static member function 'static void MenuItem_static::draw(uint8_t, FSTR_P, uint8_t, const char*)':
\Marlin-bugfix-2.1.x\Marlin\src\lcd\HD44780\marlinui_HD44780.cpp:1210:43: error: variable-sized object 'estr' may not be initialized
char estr[calculateWidth(ftpl) + 3] = "\0";
^
exit status 1
Compilation error: variable-sized object 'estr' may not be initialized
I was able to fix the above by implementing these changes to "\Marlin-bugfix-2.1.x\Marlin\src\lcd\HD44780\marlinui_HD44780.cpp"
, (line 1210):
--char estr[calculateWidth(ftpl) + 3] = "\0";
++char estr[calculateWidth(ftpl) + 3];
++memset(estr, 0, (calculateWidth(ftpl) + 3)*(calculateWidth(ftpl) + 3)*sizeof(char));
But after that, the exact same pragma GCC diagnostics errors occur in "\Marlin-bugfix-2.1.x\\Marlin\src\module\temperature.cpp"
(lines 3103 & 4117):
\Marlin-bugfix-2.1.x\Marlin\src\module\temperature.cpp:3103:26: error: missing binary operator before token "("
#if __has_cpp_attribute(fallthrough)
^
\Marlin-bugfix-2.1.x\Marlin\src\module\temperature.cpp:4117:28: error: missing binary operator before token "("
#if __has_cpp_attribute(fallthrough)
^
exit status 1
Compilation error: missing binary operator before token "("
which I was able to fix by doing the same changes to suppress pragma GCC diagnostics errors in the previous comment.
Configs: Marlin-bugfix-2.1.x-config.zip
Please attach your bugfix-2.1.x
configs.
Please attach your
bugfix-2.1.x
configs.
bugfix-2.1.x Configs: https://github.com/MarlinFirmware/Marlin/files/14865695/Marlin-bugfix-2.1.x-config.zip
How are you compiling your build? Compiling works fine under macOS with VSCode + PlatformIO:
Processing DUE (platform: atmelsam; board: due; framework: arduino)
-----------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelsam/due.html
PLATFORM: Atmel SAM (8.2.0) > Arduino Due (Programming Port)
HARDWARE: AT91SAM3X8E 84MHz, 96KB RAM, 512KB Flash
DEBUG: Current (atmel-ice) External (atmel-ice, blackmagic, jlink, stlink)
PACKAGES:
- framework-arduino-sam @ 1.6.12
- framework-cmsis @ 1.40500.0 (4.5.0)
- framework-cmsis-atmel @ 1.2.2
- toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1)
Converting Marlin.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 4 compatible libraries
Scanning dependencies...
Dependency Graph
|-- LiquidCrystal @ 1.5.1
|-- Wire @ 1.0
|-- SPI @ 1.0
Building in release mode
...
Archiving .pio/build/DUE/libFrameworkArduino.a
Indexing .pio/build/DUE/libFrameworkArduino.a
Linking .pio/build/DUE/firmware.elf
Checking size .pio/build/DUE/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 11.5% (used 11280 bytes from 98304 bytes)
Flash: [==== ] 43.9% (used 230184 bytes from 524288 bytes)
Building .pio/build/DUE/firmware.bin
============================= [SUCCESS] Took 22.12 seconds =============================
Environment Status Duration
------------- -------- ------------
DUE SUCCESS 00:00:22.117
============================== 1 succeeded in 00:00:22.117 ==============================
* Terminal will be reused by tasks, press any key to close it.
I compile(verify) and upload Marlin onto my Arduino Due board with Arduino IDE 2.3.2 on Windows 11.
I compile(verify) and upload Marlin onto my Arduino Due board with Arduino IDE 2.3.2 on Windows 11.
Please use VSCode with PlatformIO instead: Link.
Also, from our README:
You can still build Marlin with Arduino IDE, and we hope to improve the Arduino build experience, but at this time PlatformIO is the better choice.
I compile(verify) and upload Marlin onto my Arduino Due board with Arduino IDE 2.3.2 on Windows 11.
Please use VSCode with PlatformIO instead: Link.
Also, from our README:
You can still build Marlin with Arduino IDE, and we hope to improve the Arduino build experience, but at this time PlatformIO is the better choice.
Thank you. I installed PlatformIO on my VSCode and managed to compile without errors.
Greetings from the Marlin AutoBot!
This issue has had no activity for the last 90 days.
Do you still see this issue with the latest bugfix-2.1.x
code?
Please add a reply within 14 days or this issue will be automatically closed.
To keep a confirmed issue open we can also add a "Bug: Confirmed" tag.
Disclaimer: This is an open community project with lots of activity and limited resources. The main project contributors will do a bug sweep ahead of the next release, but any skilled member of the community may jump in at any time to fix this issue. That can take a while depending on our busy lives so please be patient, and take advantage of other resources such as the MarlinFirmware Discord to help solve the issue.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Did you test the latest
bugfix-2.1.x
code?Yes, and the problem still exists.
Bug Description
While compiling a configuration containing two additional rotational axes, I faced the errors below:
I was able to fix the earlier errors by adding this:
#define HAS_ROTATIONAL_AXES "n"
toconfiguration.h
in which"n"
represents the number of rotational axes you have defined in "stepper drivers" section.However, compiling the above, caused new set of errors:
The errors are caused by pragma GCC diagnostics codes in
"\Marlin-2.1.2.2\Marlin\src\module\temperature.cpp"
. To suppress pragma GCC diagnostics errors I did the changes below totemperature.cpp
:and:
After making these changes I was able to successfully compile and upload. I hope it would be helpful to others.
Bug Timeline
No response
Expected behavior
No response
Actual behavior
No response
Steps to Reproduce
No response
Version of Marlin Firmware
2.1.2.2
Printer model
No response
Electronics
Arduino Due + Ramps-FD
LCD/Controller
RepRapDiscount Smart Controller
Other add-ons
No response
Bed Leveling
None
Your Slicer
None
Host Software
None
Don't forget to include
Configuration.h
andConfiguration_adv.h
. config.zipAdditional information & file uploads
No response