Header search is too good.

Sysprogs forums Forums VisualGDB Header search is too good.

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  support 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26436

    davidoz
    Participant

    Hi Support,

    When I include LwIP from the STM32CubeMx, VisualGDB adds all the LwIP subdirectories to the ‘include directories’ and the makefile.

    • Middlewares\Third_Party\LwIP\src\include\lwip
    • Middlewares\Third_Party\LwIP\src\include\lwip\apps
    • Middlewares\Third_Party\LwIP\src\include\lwip\priv
    • Middlewares\Third_Party\LwIP\src\include\lwip\prot
    • Middlewares\Third_Party\LwIP\src\include\netif
    • Middlewares\Third_Party\LwIP\src\include\netif\ppp
    • Middlewares\Third_Party\LwIP\src\include\posix
    • Middlewares\Third_Party\LwIP\src\include\posix\sys
    • Middlewares\Third_Party\LwIP\system\arch

    That is incorrect, since only the root directories should be in the search list:

    • Middlewares\Third_Party\LwIP\src\include
    • Middlewares\Third_Party\LwIP\system

    The problem is LwIP provide their own implementation of err.h and errno.h which are being discovered by my application and clashing with the real c/c++ err.h and errno.h.   LwIP provides a macro to avoid the clashing names, but it doesn’t quite work.

    I suspect you can’t do much about it, after all you are just adding the directories that STM32CubeMx puts in the project file.  I will just have to remember to remove the extra directories each time I update the project from Cube.  Unless you have a better or more permanent solution?

    Cheers

    David

    • This topic was modified 1 month ago by  davidoz.
    #26445

    support
    Keymaster

    Hi,

    Normally, STM32CubeMX should specify the correct include directories in the .gpdsc file, and VisualGDB should pick them up.

    However, in practice, the ST’s tool often drops include paths or writes invalid file paths in the gpdsc file, so random problems do happen.

    If you could attach your gpdsc file, we might be able to add a workaround to our STM32CubeMX importer plugin to add the missing include paths. Alternatively, you can try patching the plugin on your side – we provide source code for most of the plugins interacting with external tools so that our users could tweak them to their needs.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.