Skip to content
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

[BUG] When #define SPI_ENDSTOPS compile fails #14905

Closed
McVillano opened this issue Aug 9, 2019 · 11 comments
Closed

[BUG] When #define SPI_ENDSTOPS compile fails #14905

McVillano opened this issue Aug 9, 2019 · 11 comments

Comments

@McVillano
Copy link

Description

When trying to compile marlin 2.0.x bugfix for the SKR 1.3 with LPC1768 platform and platform.io fails if i set #define SPI_ENDSTOPS for not wiring diag to endstop. It prints

Steps to Reproduce

  1. use platformio.ini attached
    Marlin.zip

  2. Use configuration.h and configuration_adv.h attached

  3. Compile

Actual behavior:

In file included from Marlin\src\inc/MarlinConfigPre.h:34,
                 from Marlin\src\inc/MarlinConfig.h:28,
                 from Marlin\src\Marlin.h:24,
                 from Marlin\src\Marlin.cpp:31:
Marlin\src\Marlin.cpp: In function 'void idle(bool)':
Marlin\src\Marlin.cpp:664:58: error: 'sg_guard_period' was not declared in this scope
     if (endstops.tmc_spi_homing.any && ELAPSED(millis(), sg_guard_period))
                                                          ^~~~~~~~~~~~~~~
Marlin\src\inc/../core/millis_t.h:28:43: note: in definition of macro 'PENDING'
 #define PENDING(NOW,SOON) ((int32_t)(NOW-(SOON))<0)
                                           ^~~~
Marlin\src\Marlin.cpp:664:40: note: in expansion of macro 'ELAPSED'
     if (endstops.tmc_spi_homing.any && ELAPSED(millis(), sg_guard_period))
                                        ^~~~~~~
*** [.pio\build\LPC1768\src\src\Marlin.cpp.o] Error 1
@GMagician
Copy link
Contributor

GMagician commented Aug 9, 2019

Not sure because I don't know how logic works but sg_guard_period is valid only when IMPROVE_HOMING_RELIABILITY is enabled, maybe just write
if (endstops.tmc_spi_homing.any) for temp fix
but I think @teemuatlut may say more than me

@sl1pkn07
Copy link
Contributor

sl1pkn07 commented Aug 9, 2019

Hi

i can confirm keep disable IMPROVE_HOMING_RELIABILITY makes build fail (ReARM)

greetings

@GMagician
Copy link
Contributor

Fixed and merged..please close

@McVillano
Copy link
Author

McVillano commented Aug 10, 2019

I've re-donwloaded the source code from the webpage but still the same error:

Compiling .pio\build\LPC1768\src\src\feature\bedlevel\bedlevel.cpp.o
In file included from Marlin\src\inc/MarlinConfigPre.h:34,
                 from Marlin\src\inc/MarlinConfig.h:28,
                 from Marlin\src\Marlin.h:24,
                 from Marlin\src\Marlin.cpp:31:
Marlin\src\Marlin.cpp: In function 'void idle(bool)':
Marlin\src\Marlin.cpp:664:58: error: 'sg_guard_period' was not declared in this scope
     if (endstops.tmc_spi_homing.any && ELAPSED(millis(), sg_guard_period))
                                                          ^~~~~~~~~~~~~~~
Marlin\src\inc/../core/millis_t.h:28:43: note: in definition of macro 'PENDING'
 #define PENDING(NOW,SOON) ((int32_t)(NOW-(SOON))<0)
                                           ^~~~
Marlin\src\Marlin.cpp:664:40: note: in expansion of macro 'ELAPSED'
     if (endstops.tmc_spi_homing.any && ELAPSED(millis(), sg_guard_period))
                                        ^~~~~~~
Compiling .pio\build\LPC1768\src\src\feature\bedlevel\mbl\mesh_bed_leveling.cpp.o
*** [.pio\build\LPC1768\src\src\Marlin.cpp.o] Error 1
Compiling .pio\build\LPC1768\src\src\feature\controllerfan.cpp.o
In file included from Marlin\src\inc/MarlinConfigPre.h:34,
                 from Marlin\src\inc/MarlinConfig.h:28,
                 from Marlin\src\Marlin.h:24,
                 from Marlin\src\Marlin.cpp:31:
Marlin\src\Marlin.cpp: In function 'void idle(bool)':
Marlin\src\Marlin.cpp:664:58: error: 'sg_guard_period' was not declared in this scope
     if (endstops.tmc_spi_homing.any && ELAPSED(millis(), sg_guard_period))
                                                          ^~~~~~~~~~~~~~~
Marlin\src\inc/../core/millis_t.h:28:43: note: in definition of macro 'PENDING'
 #define PENDING(NOW,SOON) ((int32_t)(NOW-(SOON))<0)
                                           ^~~~
Marlin\src\Marlin.cpp:664:40: note: in expansion of macro 'ELAPSED'
     if (endstops.tmc_spi_homing.any && ELAPSED(millis(), sg_guard_period))
                                        ^~~~~~~
*** [.pio\build\LPC1768\src\src\Marlin.cpp.o] Error 1

@sl1pkn07
Copy link
Contributor

for me is fixed with code from git

@GMagician
Copy link
Contributor

GMagician commented Aug 10, 2019

if (endstops.tmc_spi_homing.any && ELAPSED(millis(), sg_guard_period))

this code doesn't come from merge, this is the same old code

@McVillano
Copy link
Author

You are right, i was downloading old version.

I have another error now but it's an UltraLCD thing THANKS!

@GMagician
Copy link
Contributor

I have another error now but it's an UltraLCD

maybe related to #14912?

@McVillano
Copy link
Author

I have another error now but it's an UltraLCD

maybe related to #14912?

Sure, the same, jejejeje you are a magician, but it's extrange to me because i don´t use ultraLCD i have it disabled and i use a REPRAP_DISCOUNT_SMART_CONTROLLER.

@tpruvot
Copy link
Contributor

tpruvot commented Aug 10, 2019

I think Scott overheated and made that to reduce the PRs amount over the week end :p

@github-actions
Copy link

github-actions bot commented Jul 4, 2020

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.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants