-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
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] (mks Robin compiling error cs_pin not declared) #15439
Comments
right, maybe my fault... need #define TOUCH_CS_PIN PB1 |
made the PR #15445 |
Thanks for the answer ! |
According to the schematic https://github.com/makerbase-mks/MKS-Robin/blob/master/MKS%20Robin/Hardware/MKS%20Robin%20V2.3_001%20SCH.pdf It might be required to manually set software SPI2 pins too, in the touchscreen section...
If you could test and confirm.... what do you mean by the "tft indicates complete" ? could you do a picture ? |
I made the changes in the file xpt2046.cpp but unfortunately for the same result. I tried another version of MARLIN on this link |
right, look like this "Complete" is displayed by the bootloader, doesnt look like Marlin code. Maybe after the SD upgrade is done... Did you try to reboot the board then, with and without the SD inserted ? |
I just tried but it's the same thing. |
Well the code you linked is not current marlin source code... can be anything... hard to compare both. But I seen weird pin definitions, like the "Custom SPI" section, affected to some pins required for the internal SD (SDIO) |
OK, but I'm not a coding expert! I would like the original MARLIN to work but it is not! the display shows nothing! I browse the different files, I can not find the solution! |
I believe this code came from https://github.com/jmz52/Marlin/tree/MKS-Robin-Touch-POC Best regards, |
I also think that it comes from that |
made a PR #15474 to fix the wrong pin definitions, could be related... |
I ordered the board, but will take some weeks to get it... Also i seen the Robin2 wiring seems very different on schematics... and not yet in Marlin sources |
Of course robin 2.4 is different from robin2 |
yep, noticed that in their sources, after... for the F4 (robin2) had some confusion with "v2.4" first... |
ok, no other info over usb/serial during the boot ? Which size/model is your TFT ? |
My tft is mks robin tft_V2.0 3.2 inch |
You are using the file Robin.bin for the SD update, right? |
Yes ! I m using Robin.bin |
@fizga issue still there? |
yes still not solved |
Title and problem description is no more related to your issue... maybe close this one and reopen a new one.. with current status |
suggestions for a better title would be? i can edit the title so it better shows about the problem but yes i agree to hit close an create a new issue with correct title and status |
Ok i will close this and open a new one ! |
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. |
i try to build marlin in Visual studio en have this error :
In file included from Marlin\src\feature\touch../../inc/../HAL/./HAL_STM32F1/HAL.h:36:0,
from Marlin\src\feature\touch../../inc/../HAL/HAL.h:26,
from Marlin\src\feature\touch../../inc/MarlinConfig.h:30,
from Marlin\src\feature\touch\xpt2046.cpp:25:
Marlin\src\feature\touch\xpt2046.cpp: In static member function 'static void XPT2046::init()':
Marlin\src\feature\touch\xpt2046.cpp:40:26: error: 'CS_PIN' was not declared in this scope
#define TOUCH_CS_PIN CS_PIN
^
Marlin\src\feature\touch../../inc/../HAL/./HAL_STM32F1/fastio.h:37:53: note: in definition of macro '_SET_MODE'
#define _SET_MODE(IO,M) gpio_set_mode(PIN_MAP[IO].gpio_device, PIN_MAP[IO].gpio_bit, M)
^~
Marlin\src\feature\touch../../inc/../HAL/./HAL_STM32F1/fastio.h:41:35: note: in expansion of macro '_SET_OUTPUT'
#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
^~~~~~~~~~~
Marlin\src\feature\touch\xpt2046.cpp:50:3: note: in expansion of macro 'OUT_WRITE'
OUT_WRITE(TOUCH_CS_PIN, HIGH);
^~~~~~~~~
Marlin\src\feature\touch\xpt2046.cpp:50:13: note: in expansion of macro 'TOUCH_CS_PIN'
OUT_WRITE(TOUCH_CS_PIN, HIGH);
^~~~~~~~~~~~
Marlin\src\feature\touch\xpt2046.cpp:40:26: note: suggested alternative: 'SS_PIN'
#define TOUCH_CS_PIN CS_PIN
^
Marlin\src\feature\touch../../inc/../HAL/./HAL_STM32F1/fastio.h:37:53: note: in definition of macro '_SET_MODE'
#define _SET_MODE(IO,M) gpio_set_mode(PIN_MAP[IO].gpio_device, PIN_MAP[IO].gpio_bit, M)
^~
Marlin\src\feature\touch../../inc/../HAL/./HAL_STM32F1/fastio.h:41:35: note: in expansion of macro '_SET_OUTPUT'
#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
^~~~~~~~~~~
Marlin\src\feature\touch\xpt2046.cpp:50:3: note: in expansion of macro 'OUT_WRITE'
OUT_WRITE(TOUCH_CS_PIN, HIGH);
^~~~~~~~~
Marlin\src\feature\touch\xpt2046.cpp:50:13: note: in expansion of macro 'TOUCH_CS_PIN'
OUT_WRITE(TOUCH_CS_PIN, HIGH);
^~~~~~~~~~~~
Marlin\src\feature\touch\xpt2046.cpp: In static member function 'static uint16_t XPT2046::getInTouch(XPTCoordinate)':
Marlin\src\feature\touch\xpt2046.cpp:40:26: error: 'CS_PIN' was not declared in this scope
#define TOUCH_CS_PIN CS_PIN
^
Marlin\src\feature\touch../../inc/../HAL/./HAL_STM32F1/fastio.h:37:53: note: in definition of macro '_SET_MODE'
#define _SET_MODE(IO,M) gpio_set_mode(PIN_MAP[IO].gpio_device, PIN_MAP[IO].gpio_bit, M)
^~
Marlin\src\feature\touch../../inc/../HAL/./HAL_STM32F1/fastio.h:41:35: note: in expansion of macro '_SET_OUTPUT'
#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
^~~~~~~~~~~
Marlin\src\feature\touch\xpt2046.cpp:103:3: note: in expansion of macro 'OUT_WRITE'
OUT_WRITE(TOUCH_CS_PIN, LOW);
^~~~~~~~~
Marlin\src\feature\touch\xpt2046.cpp:103:13: note: in expansion of macro 'TOUCH_CS_PIN'
OUT_WRITE(TOUCH_CS_PIN, LOW);
^~~~~~~~~~~~
Marlin\src\feature\touch\xpt2046.cpp:40:26: note: suggested alternative: 'SS_PIN'
#define TOUCH_CS_PIN CS_PIN
^
Marlin\src\feature\touch../../inc/../HAL/./HAL_STM32F1/fastio.h:37:53: note: in definition of macro '_SET_MODE'
#define _SET_MODE(IO,M) gpio_set_mode(PIN_MAP[IO].gpio_device, PIN_MAP[IO].gpio_bit, M)
^~
Marlin\src\feature\touch../../inc/../HAL/./HAL_STM32F1/fastio.h:41:35: note: in expansion of macro '_SET_OUTPUT'
#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
^~~~~~~~~~~
Marlin\src\feature\touch\xpt2046.cpp:103:3: note: in expansion of macro 'OUT_WRITE'
OUT_WRITE(TOUCH_CS_PIN, LOW);
^~~~~~~~~
Marlin\src\feature\touch\xpt2046.cpp:103:13: note: in expansion of macro 'TOUCH_CS_PIN'
OUT_WRITE(TOUCH_CS_PIN, LOW);
^~~~~~~~~~~~
In file included from Marlin\src\feature\touch../../inc/../HAL/./HAL_STM32F1/HAL.h:36:0,
from Marlin\src\feature\touch../../inc/../HAL/HAL.h:26,
from Marlin\src\feature\touch../../inc/MarlinConfig.h:30,
from Marlin\src\feature\touch\xpt2046.cpp:25:
Marlin\src\feature\touch\xpt2046.cpp:40:26: error: 'CS_PIN' was not declared in this scope
#define TOUCH_CS_PIN CS_PIN
^
Marlin\src\feature\touch../../inc/../HAL/./HAL_STM32F1/fastio.h:33:40: note: in definition of macro 'WRITE'
#define WRITE(IO,V) (PIN_MAP[IO].gpio_device->regs->BSRR = (1U << PIN_MAP[IO].gpio_bit) << ((V) ? 0 : 16))
^~
Marlin\src\feature\touch\xpt2046.cpp:123:9: note: in expansion of macro 'TOUCH_CS_PIN'
WRITE(TOUCH_CS_PIN, HIGH);
^~~~~~~~~~~~
Marlin\src\feature\touch\xpt2046.cpp:40:26: note: suggested alternative: 'SS_PIN'
#define TOUCH_CS_PIN CS_PIN
^
Marlin\src\feature\touch../../inc/../HAL/./HAL_STM32F1/fastio.h:33:40: note: in definition of macro 'WRITE'
#define WRITE(IO,V) (PIN_MAP[IO].gpio_device->regs->BSRR = (1U << PIN_MAP[IO].gpio_bit) << ((V) ? 0 : 16))
^~
Marlin\src\feature\touch\xpt2046.cpp:123:9: note: in expansion of macro 'TOUCH_CS_PIN'
WRITE(TOUCH_CS_PIN, HIGH);
^~~~~~~~~~~~
*** [.pio\build\mks_robin\src\src\feature\touch\xpt2046.cpp.o] Error 1
I can not find the solution !
here the file i use
Marlin-2.0.x.zip
The text was updated successfully, but these errors were encountered: