MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.28k stars 19.24k forks source link

[BUG] Compilation errors by VS Code when choosing TMC driver and MKS DGUS #21289

Closed McDAK33 closed 3 years ago

McDAK33 commented 3 years ago

Bug Description

Additional Information

If only TMC drivers or only MKS DGAS are defined in Configuration.h, then the assembly is compiled without errors. If this is determined at the same time, then an error occurs.

thisiskeithb commented 3 years ago

When reporting an issue, please be sure to follow all instructions at the top of the template, including debugging steps, and leave the sections headings intact.

This includes attaching your configuration files, regardless of whether you think they are involved.

For reference, these are the instructions included in the template: ### Before Reporting a Bug 1. Test with the `bugfix-2.0.x` branch to see whether the issue still exists. 2. Get troubleshooting help from the Marlin community to confirm it's a bug and not just a configuration error. Links at https://github.com/MarlinFirmware/Marlin/issues/new/choose ### Instructions 1. Fill out every section of the template below. 2. Always attach configuration files, regardless of whether you think they are involved. 3. Read and understand Marlin's Code of Conduct. By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md --- ### Bug Description _Describe the bug in this section._ ### Configuration Files **Required:** Include a ZIP file containing `Configuration.h` and `Configuration_adv.h`. If you've made any other modifications describe them in detail here. ### Steps to Reproduce _Describe the steps needed to reproduce the issue._ 1. [First Step] 2. [Second Step] 3. [and so on...] **Expected behavior:** _Describe what you expected to happen here._ **Actual behavior:** _Describe what actually happens here._ #### Additional Information * Provide pictures or links to videos that clearly demonstrate the issue. * See [Contributing to Marlin](https://github.com/MarlinFirmware/Marlin/blob/2.0.x/.github/contributing.md) for additional guidelines.
thisiskeithb commented 3 years ago

Here's the test config I created for this issue: Marlin-issue-21289.zip

The Trinamic/StealthChop include in DGUSDisplayDef.cpp (L38-40) needs to be patched so it's properly included:

#if ENABLED(HAS_STEALTHCHOP)
-  #include "../../../../module/stepper/trinamic.h"
+  #include "../../../../../module/stepper/trinamic.h"
#endif

This config will still not build properly, but the issue is because it you have to enable SENSORLESS_HOMING.

I'm looking into why that's a requirement.

McDAK33 commented 3 years ago

Thank you for quick answer. I don't use SENSORLESS HOMING. I will wait for a decision.

thisiskeithb commented 3 years ago

PR https://github.com/MarlinFirmware/Marlin/pull/21388 fully resolves compiling issues (and fixes another bug), but I don't have the hardware to test.

You can pull those changes into your copy of Marlin for testing or wait until it's merged into bugfix-2.0.x and pull a fresh copy.

github-actions[bot] commented 3 years ago

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.