cancel
Showing results for 
Search instead for 
Did you mean: 

undefined reference to `HAL_NVIC_SetPriority'

it3
Associate II

Hello,

 

I create new STM32 project for STM32MP131AAG3 with baremetal.

 

I encounter the following errors when to build the codes of DMA generated by STM32CubeMX.

  • undefined reference to `HAL_NVIC_SetPriority'
  • undefined reference to `HAL_NVIC_EnableIRQ'

static void MX_DMA_Init(void)
{
  /* DMA controller clock enable */
  __HAL_RCC_DMAMUX1_CLK_ENABLE();
  __HAL_RCC_DMA2_CLK_ENABLE();

  /* DMA interrupt init */
  /* DMA2_Stream1_IRQn interrupt configuration */
  HAL_NVIC_SetPriority(DMA2_Stream1_IRQn, 0, 0);
  HAL_NVIC_EnableIRQ(DMA2_Stream1_IRQn);
}

I fixed the code as follows.

static void MX_DMA_Init(void)
{
  /* DMA controller clock enable */
  __HAL_RCC_DMAMUX1_CLK_ENABLE();
  __HAL_RCC_DMA2_CLK_ENABLE();

  /* DMA interrupt init */
  /* DMA2_Stream1_IRQn interrupt configuration */
  IRQ_SetPriority(DMA2_Stream1_IRQn, 0);
  IRQ_Enable(DMA2_Stream1_IRQn);
}

Is this bug? Or is there possibility that I took mistake MX settings or else?

If it is bug, is there a plan to apply this bug fix to the STM32CubeMP13 codebase?

I am in trouble since the code reverts when I change MX settings.

1 ACCEPTED SOLUTION

Accepted Solutions
Semer CHERNI
ST Employee

Hello @it3 

First let me thank you for posting.

You are right about the proposed solution for this misbehavior.
In fact, this is a known issue and it's the subject of investigation. It should be fixed permanently in future release.

BR,
Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
Semer CHERNI
ST Employee

Hello @it3 

First let me thank you for posting.

You are right about the proposed solution for this misbehavior.
In fact, this is a known issue and it's the subject of investigation. It should be fixed permanently in future release.

BR,
Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.