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

STM32 family not defined

Did any one know about this error "stm32 family not defined" and how to resolve it ?
I am using stm32f4 discovery and keil uvision4.
thanks.

Parents
  • Observe the makefile has -DSTM32F4 on the compiler command line

    libopencm3 has something along the lines of

    #if defined(STM32F1)
    # include <libopencm3/stm32/f1/rcc.h>
    #elif defined(STM32F2)
    # include <libopencm3/stm32/f2/rcc.h>
    #elif defined(STM32F4)
    # include <libopencm3/stm32/f4/rcc.h>
    #else
    # error "stm32 family not defined."
    #endif
    

    You fail to define STM32F4 in your C/C++ options pane, and surprise, it fails

Reply
  • Observe the makefile has -DSTM32F4 on the compiler command line

    libopencm3 has something along the lines of

    #if defined(STM32F1)
    # include <libopencm3/stm32/f1/rcc.h>
    #elif defined(STM32F2)
    # include <libopencm3/stm32/f2/rcc.h>
    #elif defined(STM32F4)
    # include <libopencm3/stm32/f4/rcc.h>
    #else
    # error "stm32 family not defined."
    #endif
    

    You fail to define STM32F4 in your C/C++ options pane, and surprise, it fails

Children