Skip to main content
Explorer
June 7, 2024
Solved

Keil project compilation error in NUCLEO-H755ZI-Q

  • June 7, 2024
  • 1 reply
  • 827 views

i'm using the AC6.16 compiler and keil 5.34.

i'd like to use DMA in UART,and the file dma.c occured in both CM4 and CM7 folder(UART is attached to cortex-m4).but when i want to compile CM4 and CM7 project,both have said that "multiply defined".

KevinNapier_0-1717771915609.png

how can i do to resolve?thx.

 

    This topic has been closed for replies.
    Best answer by mƎALLEm

    Hello,

    In your project you added two dma.c file instances and that's normal. You need to add just one dma.c instance to your project as a common file. You can separate it from CMx/Core tree.

    For example:

    system_stm32h7xx.c is a common file for both CM4 and CM7:

    SofLit_0-1718010823654.png*

    See STM32H7 Cube package in github: https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/NUCLEO-H745ZI-Q/Examples/GPIO/GPIO_EXTI/Common/Src

     

    1 reply

    mƎALLEmAnswer
    Technical Moderator
    June 10, 2024

    Hello,

    In your project you added two dma.c file instances and that's normal. You need to add just one dma.c instance to your project as a common file. You can separate it from CMx/Core tree.

    For example:

    system_stm32h7xx.c is a common file for both CM4 and CM7:

    SofLit_0-1718010823654.png*

    See STM32H7 Cube package in github: https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/NUCLEO-H745ZI-Q/Examples/GPIO/GPIO_EXTI/Common/Src