Add global #define as preprocessor directive

Sysprogs forums Forums VisualGDB Add global #define as preprocessor directive

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #33861
    GeneM
    Participant

    I’m building a STM32 project with the STM32 Low Level (LL) Driver library using VisualGDP and VS2022.  Many of the STM32xx_LL_xx.h header files enable or disable some functionality using something like this.

    #if defined(USE_FULL_LL_DRIVER)
    {
    //stm32 low level driver code here
    }

    Rather than manually type  a #define USE_FULL_LL_DRIVER  line in a bunch of the STM header files, it seems like I should be able to define a preprocessor directive or definition (maybe using the Project Property Pages > Configuration Properties > C/C++ Preprocessor > Preprocessor Definitions) that inserts a #define USE_FULL_LL_DRIVER line in every header file but I haven’t figure out how yet.  Can I do this in VisualGDB and if so, how?

    Thanks

    • This topic was modified 1 year, 9 months ago by GeneM.
    • This topic was modified 1 year, 9 months ago by GeneM.
    • This topic was modified 1 year, 9 months ago by GeneM.
    #33869
    support
    Keymaster

    Hi,

    The Preprocessor Definitions option should work just fine. If you cannot get it working, please feel free to provide the repro steps per our problem reporting guidelines, and we will do our best to help you.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.