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

HC32: add environments for OpenHC32Boot bootloader #27662

Open
wants to merge 1 commit into
base: bugfix-2.1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -944,9 +944,9 @@
//

#elif MB(AQUILA_V101)
#include "hc32f4/pins_AQUILA_101.h" // HC32F460 env:HC32F460C_aquila_101
#include "hc32f4/pins_AQUILA_101.h" // HC32F460 env:HC32F460C_aquila_101 env:HC32F460C_openhc32boot
#elif MB(CREALITY_ENDER2P_V24S4)
#include "hc32f4/pins_CREALITY_ENDER2P_V24S4.h" // HC32F460 env:HC32F460C_e2p24s4
#include "hc32f4/pins_CREALITY_ENDER2P_V24S4.h" // HC32F460 env:HC32F460C_e2p24s4 env:HC32F460C_openhc32boot

//
// Raspberry Pi RP2040
Expand Down
26 changes: 25 additions & 1 deletion ini/hc32.ini
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,35 @@ board_upload.maximum_size = 524288
[env:HC32F460C_aquila_101]
extends = HC32F460C_base
board_upload.offset_address = 0xC000 # Bootloader start address, as logged by the bootloader on boot
board_build.boot_mode = secondary # Save ~1.4k of flash by compiling as secondary firmware
board_build.boot_mode = secondary # Save ~1.4k of flash by compiling as secondary firmware (no ICG)

#
# Creality Ender 2 Pro v2.4.S4_170 (HC32f460kcta) (256K Flash, 192K RAM).
#
[env:HC32F460C_e2p24s4]
extends = HC32F460C_base
board_upload.offset_address = 0x8000

#
# OpenHC32Boot (256K Flash).
# This can be used with any HC32F460C printer, provided it has OpenHC32Boot installed.
# see https://github.com/shadow578/OpenHC32Boot for more information
#
[env:HC32F460C_openhc32boot]
extends = HC32F460C_base
board_upload.offset_address = 0x4000
board_build.boot_mode = secondary
build_flags =
${HC32F460C_base.build_flags}
-D CORE_DONT_RESTORE_DEFAULT_CLOCKS=1 # OpenHC32Boot doesn't mess with the clock settings, so we can skip clock restore in the core

#
# OpenHC32Boot (512K Flash)
#
[env:HC32F460E_openhc32boot]
extends = HC32F460E_base
board_upload.offset_address = 0x4000
board_build.boot_mode = secondary
build_flags =
${HC32F460E_base.build_flags}
-D CORE_DONT_RESTORE_DEFAULT_CLOCKS=1