Skip to main content
Visitor II
December 23, 2025
Question

Build Error in STM32F1xx Standard Peripheral Library (misc.c) with MDK v6

  • December 23, 2025
  • 1 reply
  • 83 views

I am reporting a compilation error that occurs when using the STM32F1xx Standard Peripheral Library (SPL) in Keil MDK v6 (specifically using the RTE pack downloaded via Arm Keil Studio for VS Code). This issue is caused by a naming mismatch in the NVIC structure between the legacy SPL and the latest CMSIS core headers.

In the latest CMSIS core headers, the Interrupt Priority Register in the NVIC structure is defined as IPR. However, the misc.c file in the Standard Peripheral Library still refers to it as IP.

Error Message: ~/.cache/arm/packs/Keil/STM32F1xx_DFP/2.4.1/Device/StdPeriph_Driver/src/misc.c:131:11: error: no member named 'IP' in 'NVIC_Type'

Technical Details & Suggested Fix: The bug is located in the STM32F1xx_DFP/2.4.1/Device/StdPeriph_Driver/src/misc.c file, specifically around line 131 within the NVIC_Init function.

To ensure out-of-the-box compatibility for MDK v6 users, I propose updating the current code:

NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority;

to use the IPR member instead:

NVIC->IPR[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority;

 

Environment:

  • IDE: Keil MDK v6 (VS Code extension)

  • Device: STM32F103C8 series

  • Library: STM32F10x_StdPeriph_Driver (v3.6.0)

  • RTE Pack: Keil::STM32F1xx_DFP (v2.4.1)

    This topic has been closed for replies.

    1 reply

    Super User
    December 23, 2025

    @F4Corsair wrote:

    caused by a naming mismatch in the NVIC structure between the legacy SPL and the latest CMSIS core headers.)


    As you say, SPL is (and has been for a long time) a legacy product - so it's not surprising that it doesn't match up with the latest CMSIS.

     


    @F4Corsair wrote:

    To ensure out-of-the-box compatibility for MDK v6 users


    If you want out-of-the-box compatibility, then you need to use compatible versions - not legacy versions.