hc32.ini 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #
  2. # Marlin Firmware
  3. # PlatformIO Configuration File
  4. #
  5. #################################
  6. #
  7. # HC32F460 Architecture with unified HC32 HAL
  8. #
  9. # Naming Example: HC32F460JEUA
  10. #
  11. # |- Xiaohua Semiconductor
  12. # | |- CPU bit width (32: 32-bit)
  13. # | | |- Product Type (F: Universal MCU)
  14. # | | | |- Core Type (4: Cortex-M4)
  15. # | | | | |- Performance (6: High Performance)
  16. # | | | | | |- Configuration (0: Configuration 1)
  17. # | | | | | | |- Pin Count (J: 48, K: 60/64, P: 100)
  18. # | | | | | | | |- Flash Capacity (C: 256KB, E: 512KB)
  19. # | | | | | | | | |- Package (T: LQFP, U: QFN, H:VFBGA)
  20. # | | | | | | | | | |- Temperature range (A: -40-85°C, B: -40-105°C)
  21. # HC 32 F 4 6 0 J E U A
  22. #
  23. #################################
  24. #
  25. # Base Environment for all HC32F460 variants
  26. #
  27. [HC32F460_base]
  28. platform = https://github.com/shadow578/platform-hc32f46x/archive/1.1.0.zip
  29. platform_packages = framework-hc32f46x-ddl@https://github.com/shadow578/framework-hc32f46x-ddl/archive/2.2.2.zip
  30. framework-arduino-hc32f46x@https://github.com/shadow578/framework-arduino-hc32f46x/archive/1.2.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 = -D ARDUINO_ARCH_HC32
  35. -D PLATFORM_M997_SUPPORT # Enable M997 command
  36. # NOTE: DDL and Arduino debug mode are
  37. # automatically enabled with MARLIN_DEV_MODE
  38. #-D __DEBUG # force DDL debug mode
  39. #-D __CORE_DEBUG # force Arduino core debug mode
  40. # HC32 app configuration file
  41. board_build.app_config = Marlin/src/HAL/HC32/app_config.h
  42. # Drivers and Middleware required by the HC32 HAL
  43. board_build.ddl.ots = true
  44. board_build.ddl.sdioc = true
  45. board_build.ddl.wdt = true
  46. board_build.ddl.timer0 = true
  47. board_build.ddl.timera = true
  48. board_build.mw.sd_card = true
  49. # Extra build flags
  50. board_build.flags.common = -g3 # Force emit debug symbols to elf. This does not affect the final binary size
  51. -fno-signed-char # Force unsigned char. This is required for meatpack to work
  52. # Additional flags to reduce binary size
  53. board_build.flags.cpp = -fno-threadsafe-statics # Disable thread-safe statics (only one core anyway)
  54. -fno-exceptions # Disable exceptions (not used by Marlin)
  55. -fno-rtti # Disable RTTI (not used by Marlin)
  56. #
  57. # Base HC32F460xCxx (256K Flash)
  58. #
  59. [HC32F460C_base]
  60. extends = HC32F460_base
  61. board_upload.maximum_size = 262144
  62. #
  63. # Base HC32F460xExx (512K Flash)
  64. #
  65. [HC32F460E_base]
  66. extends = HC32F460_base
  67. board_upload.maximum_size = 524288
  68. #
  69. # Voxelab Aquila V1.0.0/V1.0.1/V1.0.2/V1.0.3 as found in the Voxelab Aquila X2 & C2
  70. #
  71. [env:HC32F460C_aquila_101]
  72. extends = HC32F460C_base
  73. board_upload.offset_address = 0xC000 # Bootloader start address, as logged by the bootloader on boot
  74. board_build.boot_mode = secondary # Save ~1.4k of flash by compiling as secondary firmware
  75. #
  76. # Creality Ender 2 Pro v2.4.S4_170 (HC32f460kcta) (256K Flash, 192K RAM).
  77. #
  78. [env:HC32F460C_e2p24s4]
  79. extends = HC32F460C_base
  80. board_upload.offset_address = 0x8000