Welcome! Log In Create A New Profile

Advanced

Configuring Marlin for mystery board

Posted by tyguy2 
Configuring Marlin for mystery board
April 09, 2021 12:50AM
Hello all,

Recently got my hands on a 3D printer board pulled from Shenzhen (photos attached). I've been wanting to use them for a project, but the provided firmware is a horribly mangled version of Rep Rap from 2017 that's basically unusable. Random crashes, half Chinese UI, etc, etc. The only reason I want to use it is because I already have a bunch of them. I have access to the source code, so I know the pin definitions and a few other bits of essential info, but my main goal is to get Marlin running on the board instead of what's currently on it. I've tried editing the pin defs in Marlin to upload firmware to the processor on the board (STM32F104RET6), but the only thing that happens when I do that is the board stops communicating with Windows and I have to revert back to the old version of the firmware. Specifically, the COM port for the device does not appear and Windows Device Manager says "Unknown USB device, descriptor request failed"

I feel like this process would be infinitely easier if I had more information on the board (name, manufacturer, anything), or if anyone knew what I was missing in the Marlin config files to get this thing working. If anyone had any ideas for finding this board online, I would be glad to hear it!
Attachments:
open | download - 2021-04-07 23.57.28.jpg (415 KB)
open | download - 2021-04-07 23.57.42.jpg (319 KB)
Re: Configuring Marlin for mystery board
April 09, 2021 02:18AM
You should come talk in the marlin discord porting marlin section [discord.gg]
Re: Configuring Marlin for mystery board
April 09, 2021 02:35AM
It sounds like this board is using CDC serial, where as most stm32f1's use a ch340.
So first thing would be SERIAL_PORT -1 to activate cdc
Re: Configuring Marlin for mystery board
April 09, 2021 12:16PM
Set Serial_Port to -1, same error unfortunately. Just as a matter of course, the chip on the board is an SMT32103RET6, does this mean I set my default_envs = STM32F103RET6_creality? Or should I use a different selection?
Re: Configuring Marlin for mystery board
April 09, 2021 08:57PM
the default_envs configures the board.
Important things like final linked address of the firmware that the bootloarder jumps to
The file name the bootloader looks for.
Some timers to use.

unless you have a bootloader that jumps to 0x08007000 STM32F103RET6_creality won't work for you.

If there is no bootloader and your uploading via jlink you should comment out
pre:buildroot/share/PlatformIO/scripts/random-bin.py

and edit to suite your needs.(probably just comment out code relocation)

buildroot/share/PlatformIO/scripts/STM32F103RET6_creality.py

Edited 1 time(s). Last edit at 04/09/2021 08:58PM by Dust.
Re: Configuring Marlin for mystery board
April 10, 2021 08:33PM
So I've dug through some docs on the original (Rep Rap) firmware, and this was autogenerated by PlatformIO:

"defines": [
                "PLATFORMIO=50101",
                "STM32F103xE",
                "STM32F1",
                "ENABLE_USB_SERIAL",
                "ARDUINO=10808",
                "ARDUINO_ARCH_STM32",
                "ARDUINO_ARCH_STM32F1",
                "ARDUINO_GENERIC_STM32F103R",
                "MCU_STM32F103RE",
                "__STM32F1__",
                "BOARD_generic_stm32f103r",
                "F_CPU=72000000L",
                "VECT_TAB_ADDR=0x8002000",
                "ERROR_LED_PORT=GPIOB",
                "ERROR_LED_PIN=1",
                "SERIAL_USB",
                "GENERIC_BOOTLOADER",
                ""
            ],

I changed the line you were talking about to read "env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08002000"))" but still no dice. Does any info from this doc help narrow down the issue? Serial_Port is still set to -1

Also, the file "buildroot/share/PlatformIO/scripts/STM32F103RET6_creality.py" didn't exist for me, it was called "buildroot/share/PlatformIO/scripts/creality.py"

Edited 2 time(s). Last edit at 04/10/2021 08:35PM by tyguy2.
Re: Configuring Marlin for mystery board
April 14, 2021 12:51PM
I figured it out. In addition to changing to .py file, I also needed to change the .ld file for Creality to set the memory address to 0x8002000thumbs up
Sorry, only registered users may post in this forum.

Click here to login