Can't Build STM32CubeMx Code

Sysprogs forums Forums VisualGDB Can't Build STM32CubeMx Code

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8336
    pmealey
    Participant

    Hi,

    I am attempting to use VisualGDB to build an STM32CubeMx project without success.

    My system:

    Windows 7

    Visual Studio 2015 Community Edition

    STm32F429I-DISCO board

     

    I have not enabled DMA in the Cube software.  Nevertheless, when I build, I get a several warnings and then an error concerning DMA.

    Warning (e.g.):  Warning ignoring old recipe for target `Debug/stm32f4xx_hal_gpio.o’ AutoPulse_F4_CubeGenerated

    Error: Error ‘HAL_DMA_ERROR_PARAM’ undeclared (first use in this function) AutoPulse_F4_CubeGenerated D:\Projects\AutoPulse_F4_CubeGenerated\AutoPulse_F4_CubeGenerated\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c 288

     

    As nearly as I can determine, this file should not be compiled at all.  It is ifdef’d with HAL_DMA_MODULE_ENABLED.  I did not enable DMA.

    I attempted to fix this problem by placing “-UHAL_DMA_MODULE_ENABLED” in the GCC command line.  That had no effect.

    It is not obvious to me where this variable is being defined.  Any ideas on how to approach this issue?

    Thanks in advance…

    #8338
    support
    Keymaster

    Hi,

    You can find that out by disabling multi-threaded build via VisualGDB Project Properties -> Make Settings -> Build Command -> remove the “-j<number of CPUs>”  (so that all files are compiled one-by-one) and checking the last build command (will look like arm-eabi-gcc -c <file.cpp> -o <file.o> …) in the build log before the error.

    Then you can replace -c with -E and <file.o> with <file.E> and run the command manually. This will run the preprocessor on the input file and save the preprocessed output to a file named <file.E>. The preprocessed output will show what exact macros got expanded and which parts of the files got compiled or skipped.

    If you are still not sure, please simply send us the single-threaded build log and the .E file so that we could suggest a solution.

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