cancel
Showing results for 
Search instead for 
Did you mean: 

STMCubeMX USE_FULL_ASSERT compile error when DAC enabled

yonkahlon
Associate II
Posted on March 03, 2016 at 14:28

I have the STM32F303RE Nucleo evaluation board, and I've used CubeMX to configure & generate the HAL drivers.

I've configured a DAC on one of the timers, and everything compiles/runs fine, except when I enabled ''USE_FULL_ASSERT'' then I get the following compile error.

../Src/main.c(329): error:  &sharp20: identifier ''HAL_REMAPTRIGGER_DAC1'' is undefined

    __HAL_REMAPTRIGGER_ENABLE(HAL_REMAPTRIGGER_DAC1_TRIG);

This comes down to the following code generated in stm32fxx_hal.h:

&sharpdefine IS_HAL_REMAPTRIGGER(RMP) ((((RMP) & HAL_REMAPTRIGGER_DAC1)  == HAL_REMAPTRIGGER_DAC1)       || \

                                  (((RMP) & HAL_REMAPTRIGGER_TIM1_ITR3)  == HAL_REMAPTRIGGER_TIM1_ITR3)  || \

                                  (((RMP) & HAL_REMAPTRIGGER_DAC1_TRIG3) == HAL_REMAPTRIGGER_DAC1_TRIG3) || \

                                  (((RMP) & HAL_REMAPTRIGGER_DAC1_TRIG5) == HAL_REMAPTRIGGER_DAC1_TRIG5))

&sharpelse

&sharpdefine IS_HAL_REMAPTRIGGER(RMP) ((((RMP) & HAL_REMAPTRIGGER_DAC1)  == HAL_REMAPTRIGGER_DAC1)       || \

                                  (((RMP) & HAL_REMAPTRIGGER_TIM1_ITR3)  == HAL_REMAPTRIGGER_TIM1_ITR3))

HAL_REMAPTRIGGER_DAC1 is not never defined, and I'm wondering if it's meant to be

HAL_REMAPTRIGGER_DAC1_TRIG which is defined:

&sharpdefine HAL_REMAPTRIGGER_DAC1_TRIG         ((uint32_t)0x00000080)  /*!< DAC trigger remap (when TSEL = 001 on STM32F303xB/C and STM32F358xx devices)

                                                                        0: No remap (DAC trigger is TIM8_TRGO)

                                                                        1: Remap (DAC trigger is TIM3_TRGO) */

Has anyone seen this issue?

#cubemx #debug #assert #printf
2 REPLIES 2
slimen
Senior
Posted on March 04, 2016 at 17:47

Hello kahlon.yon,

 

I tested with the STM32CubeMX 4.13.0 version and I'm not able to reproduce this error!

Which version of STM32CubeMX is used ? Could you please check if you use the latest version STM32CubeMX 4.13.0.

 

 -ForumSTM32-

yonkahlon
Associate II
Posted on March 07, 2016 at 06:40

We are using STM32CubeMX 4.12.0. Let me download the latest version and try again