Skip to content

Commit

Permalink
add pio environments for OpenHC32Boot
Browse files Browse the repository at this point in the history
  • Loading branch information
shadow578 authored May 29, 2024
1 parent f56952c commit 5d67356
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
23 changes: 23 additions & 0 deletions ini/hc32.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5d67356

Please sign in to comment.