-
Notifications
You must be signed in to change notification settings - Fork 1k
Disable HAL feature when not used in the sketch #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
With "small flash size" do you consider also the blue pill and similar 48pins f1 boards? |
This will be available for all variants. It's a core feature not specific to a variant. |
Serial can now be enabled or not: This allow to build without HAL_UART_MODULE_ENABLED (save memory) |
Shouldn't RCC also be on the list here, e.g., following the comment #165 (comment) ("I've generate the code with CubeMx to use LL instead of HAL for RCC") ? |
This could. |
hi @fpistm ,
we need menu and some |
Hi @Adminius, |
Goal of this issue is to be able to disable HAL module if not used in the sketch in order to reduce binary size.
HAL_EXTI_MODULE_DISABLED
SystemClock_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 in
variant.h
if required or in a file named (at sketch level):hal_conf_extra.h
HAL_PPP_MODULE_ENABLED
withPPP
the peripheral to enable.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
.The text was updated successfully, but these errors were encountered: