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

MKS_LCD12864B and MKS_MINI_12864 Linking error on ESP32 (MKS Tinybee) #24021

Closed
jesterhead82 opened this issue Apr 10, 2022 · 8 comments
Closed

Comments

@jesterhead82
Copy link
Contributor

jesterhead82 commented Apr 10, 2022

Happens with todays (2022/04/10) 2.0X-Bugfix, does compile e.g. with
MKS_MINI_12864_V3

but not with either

#define MKS_LCD12864B    (<Triggers also MKS_MINI_12864) or
#define MKS_MINI_12864

Linking error:

.pio/build/mks_tinybee/src/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp.o:(.data.u8g_dev_uc1701_mini12864_HAL_2x_hw_spi+0x8): undefined reference to `u8g_eps_hw_spi_fn(_u8g_t*, unsigned char, unsigned char, void*)'

I dont know so much of this stuff, but:

ESP32 u8g_esp32_spi.cpp:

#include "../../inc/MarlinConfigPre.h"

#if ENABLED(FYSETC_MINI_12864_2_1)    <--- is this correct?
#include <U8glib-HAL.h>
#include "Arduino.h"

Originally posted by @jesterhead82 in #23776 (comment)

@ellensp
Copy link
Contributor

ellensp commented Apr 11, 2022

MKS marlin fork has (original source of the code)
#if ANY(MKS_MINI_12864, MKS_MINI_12864_V3)

Marlin has
#if ENABLED(FYSETC_MINI_12864_2_1)

As the MKS_MINI_12864_V3 has an identical display the BTT_MINI_12864_V1 so both should work. Ie

// MKS_MINI_12864_V3 and BTT_MINI_12864_V1 are identical to FYSETC_MINI_12864_2_1
#if EITHER(MKS_MINI_12864_V3, BTT_MINI_12864_V1)
  #define FYSETC_MINI_12864_2_1
#endif

So the code in marlin should be

#if ANY(MKS_MINI_12864, FYSETC_MINI_12864_2_1)

@thisiskeithb
Copy link
Member

So the code in marlin should be
#if ANY(MKS_MINI_12864, FYSETC_MINI_12864_2_1)

The standard MKS Mini 12864 is very different than the newer “mini” 12864s and does not use neopixels as a backlight, so this will need some checking.

@thinkyhead
Copy link
Member

It compiles fine for me.

Please test the bugfix-2.0.x branch to see where it stands. If the problem has been resolved then we can close this issue. If the issue isn't resolved yet, then we should investigate further.

@jesterhead82
Copy link
Contributor Author

Hello,

does only compile with todays bugfix for a MKS_MINI_12864 or MKS_LCD12864B if I apply proposed change from ellensp

So in

u8g_esp32_spi.cpp:

from
#if ENABLED(FYSETC_MINI_12864_2_1)

to
#if ANY(MKS_MINI_12864, FYSETC_MINI_12864_2_1)

@thisiskeithb
Copy link
Member

The regular MKS Mini (V1 and V2) does not use neopixels, so grouping it with the V3 (FYSETC_MINI_12864_2_1 in our case) will enable options it doesn’t have.

@ellensp
Copy link
Contributor

ellensp commented Apr 23, 2022

@thisiskeithb this '#if ANY(MKS_MINI_12864, FYSETC_MINI_12864_2_1)' is a enable/disable for all code in Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp

Ie the SPI communications side only.

It has nothing to do with if it has neopixels or not

@ellensp
Copy link
Contributor

ellensp commented Apr 23, 2022

Pr created.

@ellensp ellensp closed this as completed Apr 23, 2022
@github-actions
Copy link

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 Jun 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants