makerbase-mks / MKS-SGEN_L-V2

MKS SGEN_L V2.0 is powerful 32-bit 3D printer control board. The CPU is LPC1769 120MHZ, SGEN_L V2 hardware Integrated 4KB EEPROM, 5AXIS and dual Z interface, has 2 way FANs and Dc12/24V out interface, support TMC UART and SPI mode...
https://www.aliexpress.com/item/4001283346331.html?spm=a2g0o.store_home.slider_165457030.0
GNU General Public License v3.0
71 stars 28 forks source link

Compile problem with eeprom. #31

Closed detroitpowa closed 3 years ago

detroitpowa commented 3 years ago

When i used the "define EEPROM_SETTINGS" i all time got error with tmc2209 motor drivers, when the "#define X_DRIVER_TYPE TMC2209" is not active i can compile it, but with motor drivers i don't. What is the problem? Or is that not necessary to use?

Linking .pio/build/LPC1769/firmware.elf /home/detro/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: region RAM overflowed with stack collect2: error: ld returned 1 exit status *** [.pio/build/LPC1769/firmware.elf] Error 1

mks-viva commented 3 years ago

Hi! Can you provide your config file to me and i will check it?

detroitpowa commented 3 years ago

Hi! Yes sure.

asd.zip

mks-viva commented 3 years ago

If you want to use EEPROM function, you need enable "#define EEPROM_SETTINGS" in Configuration.h file

detroitpowa commented 3 years ago

Yes i know, but when i enabled it, i got firmware.elf error at the compiling end.

Linking .pio/build/LPC1769/firmware.elf /home/detro/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: region RAM overflowed with stack collect2: error: ld returned 1 exit status *** [.pio/build/LPC1769/firmware.elf] Error 1

cizquierdof commented 3 years ago

I got the same

detroitpowa commented 3 years ago

I found this in an opened another issue folder.

"I think it is solved, the error appears when #define EEPROM SETTINGS is enabled and the screen is defined as #define TFT_480x320_SPI. That combination gives error, you have to choose to have eeprom settings or marlin UI.

define SPI_GRAPHICAL_TFT and #define EEPROM SETTINGS does not give a problem"

That is a good one, it is fixed for me.

mks-viva commented 3 years ago

@cizquierdof @detroitpowa So, i think your firmware can use this method

detroitpowa commented 3 years ago

The printer is under building process. I not tested yet, but the compiling process is working well with eeprom. I hope this will be good. Tomorrow i will test it.

mks-viva commented 3 years ago

@detroitpowa Ok, looking forward to your good news

detroitpowa commented 3 years ago

I tried the newest looking //#define TFT_LVGL_UI_SPI background mode, but when i compiled that, i have got some pin issues. That is complicated. Maybe in the future..

mks-viva commented 3 years ago

MKS SGEN_L doesn't support TFT_LVGL_UI_SPI(MKS UI), only support Marlin Color UI and Marlin 12864 UI

detroitpowa commented 3 years ago

Thanks for the info. :) On the web page where i bought the set (screen+board), the screen was the same like TFT_LVGL_UI_SPI, that's why i thought.

mks-viva commented 3 years ago

We will add precautions, it can only be used in Marlin Color UI and Marlin 12864 UI when you use MKS SGEN_L motherboard.

detroitpowa commented 3 years ago

I tried it with SPI_GRAPHICAL_TFT, but on the screen i got eeprom error. I switch back to TFT_480x320_SPI without eeprom. There is no problem, maybe the display can store informations, actually i don't know.

mks-viva commented 3 years ago

Maybe the marlin team did not consider using the SPI_GRAPHICAL_TFT style when doing this feature, we will continue to follow it up

ramboza commented 3 years ago

so, finally, how to compile firmware to use EPROM with TMC2208 with UART?

the way described here is not working... https://github.com/makerbase-mks/MKS-SGEN_L-V2/wiki/Drivers_MKS_TMC2225_2208

what can we disable to reduce memory usage?

mks-viva commented 3 years ago

@ramboza Hi! This is only about how to use TMC2225/2208 uart mode settings, if you use EEPROM, you need enable "#define EEPROM_SETTINGS" in configuration.h file

ramboza commented 3 years ago

@ramboza Hi! This is only about how to use TMC2225/2208 uart mode settings, if you use EEPROM, you need enable "#define EEPROM_SETTINGS" in configuration.h file

Yes, I saw it in the documentation link. I did it as described on that page! Just uncomment define for EEPROM_SETTINGS And got error ! Have you tried replicate?

How to replicate this issue: 1 - download this https://github.com/makerbase-mks/MKS-SGEN_L-V2/tree/master/Firmware/Marlin-bugfix-2.0.x-MKS%20TS35%2BSGEN_L%20V2 2 - open it in Visual Studio Code 3 - just uncomment #define EEPROM_SETTINGS it's enough. 4 - compile it, and you will see the error "...region RAM overflowed with stack"

Please, try it!

mks-viva commented 3 years ago

@ramboza Hi! I has test it. You need change a parameter in pins_MKS_SGEN_L_V2.h file

define TFT_BUFFER_SIZE 2400 change it to #define TFT_BUFFER_SIZE 1200

image

ramboza commented 3 years ago

Awesome!! it works now! Also 2000 as value is working!

can you please update wiki page, it will save a time for someone else ;)

Thanks!

mks-viva commented 3 years ago

@ramboza I will update pins_MKS_SGEN_L_V2.h file image