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

HAL configuration#518

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 15 commits intostm32duino:masterfromfpistm:default_HAL_conf
May 15, 2019
Merged

HAL configuration#518

fpistm merged 15 commits intostm32duino:masterfromfpistm:default_HAL_conf
May 15, 2019

Conversation

@fpistm
Copy link
Member

@fpistmfpistm commentedMay 8, 2019
edited
Loading

This PR add some enhancement and flexibility.

  • variant.h is now independent and does not rely on any header.

  • Default STM32 HAL configuration:

    • Before each variants had to include the STM32 HAL configuration file:stm32yyxx_hal_conf.h withyy the STM32 series:f0, f1, f2, f3, f4, g0, f7, h7, l0, l1, l4, wb
      Those files were almost the same for the all series.
      With a default one per series this avoid to add it to the variant folder.
    • Extra HAL module can be enabled invariant.h if required or in a file named (at sketch level):hal_conf_extra.h
    • Custom HAL configuration file can replace the default one by adding a file named (at sketch level):
      hal_conf_custom.h .
    • Some dedicated definitions can be redefined:
      • TICK_INT_PRIORITY
      • PREFETCH_ENABLE
      • INSTRUCTION_CACHE_ENABLE
      • DATA_CACHE_ENABLE
      • USE_SPI_CRC
  • Some HAL modules can now be disabled if user does not use the feature by defining one or more following values (solveDisable HAL feature when not used in the sketch #228):

    • 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.

For example, default Blink sketch for Nucleo L031K6:

  • With default option (Serial is enabled):
Sketch uses 11208 bytes (34%) of program storage space. Maximum is 32768 bytes.Global variables use 780 bytes (9%) of dynamic memory, leaving 7412 bytes for local variables. Maximum is 8192 bytes.
  • With allHAL_*_MODULE_DISABLED defined inhal_conf_extra.h and Serial disabled:
Sketch uses 4340 bytes (13%) of program storage space. Maximum is 32768 bytes.Global variables use 52 bytes (0%) of dynamic memory, leaving 8140 bytes for local variables. Maximum is 8192 bytes.

Refer toHAL configuration WiKi page

kgamecarter reacted with thumbs up emoji
@fpistmfpistm added the enhancementNew feature or request labelMay 8, 2019
@fpistmfpistm self-assigned thisMay 8, 2019
fpistm added a commit to fpistm/STM32SD that referenced this pull requestMay 9, 2019
Requirestm32duino/Arduino_Core_STM32#518Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
fpistm added a commit to fpistm/STM32Ethernet that referenced this pull requestMay 10, 2019
variant.h is now included thanks stm32_def.hSeestm32duino/Arduino_Core_STM32#518Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
fpistm added a commit to fpistm/STM32Ethernet that referenced this pull requestMay 11, 2019
variant.h is now included thanks stm32_def.hSeestm32duino/Arduino_Core_STM32#518Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
@fpistmfpistmforce-pushed thedefault_HAL_conf branch 3 times, most recently frombaa9e86 to9f6571dCompareMay 13, 2019 14:03
@fpistmfpistm added this to the1.6.0 milestoneMay 13, 2019
fpistm added14 commitsMay 15, 2019 09:16
Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
Before each variants had to include the STM32 HAL configurationfile: stm32yyxx_hal_conf.h.Those files were almost the same for the same series.With a default one per series this avoid to add it to the variant.Extra HAL module can be enabled in variant.h if required or in afile named (at sketch level):  `hal_conf_extra.h`Custom HAL configuration file can replace the default one by addinga file named (at sketch level):  `hal_conf_custom.h` .Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
variant.h is now included thanks stm32_def.hSigned-off-by: Frederic.Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
As Wire is a built-in library no need to modify it.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
As SPI is a built-in library no need to modify it.Note: no size changeSigned-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Note: no size changeSigned-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Note: no size changeSigned-off-by: Frederic Pillon <frederic.pillon@st.com>
Note: no size changeSigned-off-by: Frederic Pillon <frederic.pillon@st.com>
Note: no size changeSigned-off-by: Frederic Pillon <frederic.pillon@st.com>
Note: Interrupt API does not use the HAL EXTI module      anyway API is cleaned with HAL_EXTI_MODULE_DISABLEDSigned-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
@fpistmfpistm merged commit89e7ef5 intostm32duino:masterMay 15, 2019
@fpistmfpistm deleted the default_HAL_conf branchMay 15, 2019 13:48
@kgamecarter
Copy link
Contributor

Very useful for STM32F030F4P6 16KB flash.

uzi18 reacted with thumbs up emojifpistm reacted with laugh emojifpistm reacted with hooray emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@fpistmfpistm

Labels

enhancementNew feature or request

Projects

None yet

Milestone

1.6.0

Development

Successfully merging this pull request may close these issues.

2 participants

@fpistm@kgamecarter

[8]ページ先頭

©2009-2025 Movatter.jp