Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Disable HAL feature when not used in the sketch #228

Closed
Assignees
fpistm
Labels
enhancementNew feature or request
Milestone
@fpistm

Description

@fpistm

Goal of this issue is to be able to disable HAL module if not used in the sketch in order to reduce binary size.

  • I2C: done thanks07dcdc4
  • SPI: done thanksc41d8af
  • ADC: done thankse4b1121
  • DAC: done thanks68d3450
  • TIM: done thanksb10696d
  • UART: done thanks83d872f
  • ETH: done thanks680e01b
  • SD: done thankse0e90cc
  • QSPI: done thanks4e25050
  • RTC: done thanks0753358
  • USB: done thanks Arduino menu.
  • EXTI: done thanks0e1f5a7. Interrupt API does not used HAL EXTI module anyway API is cleaned withHAL_EXTI_MODULE_DISABLED
  • RCC: mandatory. User can use LL to overrideSystemClock_Config()

Mainly useful for MCU with smallflash size (See#165)

Proposition:

handle a default HAL conf file which could be override by end user at sketch level or variant.
PeripheralPins arrays could also use new switch to force an array to be disable even if the HAL module is enabled.

Implementation done thanks#518

  • Extra HAL module can be enabled/disabled invariant.h if required or in a file named (at sketch level):hal_conf_extra.h

    • To enable a HAL modules use the standard HAL definition:HAL_PPP_MODULE_ENABLED withPPP the peripheral to enable.
    • To disable a HAL modules use one or more following values:
      • HAL_ADC_MODULE_DISABLED
      • HAL_I2C_MODULE_DISABLED
      • HAL_RTC_MODULE_DISABLED
      • HAL_SPI_MODULE_DISABLED
      • HAL_DAC_MODULE_DISABLED
      • HAL_ETH_MODULE_DISABLED
      • HAL_SD_MODULE_DISABLED
      • HAL_QSPI_MODULE_DISABLED
      • HAL_EXTI_MODULE_DISABLED
      • HAL_TIM_MODULE_DISABLED
        Note:HAL_UART_MODULE_ENABLED andHAL_PCD_MODULE_ENABLED are handled thanks Arduino menu.
  • Custom HAL configuration file can replace the default one by adding a file named (at sketch level):
    hal_conf_custom.h .

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp