STM32 Header and C HAL files multiple definitions

Sysprogs forums Forums VisualGDB STM32 Header and C HAL files multiple definitions

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31023
    Sam a
    Participant

    Hello.

    I am trying to configure a STM project for my STM32F429I. I select a new embedded project, select my device and then the basic blinking tutorial. At this point in time the code will compile as well as work as intended on my board. However, changing the code to UART communication throws errors, claiming my include file ‘stm32f4xx_hal_uart.c’ which is at the top of my c code file is not defined, even though its right in the Source files > Device Specific Files > HAL in the solution explorer, along side the rest of the HAL library since I assume the low level and HAL libraries were added for the sake of the demo, I will also attach a picture of this at the bottom of the post of the project properties showing this.

    Now at this point visual studio recommends a missing file that should be included which is none other than ‘stm32f4xx_hal_uart.c’, however now building will give me the error that the definitions within this c file conflict since it was already defined. The only other area I see these definitions existing when searching through the solution explorer search function was the corresponding header file, ‘stm32f4xx_hal_uart.h’ and I assume I could delete the file in order to stop the conflict, but I believe that defeats the purpose and this conflict should never have happened in the first place between the manufacturers own library files. Any idea whats going on?

    Attachments:
    You must be logged in to view attached files.
    #31039
    support
    Keymaster

    Hi,

    Please refer to the following page for an overview of the typical structure of STM32 projects, and their main components: https://visualgdb.com/documentation/embedded/stm32/

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