What is the STM32 Legacy HAL API?

Sysprogs forums Forums VisualGDB What is the STM32 Legacy HAL API?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7697
    gigamegawatts
    Participant

    Could someone please explain what the “Support Legacy HAL API” checkbox does? This is in the New Project wizard for STM32 projects, and I believe it is new in VisualGDB 5.1.

    I can tell by trial-and-error that this checkbox affects which HAL include folder is used, and that some of the system defines like “GPIO_SPEED_HIGH” exist in the legacy include file, but not the “non-legacy” one. I also found that the VisualGDB default “Blinky” code and the CubeMX code both use the legacy defines, and therefore won’t compile unless that “Support Legacy HAL API” checkbox is on.

    However, I can’t find any documentation on what else this checkbox does. I also can’t find any documentation from STM on the difference between legacy and other HAL APIs – “legacy HAL API” isn’t a thing, at least according to search engines.

    Can anyone fill me in, or point me in the right direction?

    Thanks,

    Dan

    #7698
    support
    Keymaster

    Hi,

    The checkbox results in defining the USE_HAL_LEGACY macro that enables some backward compatibility features in the HAL headers. You can search for the macro in the HAL headers and sources to see which exact functionality is affected.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.