Skip to main content
Explorer II
September 8, 2022
Question

Unknown type name 'HAL_StatusTypeDef' Error

  • September 8, 2022
  • 1 reply
  • 12480 views

Hi, I am trying to use the peripherals with their peripherals rather than initializing it with CUBEMX tool. I am only selecting 'Serial Wire' option of Debug mode under System Core -> SYS with CUBEMX. However, when I build my program, it throws the error in the title. I googled it but found nothing helpful. How can I solve this problem?

Thx in advance for your helps.

    This topic has been closed for replies.

    1 reply

    Graduate II
    September 8, 2022

    Make sure you uncomment/select the modules you want in stm32f7xx_hal_conf.h

    Make sure your project has "Include Paths" point to the appropriate CubeF7 directories/folders holding the include files you expect to pull in.

    Make sure the command line to the compiler has USE_HAL_DRIVER and the specific IC you're using.

    Perhaps review the meta-data in a working/functional project, and use that as a reference/template?

    akoluacikAuthor
    Explorer II
    September 8, 2022

    - I am using RTC, but do I need to enable it because I don't use HAL Library, I am using registers. I am coding in register(low) level?

    - I looked at it, and everything is fine I guess, because related locations were added. I didn't mention but when I click CTRL+Left Click, I can see the definition of HAL_StatusTypeDef, but the compiler somehow cannot.

    - STM32F746xx and USE_HAL_DRIVER symbols were already added.

    I cannot understand the last statement/suggestion, perhaps my English isn't enough to understand. May you please make it clear? And what else do I need to check/add, or what else you can recommend?

    Graduate II
    September 11, 2022

    > I don't use HAL Library

    > USE_HAL_DRIVER symbols were already added

    Don't you see anything wrong here?

    > I am implementing the program with HAL Registers

    First you have to understand what the HAL is and what the registers are.