Skip to content

Commit ce55a7b

Browse files
authored
🩹 HC32: pin package versions (#27289)
1 parent 540120f commit ce55a7b

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

Marlin/src/HAL/HC32/inc/SanityCheck.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@
9494
#error "SERIAL_DMA requires USART_RX_DMA_SUPPORT to be enabled in the arduino core."
9595
#endif
9696

97-
// USART_RX_DMA_SUPPORT does not implement core_hook_usart_rx_irq, which is required for the emergency parser
98-
#if ENABLED(EMERGENCY_PARSER)
97+
// Before arduino core version 1.2.0, USART_RX_DMA_SUPPORT did not implement
98+
// core_hook_usart_rx_irq, which is required for the emergency parser.
99+
// With 1.2.0, this was fixed (see https://github.com/shadow578/framework-arduino-hc32f46x/pull/25).
100+
#if ENABLED(EMERGENCY_PARSER) && ARDUINO_CORE_VERSION_INT < GET_VERSION_INT(1, 2, 0)
99101
#error "EMERGENCY_PARSER is not supported with SERIAL_DMA. Please disable either SERIAL_DMA or EMERGENCY_PARSER."
100102
#endif
101103

ini/hc32.ini

+17-18
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,18 @@
2727
# Base Environment for all HC32F460 variants
2828
#
2929
[HC32F460_base]
30-
platform = https://github.com/shadow578/platform-hc32f46x/archive/1.0.0.zip
31-
board = generic_hc32f460
32-
build_src_filter = ${common.default_src_filter} +<src/HAL/HC32> +<src/HAL/shared/backtrace>
33-
build_type = release
34-
build_flags =
35-
-D ARDUINO_ARCH_HC32
36-
-D PLATFORM_M997_SUPPORT # Enable M997 command
37-
# note: ddl and arduino debug mode are
38-
# automatically enabled with MARLIN_DEV_MODE
39-
#-D __DEBUG # force DDL debug mode
40-
#-D __CORE_DEBUG # force Arduino core debug mode
30+
platform = https://github.com/shadow578/platform-hc32f46x/archive/1.1.0.zip
31+
platform_packages = framework-hc32f46x-ddl@https://github.com/shadow578/framework-hc32f46x-ddl/archive/2.2.2.zip
32+
framework-arduino-hc32f46x@https://github.com/shadow578/framework-arduino-hc32f46x/archive/1.2.0.zip
33+
board = generic_hc32f460
34+
build_src_filter = ${common.default_src_filter} +<src/HAL/HC32> +<src/HAL/shared/backtrace>
35+
build_type = release
36+
build_flags = -D ARDUINO_ARCH_HC32
37+
-D PLATFORM_M997_SUPPORT # Enable M997 command
38+
# note: ddl and arduino debug mode are
39+
# automatically enabled with MARLIN_DEV_MODE
40+
#-D __DEBUG # force DDL debug mode
41+
#-D __CORE_DEBUG # force Arduino core debug mode
4142

4243
# hc32 app configuration file
4344
board_build.app_config = Marlin/src/HAL/HC32/app_config.h
@@ -51,15 +52,13 @@ board_build.ddl.timera = true
5152
board_build.mw.sd_card = true
5253

5354
# extra build flags
54-
board_build.flags.common =
55-
-g3 # Force emit debug symbols to elf. this does not affect the final binary size
56-
-fno-signed-char # Force unsigned chars. this is required for meatpack to work
55+
board_build.flags.common = -g3 # Force emit debug symbols to elf. this does not affect the final binary size
56+
-fno-signed-char # Force unsigned chars. this is required for meatpack to work
5757

5858
# Additional flags to reduce binary size
59-
board_build.flags.cpp =
60-
-fno-threadsafe-statics # Disable thread-safe statics (only one core anyway)
61-
-fno-exceptions # Disable exceptions (not used by marlin)
62-
-fno-rtti # Disable RTTI (not used by marlin)
59+
board_build.flags.cpp = -fno-threadsafe-statics # Disable thread-safe statics (only one core anyway)
60+
-fno-exceptions # Disable exceptions (not used by marlin)
61+
-fno-rtti # Disable RTTI (not used by marlin)
6362

6463
#
6564
# Base HC32F460xCxx (256K Flash)

0 commit comments

Comments
 (0)