From 5d67356d94843310abf22ba2a7bdc6474d6aa896 Mon Sep 17 00:00:00 2001 From: Chris <52449218+shadow578@users.noreply.github.com> Date: Wed, 15 May 2024 08:46:00 +0000 Subject: [PATCH] add pio environments for OpenHC32Boot --- Marlin/src/pins/pins.h | 4 ++-- ini/hc32.ini | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index cdc4fdb7a406..8d313f622f69 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -904,9 +904,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 // // Custom board (with custom PIO env) diff --git a/ini/hc32.ini b/ini/hc32.ini index c9533bad17a0..6cc9514c3edf 100644 --- a/ini/hc32.ini +++ b/ini/hc32.ini @@ -89,3 +89,26 @@ board_build.ld_args.boot_mode = secondary # Save ~1.4k of flash by compiling a [env:HC32F460C_e2p24s4] extends = HC32F460C_base board_build.ld_args.flash_start = 0x8000 + +# +# Generic OpenHC32Boot Configuration (256K Flash) +# see https://github.com/shadow578/OpenHC32Boot for more information +# +[env:HC32F460C_openhc32boot] +extends = HC32F460C_base +board_build.ld_args.flash_start = 0x4000 +board_build.ld_args.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 + +# +# Generic OpenHC32Boot Configuration (512K Flash) +# +[env:HC32F460E_openhc32boot] +extends = HC32F460E_base +board_build.ld_args.flash_start = 0x4000 +board_build.ld_args.boot_mode = secondary +build_flags = + ${HC32F460E_base.build_flags} + -D CORE_DONT_RESTORE_DEFAULT_CLOCKS=1