This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32F10x DMA Error

Hi,
I have started a new project on Keil 5.1, When I check the DMA driver in the Manage environment runtime, If I select the MCU to be STM32F107VC, the project will compile Normally.

But I need the MCU to be STM32F103RB, But when I create the project for it the compiler would says these errors?

Build target 'Target 1'
compiling main.c...
compiling DMA_STM32F10x.c...
C:\Keil\ARM\PACK\Keil\STM32F1xx_DFP\1.0.2\RTE_Driver\DMA_STM32F10x.c(92): error:  #20: identifier "RCC_AHBENR_DMA2EN" is undefined
        RCC->AHBENR |= RCC_AHBENR_DMA2EN;
C:\Keil\ARM\PACK\Keil\STM32F1xx_DFP\1.0.2\RTE_Driver\DMA_STM32F10x.c(98): error:  #20: identifier "DMA2_Channel1_IRQn" is undefined
            NVIC_ClearPendingIRQ(DMA2_Channel1_IRQn);
C:\Keil\ARM\PACK\Keil\STM32F1xx_DFP\1.0.2\RTE_Driver\DMA_STM32F10x.c(105): error:  #20: identifier "DMA2_Channel2_IRQn" is undefined
            NVIC_ClearPendingIRQ(DMA2_Channel2_IRQn);
C:\Keil\ARM\PACK\Keil\STM32F1xx_DFP\1.0.2\RTE_Driver\DMA_STM32F10x.c(112): error:  #20: identifier "DMA2_Channel3_IRQn" is undefined
            NVIC_ClearPendingIRQ(DMA2_Channel3_IRQn);
C:\Keil\ARM\PACK\Keil\STM32F1xx_DFP\1.0.2\RTE_Driver\DMA_STM32F10x.c(124): error:  #20: identifier "DMA2_Channel4_5_IRQn" is undefined
              NVIC_ClearPendingIRQ(DMA2_Channel4_5_IRQn);
C:\Keil\ARM\PACK\Keil\STM32F1xx_DFP\1.0.2\RTE_Driver\DMA_STM32F10x.c(205): error:  #20: identifier "DMA2_Channel1_IRQn" is undefined
            NVIC_DisableIRQ(DMA2_Channel1_IRQn);
C:\Keil\ARM\PACK\Keil\STM32F1xx_DFP\1.0.2\RTE_Driver\DMA_STM32F10x.c(209): error:  #20: identifier "DMA2_Channel2_IRQn" is undefined
            NVIC_DisableIRQ(DMA2_Channel2_IRQn);
C:\Keil\ARM\PACK\Keil\STM32F1xx_DFP\1.0.2\RTE_Driver\DMA_STM32F10x.c(213): error:  #20: identifier "DMA2_Channel3_IRQn" is undefined
            NVIC_DisableIRQ(DMA2_Channel3_IRQn);
C:\Keil\ARM\PACK\Keil\STM32F1xx_DFP\1.0.2\RTE_Driver\DMA_STM32F10x.c(222): error:  #20: identifier "DMA2_Channel4_5_IRQn" is undefined
                NVIC_DisableIRQ(DMA2_Channel4_5_IRQn);
C:\Keil\ARM\PACK\Keil\STM32F1xx_DFP\1.0.2\RTE_Driver\DMA_STM32F10x.c(244): error:  #20: identifier "DMA2_Channel4_5_IRQn" is undefined
                NVIC_DisableIRQ(DMA2_Channel4_5_IRQn);
C:\Keil\ARM\PACK\Keil\STM32F1xx_DFP\1.0.2\RTE_Driver\DMA_STM32F10x.c(252): error:  #20: identifier "RCC_AHBENR_DMA2EN" is undefined
          RCC->AHBENR &= ~RCC_AHBENR_DMA2EN;
C:\Keil\ARM\PACK\Keil\STM32F1xx_DFP\1.0.2\RTE_Driver\DMA_STM32F10x.c: 0 warnings, 11 errors
".\STM32.axf" - 11 Error(s), 0 Warning(s).

Shouldn't the default drivers work out of box? Do you have any Idea?