Geeetech3D/Diagram

Marlin 2.x Support for the GTM32 mini and pro boards

redangel1984 opened this issue · 107 comments

It would be great if these two open source boards could support Marlin 2.x 32bit version.
I have no idea of coding. But this would be awesome if Geeetech or users who can code would make Marlin 2.x to be compatible with the GTM32 boards. So much possibilities and features would open up for the users and also for Marlin.
I’ve seen this issue posted on the Smartto firmware repository which in my opinion would belong here, it is not a firmware issue/feature but more like a hardware issue.

I totally agree with you. If we can install Marlin in our boards I’m sure that the community and contribution will grow up a lot. Please take this on count, I think it’s the best improvement.

@redangel1984 @monrra We are rewritting smartto-eclipse(reconstruct, complete command, fix bug etc.) It may take one or two months and then we will start discussion on marlin 2.x. We still not sure how many people would like to use marlin in these boards. Is it worth to do that? The issue need more research and supporter.

Hi @alexwoo1900. I dont know if @redangel1984 thinks like me, but I really think that almost everyone prefer Marlin for being an open source reliable firmware since a lot of time ago. In fact, you just need to look for other printers with Marlin, people are very happy with it.

@alexwoo1900
I am sure If you make Marin available for this printer and board more people will use it on Marlin than on Smartto.
And I am sure too that it you won’t make Smartto stable and improve it, you will loose current and future customers. Because as for now to use Smartto is a pain in the @$$.

Totally agree with @redangel1984.

Hi @alexwoo1900. I think @redangel1984 is right. It would be gorgeous

At this point, I believe we'd be better served with the Marlin Firmware. My A30 is currently bricked till I get chance to downgrade the firmware etc

We need this project. Marlin Firwmare is more extended in the 3d print comunity. More functions, open code, etc... @alexwoo1900

It would be great to have Marlin Firmware for A30 @alexwoo1900

@redangel1984 @monrra @macasero @BennyBoyW @JordiKoki
Hi, guys.
We have seen your posts and votes and made a long discussion about how to deal with Marlin and Smartto a few hours ago.
That's our plan:
First and foremost, we will repush newest firmware which fixed all fatal errors in a short time.
Secondly, we will continue our development on Smartto. At the same time, we will contact with marlin team and talk about how to make Marlin support GTM32 boards.
I will share our progress about Marlin supporting in this post or facebook group.
If you already have done something about it, please let us know.

good morning, it is very interesting this proposal would be ideal to have that compatibility for our printers. I am also interested and I have two.

It would be great to have compatibility with Marlin, apart from the one we already have with smartoo, thank you very much for listening to us and wanting to improve the product.

Marlin team has no reply to us. But we had started to do transplant work.

@alexwoo1900 that’s great! With Marlin, this printer will be one of the best in the market.

Hi @alexwoo1900 . Are there any news?

2 month and still nothing?

@monrra @redangel1984 Sorry for my late reply. Our firmware team met some very tricky problems. They make all works except for bootloader and SD card part. (The main dev is working on the latter). The market team had sent some copies to some customers to test. If you guys want to join us, please contact Emma.

I would love to test it

https://pan.baidu.com/s/1r_M4g5Q644flxyVpDe85Lg
Contains the Arduino compiler and A30 marlin source code, as well as instructions for use. Currently, serial port printing is supported, and SD card printing is not supported.

Can´t register without a china phone number. Could anybody upload somewhere else?

exec: "/bin/arm-none-eabi-g++": file does not exist
Error compilando para la tarjeta Generic STM32F103V series.

any thoughts?

@macasero
In Arduino, tool->board->boards manager
Install the target board

Solved, compiled, tested.
Fan are wrong. Hotend cooling fan does not work. If try to enable with gcode you turn on and off the fan at control box. Layer fan is allways on. Seams pin mapping needs to get review.

@macasero Thanks for your feedback. Our dev has started to review the code.

Where can we get GTM32 Pro motherboard schematics?

From the link above.

Sure, it seems so, but I have 6 stepper motor slots. The above scheme shows only 4. I could examine Smartto sources for pins, but as it is supposed to be open source... The name above states, it's "mini". I have large one GTM32 PRO.

Btw, how's with Marlin 2? My super plate is ruined due to Z-offset Smartto bugs...
And where is the color-LCD-STM32F103 source code (I have latest A30)?

GTM32Pro vB?
The diagram has also been published for this version.

Yes, the vB (http://www.geeetech.com/forum/viewtopic.php?f=77&t=61307). And thanks for the scheme!

How is the review process going @alexwoo1900

Can´t register without a china phone number. Could anybody upload somewhere else?

How did you download the firmware? @macasero
Could someone possibly upload the firmware somewhere else?

@alexwoo1900 has there been any progress? I am considering the pro board but I'm not sure. I had the 12V and I do not like it. It has a lot of heat / sensor error that seem to be delays rather than misreads from thermistor. Only occasionally does it quickly give a -19, but immediately works again. Seems to be more of a data throughput type thing

Hello, I'm compiling a list of Chinese 32-bit 3D Printer boards that support Marlin 2.0. May I ask what the status is for the Geeetech GTM32 boards with Marlin 2.0?
I recently fixed a few bugs regarding fan control (recommend Software PWM in configuration.h) so that may or may not help with the fan problems from the last attempt.

How about support for the M201

if this helps anyone a30 gtm32 mini configs for marlin 2
A30.zip

S91C3 commented

I am very much interested in a Marlin 2.0 fork for the GTM32-mini/GTM32-miniS. Is anyone still working on this?

Any news?

To make the GTM32PRO_VB board work you need to remove -DSERIAL_USB flag in "## Generic STM32F103V ##" section of ~/.platformio/packages/framework-arduinoststm32-maple/STM32F1/boards.txt
I'm attaching my working copies of Configuration.h Configuration_adv.h and pins_GTM32_PRO_VB.h
Here's my platformio.ini entry for this env:

#
# Geeetech GTM_32_pro_vb (STM32F103VET6)
#
[env:gtm_32_pro_vb]
platform      = ststm32
framework     = arduino
board         = genericSTM32F103VE
monitor_speed = 250000
extra_scripts = buildroot/share/PlatformIO/scripts/gtm_32_pro_vb.py
build_flags   = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py
  ${common.build_flags} -std=gnu++14
  -DSTM32F1xx
build_unflags = -std=gnu++11 -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
lib_deps      = ${common.lib_deps}
lib_ignore    = TMC26XStepper
  libf3c
  lib066
  Adafruit NeoPixel_ID28
  Adafruit NeoPixel
  libf3e

In the other ZIP file are the scripts for this env.

Can someone talk to platformio guys and ask them to create separate entry for this board? as this board never uses native USB for programming.
I have not make it to program via serial interface so you will have to upload the firmware the normal way or use the ST GUI demonstrator tool that Geeetech tells you to use if you mess up the firmware.
I hope this will help to kickstart the development for this board so I won't be needing to compile it myself later ;)
If i forgot about something I'll add it later. Any questions? I'll try to answer them but don't expect brilliant answers >_<'
Good luck everyone!

GTM32PRO_VB.zip
buildroot.zip

To make the GTM32PRO_VB board work you need to remove -DSERIAL_USB flag in "## Generic STM32F103V ##" section of ~/.platformio/packages/framework-arduinoststm32-maple/STM32F1/boards.txt
I'm attaching my working copies of Configuration.h Configuration_adv.h and pins_GTM32_PRO_VB.h
Here's my platformio.ini entry for this env:

#
# Geeetech GTM_32_pro_vb (STM32F103VET6)
#
[env:gtm_32_pro_vb]
platform      = ststm32
framework     = arduino
board         = genericSTM32F103VE
monitor_speed = 250000
extra_scripts = buildroot/share/PlatformIO/scripts/gtm_32_pro_vb.py
build_flags   = !python Marlin/src/HAL/HAL_STM32F1/STM32F1_flag_script.py
  ${common.build_flags} -std=gnu++14
  -DSTM32F1xx
build_unflags = -std=gnu++11 -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1
src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
lib_deps      = ${common.lib_deps}
lib_ignore    = TMC26XStepper
  libf3c
  lib066
  Adafruit NeoPixel_ID28
  Adafruit NeoPixel
  libf3e

In the other ZIP file are the scripts for this env.

Can someone talk to platformio guys and ask them to create separate entry for this board? as this board never uses native USB for programming.
I have not make it to program via serial interface so you will have to upload the firmware the normal way or use the ST GUI demonstrator tool that Geeetech tells you to use if you mess up the firmware.
I hope this will help to kickstart the development for this board so I won't be needing to compile it myself later ;)
If i forgot about something I'll add it later. Any questions? I'll try to answer them but don't expect brilliant answers >_<'
Good luck everyone!

GTM32PRO_VB.zip
buildroot.zip

will this also work on the gtm32 mini s when i change the pinmapping
?

will this also work on the gtm32 mini s when i change the pinmapping ?

I haven't seen the schematic of the mini s board but if it's the same CPU and the pinmap is also touching the USB pins, this should also work.
Why don't you try and report here? ;)

will this also work on the gtm32 mini s when i change the pinmapping ?

I haven't seen the schematic of the mini s board but if it's the same CPU and the pinmap is also touching the USB pins, this should also work.
Why don't you try and report here? ;)

i tried but so far the same result as verta, hotend fan and partcooling fan are not running.
it's a pitty that i can't find any board pin maps in smartto codes
also it ignores that fact that i inverted axis in marlin

Hi Avatarsia,

Great job.

Was able to compile and load on a M201 without issue

Everything is working well except... the SD reader on the LCD
I'm using the standard 4 lines LCD2004. REPRAP_DISCOUNT_SMART_CONTROLLER

What LCD are you using and is it working on yours ?

Thank you so much

Wasn't my job.
Wich board do you use ?
In my understanding the libary for the mini s board is incomplete so it cant compiled well

I have the Mini S :)
you quote the wrong one ^^

I have the Mini S :)
you quote the wrong one ^^

Uuups correct. Sorry

To make the GTM32PRO_VB board work you need to remove -DSERIAL_USB flag in "## Generic STM32F103V ##" section of ~/.platformio/packages/framework-arduinoststm32-maple/STM32F1/boards.txt
I'm attaching my working copies of Configuration.h Configuration_adv.h and pins_GTM32_PRO_VB.h
Here's my platformio.ini entry for this env:

Hi InnerBushman

Great job.

Was able to compile and load on a M201 without issue

Everything is working well except... the SD reader on the LCD
I'm using the standard 4 lines LCD2004. REPRAP_DISCOUNT_SMART_CONTROLLER

What LCD are you using and is it working on yours ?

Thank you so much

Hi thpparent,
As you can see in my config file i also use the code for REPRAP_DISCOUNT_SMART_CONTROLLER.
I have the stock LCD/encoder/SD reader from Geeetech that seems to be based on the Discount Smart Controller, only with different ribbon cable.
The SD card seems to work ok with this config. I can start a print from the SD (haven't actually printed anything tho) and get no errors, the printer homes and starts to heat up.
What exactly isn't working? And how are you testing?

InnerBushman do you have Facebook or Discord or any way to communicate ?

InnerBushman do you have Facebook or Discord or any way to communicate ?

My discord handle: InnerBushman#4784

Hi thpparent,
As you can see in my config file i also use the code for REPRAP_DISCOUNT_SMART_CONTROLLER.
I have the stock LCD/encoder/SD reader from Geeetech that seems to be based on the Discount Smart Controller, only with different ribbon cable.
The SD card seems to work ok with this config. I can start a print from the SD (haven't actually printed anything tho) and get no errors, the printer homes and starts to heat up.
What exactly isn't working? And how are you testing?

Hi,

Thanks for your answer.

I have the feeling that something is wrong in the SD pins definition referenced above.
Card inserted / removed is detected, but result is always the same "no media".
It fail in the three case : power ON with card, Card inserted and Remotly reading card from repetier.

If you take a look to the Hardware_GTM32_PRO_VB. pdf, the connector seems to connect SPI2 (which could be the SD Interface), in the published as part of Marlin2.0, matched PIN with SD interface doesn't seem to be logic and are not following the same logic that the onboard SD interface PAx.

Coud you confirm that your working configuration is based on the following PIN definition ?

Thank you so much

  • The on-board SD card and the external card (on either SD_CARD or J2) are two
  • separate devices and can work simultaneously. Unfortunately, Marlin only supports
  • a single SPI Flash device (as of 2019-07-05) so only one is enabled here.
    */
    #if ENABLED(GTM32_PRO_VB_USE_EXT_SDCARD)
    //
    // SD Card on RepRapDiscount Smart Controller (J2) or on SD_CARD connector
    //
    #define SS_PIN PC11
    #define SCK_PIN PC12
    #define MOSI_PIN PD2
    #define MISO_PIN PC8
    #define SD_DETECT_PIN PC7
    #else
    //
    // Use the on-board card socket labeled TF_CARD_SOCKET
    //
    #define SS_PIN PA4
    #define SCK_PIN PA5
    #define MOSI_PIN PA7
    #define MISO_PIN PA6
    #define SD_DETECT_PIN -1 // Card detect is not connected
    #endif

My Facebook Account is Radagast Stufly

Thierry

to my last doument it should be like this

SDIO+DMA2 control/SPI2
D0/M1SO |
D1/D1 | PC9
D2/D2 | PC10
D3/CS | PC11
CLK/CLK | PC12
CMD/MOSI | PD2
CD/CD | PC7

to my last doument it should be like this

SDIO+DMA2 control/SPI2
D0/M1SO |
D1/D1 | PC9
D2/D2 | PC10
D3/CS | PC11
CLK/CLK | PC12
CMD/MOSI | PD2
CD/CD | PC7

Thanks, is it not specific to the GTM32 mini s ?

regarding my infos it will also be the same for the new a30M in the future, so no all the same

oh there get somethink lost
D0/M1SO | P8

To be honest, I don't recognize the format/nomenclature. Is it Marlin or RepRap ?

Thanks

copy and paste from an excel sheet ^^
name| pin

I have the feeling that something is wrong in the SD pins definition referenced above.
Coud you confirm that your working configuration is based on the following PIN definition ?
Thierry

I've just confirmed, my pinout is exactly as yours. You can look into my files I provided with my initial post. https://github.com/Geeetech3D/Diagram/files/3496221/GTM32PRO_VB.zip
To be clear: I use the SD reader on the LCD controller and not the one on the board itself but they seem to be sharing pins. The SPI2 pins you've mentioned are NOT used by the SD card reader. I think those are used for serial LCDs.
Technically if you are able to compile using my files it should work at least as good (bad) as mine does. Meaning the SD should work. I can't really explain why it would work here but not there other than maybe missing some libraries or something has changed in the code base since I've build it.

  • Bushman

Agree. Something should have changed since your successful setup.
Could be :

  • the Geeetech LCD2004 hardware (mine is the one with the white back PCB and both connectivity (2x 10 pins + 1x 40 flat)
  • Marlin 2.0 library and more specifically the one dedicated to SD

After several attempts, I confirm that refering SPI2 pin out for the external SD reader solved my issue (it works now).
pins_GTM32_PRO_VB becomes :
#if ENABLED(GTM32_PRO_VB_USE_EXT_SDCARD)
//
// SD Card on RepRapDiscount Smart Controller (J2) or on SD_CARD connector
//
#define SS_PIN PB12 / PC11
#define SCK_PIN PB13 // PC12 // PC1
#define MOSI_PIN PB15 // PD2 // PD2
#define MISO_PIN PB14 // PC8
#define SD_DETECT_PIN PC7

#else
//
// Use the on-board card socket labeled TF_CARD_SOCKET
//
#define SS_PIN PA4
#define SCK_PIN PA5
#define MOSI_PIN PA7
#define MISO_PIN PA6 // PA6
#define SD_DETECT_PIN -1 // Card detect is not connected
#endif

All files / lib and used in my config are available at : https://drive.google.com/open?id=1X8TSI6Q8rexqwbTk_WlKb63fYAuQSrKh

Did you find a way to address the 3.3V used for the temp ? (new tables ?)

Thank you for your help/support

Thierry

All files / lib and used in my config are available at : https://drive.google.com/open?id=1X8TSI6Q8rexqwbTk_WlKb63fYAuQSrKh

Please attach the files to your post. After you remove it from your google drive the link will be dead but attachment will remain.

Did you find a way to address the 3.3V used for the temp ? (new tables ?)

What do you mean? Is there some problem with temperature reading?

just to note i did basically get marlin running on the A30 E180 & M201 it needs some work but it does run on the board.

Different Problem(s) here for a Stock-Rostock 301 (GTM32 Pro VB Mainboard, LCD2004 Controller):

Compiled with files and ini-settings provided from @InnerBushman in latest PIO with ststm32@5.6.0
(BTW: InnerBushman's 'gtm_32_pro_vb.py' script uses the 'mks_robin.ld' Script, wich may or may not be intended, given that he provides a seperate 'gtm_32_pro_vb.ld' script)

I also changed build_flags = !python Marlin/src/HAL/HAL_STM32F1/build_flags_script.py
to build_flags = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py because the first one could not be found and it seemed like it is the right one...

First: with Geetech Bootloader + Marlin FW flashed to 0x08002000 --> Marlin won't start, I'll only get the bootloaders output "JumpToApp0/JumpToApp1"...

I then compiled it normally, removed the "Relocate firmware" Section from 'gtm_32_pro_vb.py' and flashed it to 0x08000000 -->Sucessfull Marlin Boot! I can home the Printer via a M28 command over a Terminal.
Screen and button rotation also works, SD-Card initialized (checked again via serial output), BUT as soon as i PRESS the button on the LCD2004 panel Marlin crashes (no LCD updates anymore, no response via Serial)...

And at this point i have no clue on how to approach this...

I tried also flashing it to 0x08000000 via BlackMagicProbe (JTAG/SWD), uploading works, but I get the same "button press" crash.

Tried to debug over PIO with a Blackmagic probe, but it won't ever get out of the "Pre-Debugging" mode and actually attach to the MCU (Blackmagic probe works, I flashed the FW to the board and use it regularily on other STM32 based projects)

Do you guys have any suggestions what could it be?

PS: with stock firmware everything works fine...
PPS: I'll keep updating this post as I went trough bringing back to life this machine in case anyone else stumbles across this...
Access Sourcecode here: https://github.com/cad435/Marlin/tree/GeeetechRostock301-bugfix2.0.x

UPDATE: I got it to work, Flashed to 0x08000000. It seems that something inside the beeper-Code is faulty... after disabling the beeper code (aka. commenting out) it runs fine.

For others wich may run into this problem: comment (or delete) the "quick_feedback()" call in "src/lcd/ultralcd.cpp" Line 820&827
You may want to disable more code because when thermistors are failing the speaker gets active too, mich may lead to a crash, but I'll have to investigate that further.

UPDATE2: As I got this machine as a gift from someone (e.g. "You can have it, I don't need it, but don't bother me with it"), I do not know if the thermistor is stock. I couldn't get any correct readings with different TempTables or generated TempTables, so I went ahead and did a full manual calibration with a thermometer and some edited gcode, made a new temptable_1001.h. It now gives me accurate readings.
Consider this new TempTable if you are using my sourcecode! It may or may not work!

I noticed that although the STM32 has a 12-Bit ADC, somehow only 10-Bits were generated (e.g. max possible value = 1023).

UPDATE3: Turns out beeper works if you undefine (e.g. comment out) #define GTM32_PRO_VB_USE_LCD_BEEPER in pins/stm32/pins_GTM32_PRO_VB.h

Also the LCD freezes when printing and pushing the button (as well as randomly freezes) while printer is still printing fine.

I fixed this after quite some debugging by changing Line 997 in lcd/ultralcd.cpp to if ((should_draw() || drawing_screen)/* && (!bbr2 || bbr2 > max_display_update_time)*/)

my thoughts are that the line above uint16_t bbr2 = planner.block_buffer_runtime() >> 1; may somehow not get a correct value in an Interrupt-context while printing, but that is only a wild guess and I didn't look further...

Hello guys,
Is it possible to use marlin on my gtm32 mini s (A30)?

Thanks

Hi everyone. I tested the current version 2.0.5.3 and my machine works great. There's only one bug I've noticed so far. If the temperature for any given thermistor is below BED_MINTEMP or HEATER_n_MINTEMP the firmware crashes with a constant beep. The error message is never sent and it no longer takes inputs from neither the encoder/button nor serial line. Did any one of you experienced such thing? Is is a bug related to this board/setup? or is it something that went wrong for Martin in general?
Cheers,
Bushman

Hi everyone. I tested the current version 2.0.5.3 and my machine works great. There's only one bug I've noticed so far. If the temperature for any given thermistor is below BED_MINTEMP or HEATER_n_MINTEMP the firmware crashes with a constant beep. The error message is never sent and it no longer takes inputs from neither the encoder/button nor serial line. Did any one of you experienced such thing? Is is a bug related to this board/setup? or is it something that went wrong for Martin in general?
Cheers,
Bushman

looks like you use a Rostock 301 only or did you try it with other ?

just to note i did basically get marlin running on the A30 E180 & M201 it needs some work but it does run on the board.
https://github.com/Vertabreak/Marlin/tree/bugfix-2.0.x

i'm trying to get marlin on my E180.

looks like you have one (i saw it on your youtube)

i try your work on mine : xyz are ok, but hotend value is wrong (temp around -4°c when room is 20)

i send you a mail, can you help ?

GTM32 Pro VB is currently working in bugfix 2.0 branch (at least for Rostock 301)

https://www.instagram.com/p/B_i8UxnjQwQ/?utm_source=ig_web_copy_link

looks like you use a Rostock 301 only or did you try it with other ?

@deennoo Yes, I only tested it with my Delta Rostock 301. I think if it compiles and runs in delta mode, there shouldn't be any problems in Cartesian?

GTM32 Pro VB is currently working in bugfix 2.0 branch (at least for Rostock 301)

@chepo92 I used trunk, not bugfix branch.

@InnerBushman the temps are corrected in marlin, my branch https://github.com/chepo92/Marlin/tree/GTM32-2020, you have to add and use thermistor 22
It's pending of PRed to marlin, testers are needed

@chepo92 I have an aftermarket no-name hot-end with an unidentified thermistor. I plotted it's characteristics and it is under 8°C difference on the hot side of the plot and fairly co-linear with type 5. So no worries there, I can mentally adjust for that when setting up the print.
What I AM worried about tho is the low temp. alarm crashing the firmware. I tried both, the beeper pin on the main board and the pin on the controller board. No difference, so I'm assuming there's nothing wrong with the beepers as they both DO beep on key press. Something's broken in temperature alarm and i don't know how to track it.

PS: how do you upload the firmware right now? i still use the external tool from ST.

@chepo92 I have an aftermarket no-name hot-end with an unidentified thermistor. I plotted it's characteristics and it is under 8°C difference on the hot side of the plot and fairly co-linear with type 5. So no worries there, I can mentally adjust for that when setting up the print.
What I AM worried about tho is the low temp. alarm crashing the firmware. I tried both, the beeper pin on the main board and the pin on the controller board. No difference, so I'm assuming there's nothing wrong with the beepers as they both DO beep on key press. Something's broken in temperature alarm and i don't know how to track it.

PS: how do you upload the firmware right now? i still use the external tool from ST.

By default Min temps error triggers with the defined min temp in configuration.h (I think default is 5ºC) when I was debugging and creating the termistor table I disabled thermal runaways protection and defined the min temp as -25 (or any lower than the reported by your printer, mine was -15ºC and room was at 20º )

I still use ST link to upload, no problem with that, because I hate when Arduino / PIO uploads it erases the hex/bin every time (and takes a bunch of time to make checks, just to output the same file), even if there where no changes in code. So I make a copy of the output bin and put it in safe place.

looks like you use a Rostock 301 only or did you try it with other ?

@deennoo Yes, I only tested it with my Delta Rostock 301. I think if it compiles and runs in delta mode, there shouldn't be any problems in Cartesian?

GTM32 Pro VB is currently working in bugfix 2.0 branch (at least for Rostock 301)

@chepo92 I used trunk, not bugfix branch.

Did you manage to get fan / extruder working ?

I i get a working marlin from Verta but fan and extruder doesn't working

@chepo92 I have an aftermarket no-name hot-end with an unidentified thermistor. I plotted it's characteristics and it is under 8°C difference on the hot side of the plot and fairly co-linear with type 5. So no worries there, I can mentally adjust for that when setting up the print.
What I AM worried about tho is the low temp. alarm crashing the firmware. I tried both, the beeper pin on the main board and the pin on the controller board. No difference, so I'm assuming there's nothing wrong with the beepers as they both DO beep on key press. Something's broken in temperature alarm and i don't know how to track it.

PS: how do you upload the firmware right now? i still use the external tool from ST.

looks like you use a Rostock 301 only or did you try it with other ?

@deennoo Yes, I only tested it with my Delta Rostock 301. I think if it compiles and runs in delta mode, there shouldn't be any problems in Cartesian?

GTM32 Pro VB is currently working in bugfix 2.0 branch (at least for Rostock 301)

@chepo92 I used trunk, not bugfix branch.

Did you manage to get fan / extruder working ?

I i get a working marlin from Verta but fan and extruder doesn't working

I have the three extruders motor working (even in mixing mode, 1 2 and 3 at same time).

Just tested fans, weird behaviour. I only see in the menu Fan2 and Fan3, when I push to select Fan2, LCD says Fan3, and I can set it, fan spins (but I think not the suposed one), If I click Fan3, LCD says Fan3, and set speed, the same fan as before spins, so there must be an LCD problem added to pin definition problem or something in the midle. I'll bring some gcode and pin debugging enabled to squash some bugs.

looks like you use a Rostock 301 only or did you try it with other ?

@deennoo Yes, I only tested it with my Delta Rostock 301. I think if it compiles and runs in delta mode, there shouldn't be any problems in Cartesian?

GTM32 Pro VB is currently working in bugfix 2.0 branch (at least for Rostock 301)

@chepo92 I used trunk, not bugfix branch.

Did you manage to get fan / extruder working ?
I i get a working marlin from Verta but fan and extruder doesn't working

I have the three extruders motor working (even in mixing mode, 1 2 and 3 at same time).

Just tested fans, weird behaviour. I only see in the menu Fan2 and Fan3, when I push to select Fan2, LCD says Fan3, and I can set it, fan spins (but I think not the suposed one), If I click Fan3, LCD says Fan3, and set speed, the same fan as before spins, so there must be an LCD problem added to pin definition problem or something in the midle. I'll bring some gcode and pin debugging enabled to squash some bugs.

On m'y borad i have 4 fan :
1 fan case plug to fan0 (and fan1 they are drive the same way)
1 under extuder motor
1 on hot end
1 for cooling

Will test later which on Can be drive by Geeetech Fw.

For those who want try marlin and getback to Geeetech Fw :

Put board on boot0

Plug USB and start STM Flash Loader Demonstrator.

Then select : write to file, put a name and .bon ext and choose all memory adresse then next.

It will dump all the board memory and your able to restore it.

Tried to flash marlin on my E180 using configuration from https://github.com/MarlinFirmware/Configurations/tree/release-2.0.5/config/examples/Geeetech/E180 via:

$ platformio run --target upload -e STM32F103VE_GTM32

So far fans are not working, lcd/sd card also not working, hotend room temperature is reported incorrectly (room ~23C, reported 3C).

I also noticed that according https://github.com/MarlinFirmware/Marlin/blob/015c4e6fbdd28f5c4cb5fc987d4f4ae513b1c13d/Marlin/src/pins/pins.h#L482 I need to select STM32F103RE environment, though then uploaded Marlin will not work.

Did anyone manage to run Marlin on E180?

Working Klipper config for E180:
printer.cfg.zip

marlin is running on my E180/A30/GTM32 pro VD board i have laying around.

Good morning,
Someone kind who can explain the steps to update marlin into the GMT32_mini_s? never mind if is with arduino ide or vscode with platformio.

With vsCode/platformio and marlin 2.0.8.1 for example, after compiling correctly
-Upload directly from VsCode with "Auto build marlin" fail.
-Upload directly from VsCode with "Autobuild marlin" and jumper on BootOn(board) fail.
-Save the .bin to a sd card formatted on fat fail.
-Save the .bin to a sd card formatted on fat fail with jumper on BootOn(Board) fail.
-Using the flash firmware program from geeetech fail(the program hangs with the .bin)

The usb cable works, because if i use the smartto program to connect to the E180 i can change the parameters.

Hi @ldiegos,
I believe what you are looking for is here:
https://www.geeetech.com/forum/viewtopic.php?f=20&t=60425#p81311
I'm using the ST Flash demo tool myself to program my printer ;) There's only one catch: you need to know the entry point of your firmware and upload it accordingly. I suggest you try 8002000h like in the tutorial. If that doesn't work, you'll need to figure out your compilation's entry address. Please remember that flashing your firmware anywhere higher than 8002000h WILL overwrite Geeetech's boot-loader code and you won't be able to use factory flashing method until you restore it with ST flash tool.
If you have any additional questions, don't hesitate to ask :)

####EDIT####
I might have jumped the guns. Your board is GMT32_mini_s. I do not know if the procedure is 100% compatible. Please use your best judgment before attempting any of the steps in the tutorial posted above.

@InnerBushman thank you so much, yes this is a GMT32_mini_s , i will use your tutorial and if i brick it, don't worry.
The fact is that i hate the smartto, so i rather prefer to brick it trying to install marlin than continue with it as is.
Again, thank you so much in advance
Luis.

Good morning,
Someone kind who can explain the steps to update marlin into the GMT32_mini_s? never mind if is with arduino ide or vscode with platformio.

With vsCode/platformio and marlin 2.0.8.1 for example, after compiling correctly
-Upload directly from VsCode with "Auto build marlin" fail.
-Upload directly from VsCode with "Autobuild marlin" and jumper on BootOn(board) fail.
-Save the .bin to a sd card formatted on fat fail.
-Save the .bin to a sd card formatted on fat fail with jumper on BootOn(Board) fail.
-Using the flash firmware program from geeetech fail(the program hangs with the .bin)

The usb cable works, because if i use the smartto program to connect to the E180 i can change the parameters.

Funny I tried flashing Marlin on my A30 with GMT32_mini_s board as well today.
For me your described attempts didn't work either.
So I thought I should try flashing the firmware generated by platform io with my stlink v2.
Well it did flash from platformios interface. But after that nothing worked anymore. I'm not sure to which addresses platform io wrote so I can't tell if the boot loader is gone.

From reading the geeetech forum the bootloader should be located At 8000000 and the firmware At 8002000 for the pro boards. As they seem to use the same stm32 I guess this should work for the mini boards aswell.

could you please backup your current firmware with bootloader so we can compare it?

My next try will be flashing the bootloader and the marlin at the given addresses of the pro board and see if that works.

So some news concerning the GTM 32 Mini S Board:
Flashing the Marlin 2.0.8.1 at 8000000 works now. I don't know why it didn't yesterday.
Marlin boots and the following apears in the Terminal of Octorprint when it's trying to connect:

Changing monitoring state from "Offline" to "Detecting serial connection"
Performing autodetection with 1 port/baudrate candidates: /dev/ttyUSB0@115200
Trying port /dev/ttyUSB0, baudrate 115200
Connecting to port /dev/ttyUSB0, baudrate 115200
Handshake attempt #1 with timeout 2.0s
Connected to: Serial<id=0x6cd40d30, open=True>(port='/dev/ttyUSB0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=2.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
Send: N0 M110 N0125
Recv: start
Changing monitoring state from "Detecting serial connection" to "Operational"
Recv: PowerUp
Recv: Marlin 2.0.8.1
Recv:
Recv: echo: Last Updated: 2021-05-15 | Author: (none, default config)
Send: N0 M110 N0
125
Communication timeout while idle, trying to trigger response from printer. Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves.
Send: N1 M11539
Communication timeout while idle, trying to trigger response from printer. Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves.
Send: N2 M21
18
No response from printer after 3 consecutive communication timeouts, considering it dead. Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves.
Changing monitoring state from "Operational" to "Offline after error"
Connection closed, closing down monitor

After 3 connection attempts it closes the connection. Also nothing can be controlled.
I think it could be a problem with Octoprint, but pronterface or similar don't show any information either.
Maybe the compiled binary includes faults? I used the pin_GTM32_MINI.h and the pin_GTM32_MINI_A30.h. What else could be a problem?

Conclusion:

  • flashing of the marlin binary works if flashed without geeetech bootloader and at 8000000
  • Marlin shows up in Octoprint but disconnects

I had the same problem with my A30T (same board?). Flashing worked, got some output from Marlin, but then connection is lost (Repetier Server). I guess something in the config is not right, but I haven’t found the time to investigate, yet.

What config could lead to this reproducible connection loss?
I thought die custom configs in the config repos A30 folder should have all settings (except the motor driver) preset?

I feel like we are very close to finding the issue and make the GTM32 Mini work but at the moment I don't have an idea.

Offtopic concerning going back to stock firmware as a quick fix until marlin works for the GTM32 Mini:
I managed to flash back the original firmware (adress 8002000) and bootloader (adress 8000000) and update it via the Smartto Upgrador. This works at least but I haven't fully tested the Firmware 1.39.62 during a print.

I give up, i threw it to the trash and bought a bigtreetech Skr1.4Turbo with a TFT35 v3 and them are working since the beginning. Not to mention that everything inside the E180 is fully geeetech custom and nothing works as any other standard printers, so i had to redo all the cableling.

Don't waste your time... buy another board.

I was close to giving up but I tried it one more time.
This time with a freshly compiled version 2.0.9.1 of marlin.
I don't know what changed but it works. The connection is stable and I can control X and Z Axis without problems.
Only the Y Axis and the extruder are not working. I checked for misconfigured pins in the gtm32 mini a30 config but everything seems to be ok. I even checked if pins on the microcontroller are broken but everything works with a test program, but as soon as marlin is flashed the Step/Dir pins of the stepper driver seem not to work (600mV constantly, no matter if step command is executed or not, by the way I use TMC2008 drivers but should be the same with others.

Now I'm even more confused and motivated. It can't be much but where should I keep on searching.
My problem is that the GTM32 Mini is a normal STM32 based mainboard. There is no reason it shouldn't work so I can't accept that. Would be great if we could discuss on this topic and some feedback is given. I'll keep on posting my results as I think a lot of A30 owners would like to use marlin ...

I was close to giving up but I tried it one more time. This time with a freshly compiled version 2.0.9.1 of marlin. I don't know what changed but it works. The connection is stable and I can control X and Z Axis without problems. Only the Y Axis and the extruder are not working. I checked for misconfigured pins in the gtm32 mini a30 config but everything seems to be ok. I even checked if pins on the microcontroller are broken but everything works with a test program, but as soon as marlin is flashed the Step/Dir pins of the stepper driver seem not to work (600mV constantly, no matter if step command is executed or not, by the way I use TMC2008 drivers but should be the same with others.

Now I'm even more confused and motivated. It can't be much but where should I keep on searching. My problem is that the GTM32 Mini is a normal STM32 based mainboard. There is no reason it shouldn't work so I can't accept that. Would be great if we could discuss on this topic and some feedback is given. I'll keep on posting my results as I think a lot of A30 owners would like to use marlin ...

Hello,

i am running an A30 with the "GTM32 Pro VD" Board with bugfix tree . i got almost all things to working but i need more testing:
-BLtouch is working
-Beeper is working
-x,y,z and extruder axis is working
-SD Card is not working
-Serial Connection is limited because of following hotfix for y-axis
-fans are working but are buged (maybe a hardware problem of my a30)

According the y-Axis i run in the same problem but i could resolve it:

MarlinCore.cpp needs one modification at the end of the setup(). Add a line with:
Serial.end();

I dont think its a good idea to do this here but its working. The point is that my boad is using PA12 for some serial stuff. i dont know why. But this pin is in use for the y-axis

EDIT:

And yes i had the same problem with the extruder. There are couple of things wrong in the pinmapping for my board. the EXTRUDER E0 E1 E2 are party mixed up. And the z_min_pin and z_max_pin was swapped for me too:

here is my mapping for my board GTM32 Pro VD:


#pragma once

#include "env_validate.h"

#ifndef BOARD_INFO_NAME
  #define BOARD_INFO_NAME    "GTM32 Pro VB"
#endif
#define DEFAULT_MACHINE_NAME "STM32F103VET6"

#define BOARD_NO_NATIVE_USB

#define DISABLE_DEBUG

//
// It is required to disable JTAG function because its pins are
// used as GPIO to drive the Y axis stepper.
// DO NOT ENABLE!
//
#define DISABLE_JTAG

//
// If you don't need the SWDIO functionality (any more), you may
// disable SWD here to regain PA13/PA14 pins for other use.
//
#define DISABLE_JTAGSWD

// Ignore temp readings during development.
#define BOGUS_TEMPERATURE_GRACE_PERIOD    2000

// Enable EEPROM Emulation for this board as it doesn't have EEPROM
#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
  #define FLASH_EEPROM_EMULATION
  #define MARLIN_EEPROM_SIZE              0x1000  // 4KB
#endif

//
// Limit Switches
//
#define X_MIN_PIN                           PE5   // ENDSTOPS 15,17
#define X_MAX_PIN                           PE4   // ENDSTOPS 16,18
#define Y_MIN_PIN                           PE3   // ENDSTOPS 9,11
#define Y_MAX_PIN                           PE2   // ENDSTOPS 10,12
#define Z_MIN_PIN                           PE0   // ENDSTOPS 3,5
#define Z_MAX_PIN                           PE1   // ENDSTOPS 4,6                          

//
// Steppers
//
#define X_STEP_PIN                          PC6
#define X_DIR_PIN                           PD13
#define X_ENABLE_PIN                        PA8

#define Y_STEP_PIN                          PA12
#define Y_DIR_PIN                           PA11
#define Y_ENABLE_PIN                        PA15

#define Z_STEP_PIN                          PD6
#define Z_DIR_PIN                           PD3
#define Z_ENABLE_PIN                        PB3

// Extruder stepper pins
// NOTE: Numbering here is made according to EXT connector numbers,
//       the FANx_PWM line numbering in the schematics is reverse.
//       That is, E0_*_PIN are the E2_* lines connected to E2_A1 step
//       stick that drives the EXT0 output on the board.
//
#define Z2_STEP_PIN                         PC14
#define Z2_DIR_PIN                          PC13
#define Z2_ENABLE_PIN                       PC15

// #define E0_STEP_PIN                         PA0
// #define E0_DIR_PIN                          PB6
// #define E0_ENABLE_PIN                       PA1

#define E0_STEP_PIN                         PB2
#define E0_DIR_PIN                          PB11
#define E0_ENABLE_PIN                       PC4

//
// Heaters / Fans
//
#define SERVO0_PIN                          PA0

#define HEATER_0_PIN                        PB0   // EXT0 port
// #define HEATER_1_PIN                        PB5   // EXT1 port
// #define HEATER_2_PIN                        PB4   // EXT2 port
#define HEATER_BED_PIN                      PB1   // CON2X3 hotbed port

//
// These are FAN PWM pins on EXT0..EXT2 connectors.
//
//#define FAN_PIN                           PB9   // EXT0 port
#define FAN1_PIN                            PB8   // EXT1 port
#define FAN2_PIN                            PB7   // EXT2 port

#ifndef E0_AUTO_FAN_PIN
  #define E0_AUTO_FAN_PIN                   PB9   // EXT0 port, used as main extruder fan
#endif

//
// Temperature Sensors
//
#define TEMP_0_PIN                          PC2   // EXT0 port
#define TEMP_1_PIN                          PC1   // EXT1 port
#define TEMP_2_PIN                          PC0   // EXT2 port
#define TEMP_BED_PIN                        PC3   // CON2X3 hotbed port

//
// Misc. Functions
//
#define LED_PWM                             PD12  // External LED, pin 2 on LED labeled connector

//
// LCD / Controller
//
#if HAS_WIRED_LCD

  #if IS_RRD_SC
    //
    // LCD display on J2 FFC40
    // Geeetech's LCD2004A Control Panel is very much like
    // RepRapDiscount Smart Controller, but adds an FFC40 connector
    //
    #define LCD_PINS_RS                     PE6   // CS chip select /SS chip slave select
    #define LCD_PINS_ENABLE                 PE14  // SID (MOSI)
    #define LCD_PINS_D4                     PD8   // SCK (CLK) clock
    #define LCD_PINS_D5                     PD9
    #define LCD_PINS_D6                     PD10
    #define LCD_PINS_D7                     PE15

  #else
    //
    // Serial LCDs can be implemented in ExtUI
    //
    //#define LCD_UART_TX                   PD8
    //#define LCD_UART_RX                   PD9
  #endif

  // Alter timing for graphical display
  #if ENABLED(U8GLIB_ST7920)
    #define BOARD_ST7920_DELAY_1   DELAY_NS( 96)
    #define BOARD_ST7920_DELAY_2   DELAY_NS( 48)
    #define BOARD_ST7920_DELAY_3   DELAY_NS(715)
  #endif

#endif // HAS_WIRED_LCD

#if IS_RRD_SC
  //
  // Geeetech's LCD2004A Control Panel is very much like
  // RepRapDiscount Smart Controller, but adds an FFC40 connector
  // connected with a flat wire to J2 connector on the board.
  //
  #define BTN_EN1                           PE8
  #define BTN_EN2                           PE9
  #define BTN_ENC                           PE13

  // #define GTM32_PRO_VB_USE_LCD_BEEPER
  #define GTM32_PRO_VB_USE_EXT_SDCARD
#endif

//
// Beeper
//
#ifdef GTM32_PRO_VB_USE_LCD_BEEPER
  // This is pin 32 on J2 FFC40 and pin, goes to the beeper
  // on Geeetech's version of RepRapDiscount Smart Controller
  // (e.g. on Rostock 301)
  #define BEEPER_PIN                        PE12
#else
  // This is the beeper on the board itself
  #define BEEPER_PIN                        PB10
#endif

/**
 * The on-board TF_CARD_SOCKET microSD card socket has no SD Detect pin wired.
 *
 * The FFC10 (SD_CARD) connector has the same pins as those routed to the FFC40 (J2)
 * connector, which usually go to the SD Card slot on the Geeetech version of the
 * RepRapDiscount Smart Controller. Both connectors have the card detect signal.
 *
 * The on-board SD card and the external card (on either SD_CARD or J2) are two
 * separate devices and can work simultaneously. Unfortunately, Marlin only supports
 * a single SPI Flash device (as of 2019-07-05) so only one is enabled here.
 */
#if ENABLED(GTM32_PRO_VB_USE_EXT_SDCARD)
  //
  // SD Card on RepRapDiscount Smart Controller (J2) or on SD_CARD connector
  //

// #define SS_PIN PB12 // PC<<<11
// #define SCK_PIN PB13 // PC12 // PC1
// #define MOSI_PIN PB15 // PD2 // PD2
// #define MISO_PIN PB14 // PC8
// #define SD_DETECT_PIN PC7

  #define SD_SS_PIN                         PC11
  #define SD_SCK_PIN                        PC12
  #define SD_MOSI_PIN                       PD2
  #define SD_MISO_PIN                       PC8
  #define SD_DETECT_PIN                     PC7
#else
  //
  // Use the on-board card socket labeled TF_CARD_SOCKET
  //
  #define SD_SS_PIN                         PA4
  #define SD_SCK_PIN                        PA5
  #define SD_MOSI_PIN                       PA7
  #define SD_MISO_PIN                       PA6
  #define SD_DETECT_PIN                     -1    // Card detect is not connected
#endif

#define SDSS                           SD_SS_PIN

//
// ESP WiFi can be soldered to J9 connector which is wired to USART2.
// Must define WIFISUPPORT in Configuration.h for the printer.
//
#define ESP_WIFI_MODULE_COM                    2
#define ESP_WIFI_MODULE_BAUDRATE          115200
#define ESP_WIFI_MODULE_RESET_PIN           -1


That sounds very interesting. I will try the hotfix and will check the pin mapping again.
I think we can make this work :)

That sounds very interesting. I will try the hotfix and will check the pin mapping again. I think we can make this work :)

In Addition: i think i have a misstake in my mapping according the names of the FAN (or FAN0)

EDIT:1 I have some wiring problems (loose contact). I think my setup is working from the software side
EDIT:2 Got it working now. The crashes had nothing to do with the software. Last thing missing now is the sdcard

Is your connection to octoprint stable?
I think this would be enough as printing would be fully possible at that stage.

Is your connection to octoprint stable? I think this would be enough as printing would be fully possible at that stage.

I could not test very much yet but yes. it looks very very good to me.
i forked marlin into an new branch (if you interested for more informations)
Marlin GTM32ProVD

furthermore i have switched to Marlin 2.0.9.2

It works on my GTM32 Mini as well.
Only the fans don't spin ... I need to recheck the pins on that. But Y Axis and extruder are working fine after inverting the directions.
Heating, limit switches work too.

So only fans left if I didn't miss something.
Octoprint is also stable. No problems so far.

It works on my GTM32 Mini as well. Only the fans don't spin ... I need to recheck the pins on that. But Y Axis and extruder are working fine after inverting the directions. Heating, limit switches work too.

So only fans left if I didn't miss something. Octoprint is also stable. No problems so far.

And maybe have a look at the labeling in the mapping. im not sure if its FAN or FAN0. Furthermore and i dont know for what E0_AUTO_FAN PIN ist for.
(i am pretty new to marlin settings)

Ok fans are working now (for GTM32 Mini S Mainboard).

What I changed:

  • in Configuration_adv.h :
#define E0_AUTO_FAN_PIN PB5 // Extruder fan that should start running as soon as 50degree are reached
  • pins_GTM32_PRO_VB.h:
#define FAN_PIN       PB4   // EXT0 port, part cooler fan that get's started in gcode M106 S255 after some layers of printing
#define FAN1_PIN     PB5/   // EXT1 port,  Extruder fan that should start running as soon as 50degree are reached

This way I can be sure the heat break fan is always running (above 50degree) and is not dependent on a gcode config and the part blower can be used if needed.

@krabbs (and sorry for being sligthly offtopic, although the question is about a GTM32 board and Marlin 2.x)

I'm currently working on a GTM32_103_V1 board in my Geeetech A30T to make it work with Marlin. I have a good starting point now (e0-2, x, y, dual-z, endstops, filament sensors, heaters, temp sensors, SD card all running good; display is on my list). I had a similar problem that you had with your Y axis (using pin PA12) but in my case the pin is used for the X axis. Did you overcome the issue that you had to put the "Serial.end()" command in the MarlinCore.cpp#setup() method? If so, how did you manage to do so? Appreciate your help!

Unfortunately, I haven't even made progress and I don't know where to look for the mistake. I am using still this stupid work around :-(