-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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] Marlin 2.0, BOARD_MKS_SGEN creates an error while compiling #16493
Comments
The error notice tries to guide you to check the platformio.ini file setting for the default environment. You likely have something other than LPC1768 set for the |
Hi, platform settings is default. But i compile with the env:LPC1769 in PlatformIO So far i can see, the problem is in the included pins_MKS_SBASE.h file which has a LPC1768 processor. Here is the part from pins_MKS_SGEN.h. In the last line is the include of the pins_MKS_SBASE.h. /**
#ifndef MCU_LPC1769 #define BOARD_INFO_NAME "MKS SGen" #include "../lpc1768/pins_MKS_SBASE.h" |
what ide do you use? |
Ah, sorry mixed up SGEN and SGENL. |
It's a bit similar situation as with SKR v1.4 and the Turbo variant. Those don't use definition check for the MCU in the pins files as it would lead to similar kind of situation if it wasn't done with extra conditions taking into account the LPC1768 and LPC1769 processors. But that ifndef check aside have you tried setting the |
@boelle IDE is VS Code |
What firmware did the board come with Marlin or Smoothieware? Do you update the firmware with SD card or through Platformio? I'm wondering if there are some remnants of the other firmware on the board preventing good flash. |
Yes this is a bug.. pins_MKS_SGEN.h correctly checks for a LPC1769 but then includes ../lpc1768/pins_MKS_SBASE.h which checks for a LPC1768. generating a PR to fix this |
This has been fixed in marlin bugfix-2.0.x |
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. |
Bug Description
Have a MKS SGEN 1.0 and try to create a bin file.
When i use the Board "BOARD_MKS_SGEN", i got the error:
"Marlin\src\HAL\HAL_LPC1768../../inc/../pins/lpc1769/../lpc1768/pins_MKS_SBASE.h:29:4: error: #error "Oops! Make sure you have the LPC1768 environment selected in your
IDE.""
When i disable the checking in the "pins_MKS_SBASE.h file. Which is included in the pins_MKS_SGEN.h file.
#ifndef MCU_LPC1768
// #error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
It compiles without any errors. But after uploading to the Board, the Board is not accessible via USB, COM port anymore.
When i write back the Smoothie firmware, the Board is working again.
My Configurations
https://www.dropbox.com/sh/k4trz437e9x80uw/AACL9D_LHvTkixpH1_Q2Vi3ha?dl=0
Steps to Reproduce
Expected behavior: [What you expect to happen]
Actual behavior: [What actually happens]
Additional Information
The text was updated successfully, but these errors were encountered: