Welcome! Log In Create A New Profile

Advanced

PCB Creality 4.2.2 (STM32F103RET6) and Marlin FW relations

Posted by CatRovacer57 
PCB Creality 4.2.2 (STM32F103RET6) and Marlin FW relations
April 13, 2023 04:08PM
Now one idea (project) of converting the Cube 2 device (3D System) to simpler materials and preparing for printing has taken over me. Then I'll change it back to something else.
Cube 2, PCB Creality 4.2.2, LCD 12864LW-10 I got inexpensively which I will replace with stock HW of Cube2.
1. Firmware I builded bugfix 2.1.X. But something goes wrong, the display lights up but does not show. I can flashed third-party firmware for Ender3 to the board via SD.
2. Is it possible to find the source code or the bootloader bin file for Creality 4.2.2?
2. Downloading via SD - is this the only way? I can use ST-Link, but a simple connection to the processor was unsuccessful. Rather, the SWDIO and SWCLK pins are reassigned, need to try the connection method Connection Under Reset. To do this, make a wire to the pin RESET of STM32
3. What display should be indicated in the configuration if it is signed as 12864LW-10? It's from an Ender 3 with rotary encoder.
4. What is the difference between building maple_env and without "maple"?

Thanks for attentions

Yuri

Edited 1 time(s). Last edit at 04/14/2023 12:33AM by CatRovacer57.
Re: PCB Creality 4.2.2 (STM32F103RET6) and Marlin FW relations
April 13, 2023 09:31PM
1) no question here.. Firstly check the MPU on the controller. read the part number. If you build for a stm32f103re and it is a stm32f103rc it will not boot and the screen will not start.
Has been seen with STM32F103RC, STM32F03RE, GD32F103RE and GD32F303RE

2) no source, a booloader.bin is available Creality-4.2.2.bootloader.bin

second 2) Its a stm32, you can use any standard stm32 upload methods. but using sdcard is easiest, and is very hard to brick it that way. very easy to brick it with st-link.

3) CR10_STOCKDISPLAY you also need to add #define RET6_12864_LCD to Your configuration.h

4) maple is older legacy framework, non maple is newer, less buggy and smaller STM32duino framework.

Edited 4 time(s). Last edit at 04/14/2023 12:55AM by Dust.
Re: PCB Creality 4.2.2 (STM32F103RET6) and Marlin FW relations
April 14, 2023 10:44AM
Which offset need for binary location in flash memory for target?
where is it indicated in the platformio? Are there files for link like.ld?
Re: PCB Creality 4.2.2 (STM32F103RET6) and Marlin FW relations
April 14, 2023 12:04PM
#elif MB(CREALITY_V4)
  #include "stm32f1/pins_CREALITY_V4.h"         // STM32F1                                env: STM32F103RE_creality env: STM32F103RE_creality_xfer env: STM32F103RC_creality env: STM32F103RC_creality_xfer env: STM32F103RE_creality_maple

So look at the listed build envs:

which leads to

#
# Creality (STM32F103Rx)
#
[STM32F103Rx_creality]
extends                     = stm32_variant
board_build.variant         = MARLIN_F103Rx
board_build.offset          = 0x7000
board_upload.offset_address = 0x08007000

wich shows you the address
bootloader is from 0x08000000-0x08006FFF

also from this you see MARLIN_F103Rx wich leads tou to buildroot/share/PlatformIO/variants/MARLIN_F103Rx
Which contains ldscript.ld

Edited 1 time(s). Last edit at 04/14/2023 12:05PM by Dust.
Re: PCB Creality 4.2.2 (STM32F103RET6) and Marlin FW relations
September 26, 2025 02:17PM
Thanks for the bootloader, ive search long time for this.
Few years ago i bricked mine, i got it working again without bootloader. (but every firmware update i had to use st-link)

Now i can use the sdcard again for new firmware.
Re: PCB Creality 4.2.2 (STM32F103RET6) and Marlin FW relations
November 21, 2025 03:33PM
Quote
SuperCow
Thanks for the bootloader, ive search long time for this.
Few years ago i bricked mine, i got it working again without bootloader. (but every firmware update i had to use st-link)

Now i can use the sdcard again for new firmware.
.

I fried mcu on my ender 3 with 4.2.2 board which unfortunately has this gd32f303ret6 mcu and i replaced just the mcu with the same one but unfortunately there is no bootloader.bin file available for this particular mcu, you said you were able to run your version of stm32 mcu without a bootloader, can i do the same and directly flash the fw.bin file via stlink and make it work ? Or do i have to make any changes to the marlin source code to make it run without a bootloader Thanks.

Edited 2 time(s). Last edit at 11/21/2025 03:41PM by Enderrrr.
Re: PCB Creality 4.2.2 (STM32F103RET6) and Marlin FW relations
November 21, 2025 08:14PM
Creality-4.2.2GD32F303bootloader.bin from my GD32F303 creality v422 board.

Edited 1 time(s). Last edit at 11/21/2025 08:16PM by Dust.
Re: PCB Creality 4.2.2 (STM32F103RET6) and Marlin FW relations
November 21, 2025 08:19PM
For no bootloader operation you have to edit the build environment settings


eg

board_build.offset = 0x7000
board_upload.offset_address = 0x08007000

Says the firmware should start at 0x08007000, but without a bootloader it will never start since code starts at 0x08000000

So change to
board_build.offset = 0x0000
board_upload.offset_address = 0x08000000


But I recommend restoring the bootloader with the one provided above.
Re: PCB Creality 4.2.2 (STM32F103RET6) and Marlin FW relations
November 22, 2025 03:02AM
Quote
Dust
For no bootloader operation you have to edit the build environment settings


eg

board_build.offset = 0x7000
board_upload.offset_address = 0x08007000

Says the firmware should start at 0x08007000, but without a bootloader it will never start since code starts at 0x08000000

So change to
board_build.offset = 0x0000
board_upload.offset_address = 0x08000000


But I recommend restoring the bootloader with the one provided above.

Thanks for providing the bootloader. I wasn't able to get bootloader for gd mcu anywhere else, only the fw.bin was available. even asked the creality support and they couldn't provide me with one, my last option was to replace the mcu again with an stm32 one for which the bootloader was available. I'll try flashing this one, thanks again
Re: PCB Creality 4.2.2 (STM32F103RET6) and Marlin FW relations
November 22, 2025 02:52PM
Quote
Dust
For no bootloader operation you have to edit the build environment settings


eg

board_build.offset = 0x7000
board_upload.offset_address = 0x08007000

Says the firmware should start at 0x08007000, but without a bootloader it will never start since code starts at 0x08000000

So change to
board_build.offset = 0x0000
board_upload.offset_address = 0x08000000


But I recommend restoring the bootloader with the one provided above.

Update ! I successfully flashed the given bootloader and i was able to install firmware normally using sd card. After printing a test model i can confirm everything seems to be working as it should. Thank you again for your help, much appreciated.
Sorry, only registered users may post in this forum.

Click here to login