diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index cdc4fdb7a406d..84a5bfcef6516 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_full env:HC32F460C_openhc32boot_small #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_full env:HC32F460C_openhc32boot_small // // Custom board (with custom PIO env) diff --git a/ini/hc32.ini b/ini/hc32.ini index c9533bad17a0c..c3d0a5989a6fc 100644 --- a/ini/hc32.ini +++ b/ini/hc32.ini @@ -89,3 +89,40 @@ 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 (SMALL Profile, 256K Flash) +# see https://github.com/shadow578/OpenHC32Boot for more information +# +[env:HC32F460C_openhc32boot_small] +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 (FULL Profile, 256K Flash) +# +[env:HC32F460C_openhc32boot_full] +extends = env:HC32F460C_openhc32boot_small +board_build.ld_args.flash_start = 0x6000 + +# +# Generic OpenHC32Boot Configuration (SMALL Profile, 512K Flash) +# +[env:HC32F460E_openhc32boot_small] +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 + +# +# Generic OpenHC32Boot Configuration (FULL Profile, 512K Flash) +# +[env:HC32F460E_openhc32boot_full] +extends = env:HC32F460E_openhc32boot_small +board_build.ld_args.flash_start = 0x6000